P
Patrick Moore
Guest
Hi all,
sorry to drop in like this but I'm having a problem and thought I may be
able to gain some information from you all...
I'm trying to achieve a variable rotate as below. i.e. it takes in two
numbers, one 32 bits long, the other 5 bits long, and outputs the 32 bit
number, rotated left by 5 bits.
Now, this will compile fine (i.e. it's syntactically correct) but can't be
synthesised in Synplify Pro.
Does anyone have any suggestions, or code snippets that would be able to
make this synthesisable for a Virtex II (Pro).
tia,
patrick.
entity ro_lft is
port(
quantity : in STD_LOGIC_VECTOR(31 downto 0);
amount : in STD_LOGIC_VECTOR(4 downto 0);
clk : in STD_LOGIC;
output : out STD_LOGIC_VECTOR(31 downto 0)
);
end ro_lft;
--}} End of automatically maintained section
architecture ro_lft of ro_lft is
signal rotated : STD_LOGIC_VECTOR(31 downto 0);
--signal result: integer;
--signal a_std_vec : std_logic_vector (31 downto 0);
signal rotate_by : std_logic_vector(4 downto 0);
begin
-- enter your statements here --
rotate_by <= amount;
process (clk)
begin
if clk = '1' and clk'event then
rotated <= std_logic_vector(unsigned(quantity) rol
to_integer(signed(rotate_by)));
end if;
end process;
output <= rotated;
end ro_lft;
sorry to drop in like this but I'm having a problem and thought I may be
able to gain some information from you all...
I'm trying to achieve a variable rotate as below. i.e. it takes in two
numbers, one 32 bits long, the other 5 bits long, and outputs the 32 bit
number, rotated left by 5 bits.
Now, this will compile fine (i.e. it's syntactically correct) but can't be
synthesised in Synplify Pro.
Does anyone have any suggestions, or code snippets that would be able to
make this synthesisable for a Virtex II (Pro).
tia,
patrick.
entity ro_lft is
port(
quantity : in STD_LOGIC_VECTOR(31 downto 0);
amount : in STD_LOGIC_VECTOR(4 downto 0);
clk : in STD_LOGIC;
output : out STD_LOGIC_VECTOR(31 downto 0)
);
end ro_lft;
--}} End of automatically maintained section
architecture ro_lft of ro_lft is
signal rotated : STD_LOGIC_VECTOR(31 downto 0);
--signal result: integer;
--signal a_std_vec : std_logic_vector (31 downto 0);
signal rotate_by : std_logic_vector(4 downto 0);
begin
-- enter your statements here --
rotate_by <= amount;
process (clk)
begin
if clk = '1' and clk'event then
rotated <= std_logic_vector(unsigned(quantity) rol
to_integer(signed(rotate_by)));
end if;
end process;
output <= rotated;
end ro_lft;