Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Is it correct to build a LFSR?

Reply
Thread Tools

Is it correct to build a LFSR?

 
 
timewing timewing is offline
Junior Member
Join Date: Aug 2008
Posts: 2
 
      08-30-2008
I'm intend to build a LFSR, and assign the first 576 states to an array. The taps I choose is [16, 14, 13, 11]

There's the warning:
Register <rom<1>> equivalent to <rom<0>> has been removed
Register <rom<2>> equivalent to <rom<0>> has been removed
...
Register <rom<576>> equivalent to <rom<0>> has been removed

I guess there's something wrong with my code?




type rom_type is array(0 to 576) of bit_vector(15 downto 0);

constant allzero : bit_vector(15 downto 0) := (others => '0');
signal q : bit_vector(15 downto 0) := (others => '1');
signal reset : std_logic;

signal rom : rom_type;

begin

reset <= '1' when q = allzero else '0';

process (reset) is

variable tmp : rom_type;

begin
if (reset='1') then
q <= (others => '1'); ----seed of the LFSR
else
for i in rom_type'range loop
q(0) <= q(15) xor q(13) xor q(12) xor q(10);
q(15 downto 1) <= q(14 downto 0);
tmp(i) := q;
end loop;
rom <= tmp;
end if;
end process;
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simulation result is correct but synthesis result is not correct J.Ram VHDL 7 12-03-2008 01:26 PM
Correct White Balance Doesn't Mean Correct Color?? jim evans Digital Photography 28 12-27-2005 05:10 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
correct or not correct? Dan HTML 7 10-02-2003 10:16 PM
To correct my program. please, check to find errors and correct me. joon Java 1 07-08-2003 06:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57