![]() |
|
|
|||||||
![]() |
VHDL - Is it correct to build a LFSR? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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; timewing |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Build Your Own System Rescue CD | Admin | Front Page News | 0 | 01-10-2008 09:43 PM |
| Configuration independent build events | sansay | Software | 0 | 06-08-2007 04:59 PM |
| 3 times correct sleeve wrong DVD | -oo0(GoldTrader)0oo- | DVD Video | 3 | 03-05-2007 04:22 AM |
| The All New Google Picasa Build 28.32 Final | kosayt@yahoo.com | DVD Video | 1 | 11-20-2006 04:30 AM |
| The 10 least politically correct movies ever | Fred Goodwin, CMA | DVD Video | 109 | 08-10-2006 09:23 PM |