Bonjour,
j'aimerais effectuer un décalage d'un registre de 2^i en un cycle d'horloge, j'ai essayé de créer un signal de n à I bits, puis le concaténer avec un signal de I à n bits, j'ai un problème de syntaxe, merci de m'aider, voici mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all; 
use ieee.std_logic_unsigned.all;
 
entity div_2i is
	generic(N_Bits : INTEGER := 32); 
	port(A : in UNSIGNED((N_Bits - 1) downto 0);
		  I : in UNSIGNED((N_Bits - 1) downto 0);
		  S : out UNSIGNED((N_Bits - 1) downto 0));
end div_2i;
 
architecture arch_div_2i of div_2i is
signal S1 : UNSIGNED((N_Bits - 1) downto 0);
begin
		S <= (I downto 0, '0') & S1(N_Bits downto I);
end arch_div_2i;