vasireddyrajesh3
Newbie level 6
Code:
begin -- process lfsr1
if rst_n = '0' then -- asynchronous reset (active low)
reg := (others => '1');
elsif RISING_EDGE(CLK) then -- rising clock edge
vreg := reg;
for i in 1 to width loop
fb := '0';
for j in taps'range loop
if fb=vreg(taps(j)-1) then
fb := '0';
else
fb := '1';
end if;
end loop; -- j
for k in vreg'left downto 1 loop
vreg(k) := vreg(k-1);
end loop; -- k
vreg(0) := fb;
end loop; -- i
reg := vreg;
dout <= reg(0 to width-1);
this is the LFSR program . i want the out put(dout)(its 8bit) from 8 th clock pulse only... and from 8 th clock pulse it should run continuously for each clock . how to do that.