My code contains the following:
ladder2: for i in 0 to 14 generate begin
process (clk, rst) begin
if rst = '1' then
-- xin(i+1,3) <= "00" & x"000";
-- xin(i+1,2) <= "00" & x"000";
-- xin(i+1,1) <= "00" & x"000";
-- xin(i+1,0) <= "00" & x"000";
LADD:
for j in 0 to 3 loop
xin(i+1,j) <= "00" & x"000";
end loop;
The commented out lines work, however the loop below them executes but does not behave as expected.
Below is an alternative method to achieve this behavior:
ladder2: for i in 0 to 14 generate begin
gen1: for j in 0 to 3 generate begin
process (clk, rst) begin
if rst = '1' then
xin(i+1,j) <= "00" & x"000";
elsif rising_edge(clk) then
xin(i+1,?) <= xin(i,j);
end if;
end process;
end generate;
end generate;
AR# 50934 | |
---|---|
Date | 12/16/2014 |
Status | Active |
Type | General Article |
Devices | |
Tools |