generic register lfsr

Guest #3316331
Rate this post
• ▲ useful
▼ not useful
good morning
I want to program a vhdl code wich work with input , output and selector 
pointing a generic component. this component is a registre lfsr each 
time it take new parameter generator polynomial

it joined my idea of implementation

And this my first think of code :
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.STD_LOGIC_ARITH.ALL;
4
use IEEE.NUMERIC_STD.ALL;
5
use STD.TEXTIO.ALL;
6
library WORK;
7
use WORK.pkgg.ALL;
8
entity scrambler is
9
    Port ( e : in  STD_LOGIC_VECTOR (29 downto 0);
10
           Sel : in  STD_LOGIC_VECTOR (3 downto 0);
11
           s : out  STD_LOGIC_VECTOR (29 downto 0));
12
end scrambler;
13
architecture Behavioral of scrambler is
14

15
   SIGNAL rst_n :   std_logic;
16
   SIGNAL clk   :   std_logic;
17
   SIGNAL dout  :  std_logic_vector(29 downto 0);
18

19
    CONSTANT width  : integer     := 30;
20
    CONSTANT length : integer     := 31;         -- length of the register
21
    CONSTANT taps   : T_LFSR_TAPS16 := (31, 27, 26, 25, 22, 21, 19, 18, 17, 16, 10, 7, 6, 5, 3, 2);
22

23
           component genlfsr 
24
           generic (
25
    width  : integer     := 30;
26
    length : integer     := 31;         
27
    taps   : T_LFSR_TAPS16 := (31, 27, 26, 25, 22, 21, 19, 18, 17, 16, 10, 7, 6, 5, 3, 2)
28
    );
29

30
    port ( 
31
    rst_n : in  std_logic;
32
    clk   : in  std_logic;
33
    dout  : out std_logic_vector(29 downto 0) 
34
          );
35
  end component;
36

37
bgin
38

39
U1: entity work.genlfsr(behavioral) 
40
    generic map (width => width ,length => length ,taps => taps)
41
    port map(rst_n => rst_n ,clk => clk ,dout =>dout);
42

43
process (dout ) is
44
   
45
   begin
46
 
47
 s(29 downto 29-dout'high) <= dout;
48

49
 end process;
50
end Behavioral;

So I don't understand how to make a generic registre lfsr with different 
value
Attached files:
Moderator (Company: Titel) #3316457
Rate this post
• ▲ useful
▼ not useful
siwar wrote:
> So I don't understand how to make a generic registre lfsr with different
> value
What do you mean with a "different value"?
Different taps?

siwar wrote:
> 12:33
siwar wrote:
> 13:02
> please help me
Please wait some minutes. At least half an hour. This is not a hotline.

And then post your own suggestion of a solution for the desired 
component "genlfsr". Then we can discuss the design. But no one is 
intended to do all of your job, bcause its your homework...


And additionally: one post is enough! I have deleted the other one.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.