@@ -353,7 +353,7 BEGIN -- beh | |||||
353 | pirq_ms => 6, |
|
353 | pirq_ms => 6, | |
354 | pirq_wfp => 14, |
|
354 | pirq_wfp => 14, | |
355 | hindex => 2, |
|
355 | hindex => 2, | |
356 |
top_lfr_version => X"00010 |
|
356 | top_lfr_version => X"00010A") -- aa.bb.cc version | |
357 | -- AA : BOARD NUMBER |
|
357 | -- AA : BOARD NUMBER | |
358 | -- 0 => MINI_LFR |
|
358 | -- 0 => MINI_LFR | |
359 | -- 1 => EM |
|
359 | -- 1 => EM |
@@ -425,7 +425,7 BEGIN -- beh | |||||
425 | pirq_ms => 6, |
|
425 | pirq_ms => 6, | |
426 | pirq_wfp => 14, |
|
426 | pirq_wfp => 14, | |
427 | hindex => 2, |
|
427 | hindex => 2, | |
428 |
top_lfr_version => X"00010 |
|
428 | top_lfr_version => X"00010A") -- aa.bb.cc version | |
429 | PORT MAP ( |
|
429 | PORT MAP ( | |
430 | clk => clk_25, |
|
430 | clk => clk_25, | |
431 | rstn => reset, |
|
431 | rstn => reset, | |
@@ -577,4 +577,4 BEGIN -- beh | |||||
577 | END IF; |
|
577 | END IF; | |
578 | END PROCESS; |
|
578 | END PROCESS; | |
579 |
|
579 | |||
580 | END beh; No newline at end of file |
|
580 | END beh; |
@@ -19,103 +19,104 | |||||
19 | -- Author : Martin Morlot |
|
19 | -- Author : Martin Morlot | |
20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |
21 | ------------------------------------------------------------------------------ |
|
21 | ------------------------------------------------------------------------------ | |
22 | library IEEE; |
|
22 | LIBRARY IEEE; | |
23 |
|
|
23 | USE IEEE.std_logic_1164.ALL; | |
24 |
|
|
24 | USE IEEE.numeric_std.ALL; | |
25 |
|
25 | |||
26 |
|
|
26 | ENTITY Driver_FFT IS | |
27 | generic( |
|
27 | GENERIC( | |
28 |
Data_sz |
|
28 | Data_sz : INTEGER RANGE 1 TO 32 := 16; | |
29 |
NbData : |
|
29 | NbData : INTEGER RANGE 1 TO 512 := 256 | |
30 | ); |
|
30 | ); | |
31 | port( |
|
31 | PORT( | |
32 | clk : in std_logic; |
|
32 | clk : IN STD_LOGIC; | |
33 | rstn : in std_logic; |
|
33 | rstn : IN STD_LOGIC; | |
34 | Load : in std_logic; |
|
34 | Load : IN STD_LOGIC; -- (CoreFFT) FFT_Load | |
35 | Empty : in std_logic_vector(4 downto 0); |
|
35 | -- Load | |
36 | DATA : in std_logic_vector((5*Data_sz)-1 downto 0); |
|
36 | Empty : IN STD_LOGIC_VECTOR(4 DOWNTO 0); -- FifoIN_Empty | |
37 | Valid : out std_logic; |
|
37 | DATA : IN STD_LOGIC_VECTOR((5*Data_sz)-1 DOWNTO 0); -- FifoIN_Data | |
38 | Read : out std_logic_vector(4 downto 0); |
|
38 | Valid : OUT STD_LOGIC; --(CoreFFT) Drive_write | |
39 | Data_re : out std_logic_vector(Data_sz-1 downto 0); |
|
39 | Read : OUT STD_LOGIC_VECTOR(4 DOWNTO 0); -- Read | |
40 | Data_im : out std_logic_vector(Data_sz-1 downto 0) |
|
40 | Data_re : OUT STD_LOGIC_VECTOR(Data_sz-1 DOWNTO 0); --(CoreFFT) Drive_DataRE | |
|
41 | Data_im : OUT STD_LOGIC_VECTOR(Data_sz-1 DOWNTO 0) --(CoreFFT) Drive_DataIM | |||
41 | ); |
|
42 | ); | |
42 | end entity; |
|
43 | END ENTITY; | |
43 |
|
44 | |||
44 |
|
45 | |||
45 | architecture ar_Driver of Driver_FFT is |
|
46 | ARCHITECTURE ar_Driver OF Driver_FFT IS | |
46 |
|
47 | |||
47 |
|
|
48 | TYPE etat IS (eX, e0, e1, e2); | |
48 |
|
|
49 | SIGNAL ect : etat; | |
49 |
|
50 | |||
50 | signal DataCount : integer range 0 to 255 := 0; |
|
51 | SIGNAL DataCount : INTEGER RANGE 0 TO 255 := 0; | |
51 | signal FifoCpt : integer range 0 to 4 := 0; |
|
52 | SIGNAL FifoCpt : INTEGER RANGE 0 TO 4 := 0; | |
52 |
|
53 | |||
53 | signal sLoad : std_logic; |
|
54 | SIGNAL sLoad : STD_LOGIC; | |
54 |
|
55 | |||
55 | begin |
|
56 | BEGIN | |
56 |
|
57 | |||
57 | process(clk,rstn) |
|
58 | PROCESS(clk, rstn) | |
58 | begin |
|
59 | BEGIN | |
59 |
|
|
60 | IF(rstn = '0')then | |
60 |
|
|
61 | ect <= e0; | |
61 |
|
|
62 | Read <= (OTHERS => '1'); | |
62 |
|
|
63 | Valid <= '0'; | |
63 |
|
|
64 | Data_re <= (OTHERS => '0'); | |
64 |
|
|
65 | Data_im <= (OTHERS => '0'); | |
65 |
|
|
66 | DataCount <= 0; | |
66 |
|
|
67 | FifoCpt <= 0; | |
67 |
|
|
68 | sLoad <= '0'; | |
68 |
|
|
69 | ||
69 | elsif(clk'event and clk='1')then |
|
70 | ELSIF(clk'EVENT AND clk = '1')then | |
70 |
|
|
71 | sLoad <= Load; | |
71 |
|
72 | |||
72 |
|
|
73 | IF(sLoad = '1' and Load = '0')THEN | |
73 |
|
|
74 | IF(FifoCpt = 4)THEN | |
74 |
|
|
75 | FifoCpt <= 0; | |
75 | else |
|
76 | ELSE | |
76 |
|
|
77 | FifoCpt <= FifoCpt + 1; | |
77 | end if; |
|
78 | END IF; | |
78 | end if; |
|
79 | END IF; | |
79 |
|
80 | |||
80 | case ect is |
|
81 | CASE ect IS | |
81 |
|
82 | |||
82 |
|
|
83 | WHEN e0 => | |
83 |
|
|
84 | IF(Load = '1' and Empty(FifoCpt) = '0')THEN | |
84 |
|
|
85 | Read(FifoCpt) <= '0'; | |
85 |
|
|
86 | ect <= e1; | |
86 | end if; |
|
87 | END IF; | |
87 |
|
88 | |||
88 |
|
|
89 | WHEN e1 => | |
89 |
|
|
90 | Valid <= '0'; | |
90 |
|
|
91 | Read(FifoCpt) <= '1'; | |
91 |
|
|
92 | ect <= e2; | |
92 |
|
|
93 | ||
93 |
|
|
94 | WHEN e2 => | |
94 |
|
|
95 | Data_re <= DATA(((FifoCpt+1)*Data_sz)-1 DOWNTO (FifoCpt*Data_sz)); | |
95 |
|
|
96 | Data_im <= (OTHERS => '0'); | |
96 |
|
|
97 | Valid <= '1'; | |
97 |
|
|
98 | IF(DataCount = NbData-1)THEN | |
98 |
|
|
99 | DataCount <= 0; | |
99 |
|
|
100 | ect <= eX; | |
100 | else |
|
101 | ELSE | |
101 |
|
|
102 | DataCount <= DataCount + 1; | |
102 |
|
|
103 | IF(Load = '1' and Empty(FifoCpt) = '0')THEN | |
103 |
|
|
104 | Read(FifoCpt) <= '0'; | |
104 |
|
|
105 | ect <= e1; | |
105 | else |
|
106 | ELSE | |
106 |
|
|
107 | ect <= eX; | |
107 | end if; |
|
108 | END IF; | |
108 | end if; |
|
109 | END IF; | |
109 |
|
110 | |||
110 |
|
|
111 | WHEN eX => | |
111 |
|
|
112 | Valid <= '0'; | |
112 |
|
|
113 | ect <= e0; | |
113 |
|
114 | |||
114 | when others => |
|
115 | WHEN OTHERS => | |
115 | null; |
|
116 | NULL; | |
116 |
|
117 | |||
117 | end case; |
|
118 | END CASE; | |
118 | end if; |
|
119 | END IF; | |
119 | end process; |
|
120 | END PROCESS; | |
120 |
|
121 | |||
121 | end architecture; No newline at end of file |
|
122 | END ARCHITECTURE; |
@@ -85,11 +85,16 Load <= FFT_Load; | |||||
85 | HALFPTS => gHALFPTS, |
|
85 | HALFPTS => gHALFPTS, | |
86 | inBuf_RWDLY => gInBuf_RWDLY) |
|
86 | inBuf_RWDLY => gInBuf_RWDLY) | |
87 | port map(clkm,start,rstn, |
|
87 | port map(clkm,start,rstn, | |
88 |
Drive_Write, |
|
88 | Drive_Write, -- ifiD_valid | |
89 | Drive_DataIM,Drive_DataRE, |
|
89 | Link_Read, -- ifiRead_y | |
90 | FFT_Load,open, |
|
90 | Drive_DataIM, -- ifiD_im | |
91 | FFT_DataIM,FFT_DataRE, |
|
91 | Drive_DataRE, -- ifiD_re | |
92 |
FFT_ |
|
92 | FFT_Load, -- ifoLoad | |
|
93 | open, -- ifoPong | |||
|
94 | FFT_DataIM, -- ifoY_im | |||
|
95 | FFT_DataRE, -- ifoY_re | |||
|
96 | FFT_Valid, -- ifiY_valid | |||
|
97 | FFT_Ready); -- ifiY_rdy | |||
93 |
|
98 | |||
94 |
|
99 | |||
95 | LINK : Linker_FFT |
|
100 | LINK : Linker_FFT |
@@ -19,94 +19,95 | |||||
19 | -- Author : Martin Morlot |
|
19 | -- Author : Martin Morlot | |
20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |
21 | ------------------------------------------------------------------------------ |
|
21 | ------------------------------------------------------------------------------ | |
22 | library IEEE; |
|
22 | LIBRARY IEEE; | |
23 |
|
|
23 | USE IEEE.std_logic_1164.ALL; | |
24 |
|
|
24 | USE IEEE.numeric_std.ALL; | |
25 |
|
25 | |||
26 |
|
|
26 | ENTITY Linker_FFT IS | |
27 | generic( |
|
27 | GENERIC( | |
28 |
Data_sz |
|
28 | Data_sz : INTEGER RANGE 1 TO 32 := 16; | |
29 |
NbData : |
|
29 | NbData : INTEGER RANGE 1 TO 512 := 256 | |
30 | ); |
|
30 | ); | |
31 | port( |
|
31 | PORT( | |
32 | clk : in std_logic; |
|
32 | clk : IN STD_LOGIC; | |
33 | rstn : in std_logic; |
|
33 | rstn : IN STD_LOGIC; | |
34 | Ready : in std_logic; |
|
34 | Ready : IN STD_LOGIC; -- | |
35 | Valid : in std_logic; |
|
35 | Valid : IN STD_LOGIC; -- | |
36 | Full : in std_logic_vector(4 downto 0); |
|
36 | Full : IN STD_LOGIC_VECTOR(4 DOWNTO 0); -- | |
37 | Data_re : in std_logic_vector(Data_sz-1 downto 0); |
|
37 | Data_re : IN STD_LOGIC_VECTOR(Data_sz-1 DOWNTO 0); -- | |
38 | Data_im : in std_logic_vector(Data_sz-1 downto 0); |
|
38 | Data_im : IN STD_LOGIC_VECTOR(Data_sz-1 DOWNTO 0); -- | |
39 | Read : out std_logic; |
|
39 | ||
40 | Write : out std_logic_vector(4 downto 0); |
|
40 | Read : OUT STD_LOGIC; -- Link_Read | |
41 | ReUse : out std_logic_vector(4 downto 0); |
|
41 | Write : OUT STD_LOGIC_VECTOR(4 DOWNTO 0); -- | |
42 | DATA : out std_logic_vector((5*Data_sz)-1 downto 0) |
|
42 | ReUse : OUT STD_LOGIC_VECTOR(4 DOWNTO 0); | |
|
43 | DATA : OUT STD_LOGIC_VECTOR((5*Data_sz)-1 DOWNTO 0) | |||
43 | ); |
|
44 | ); | |
44 | end entity; |
|
45 | END ENTITY; | |
45 |
|
46 | |||
46 |
|
47 | |||
47 | architecture ar_Linker of Linker_FFT is |
|
48 | ARCHITECTURE ar_Linker OF Linker_FFT IS | |
48 |
|
49 | |||
49 |
|
|
50 | TYPE etat IS (eX, e0, e1, e2); | |
50 |
|
|
51 | SIGNAL ect : etat; | |
51 |
|
52 | |||
52 | signal DataTmp : std_logic_vector(Data_sz-1 downto 0); |
|
53 | SIGNAL DataTmp : STD_LOGIC_VECTOR(Data_sz-1 DOWNTO 0); | |
53 |
|
54 | |||
54 | signal sRead : std_logic; |
|
55 | SIGNAL sRead : STD_LOGIC; | |
55 | signal sReady : std_logic; |
|
56 | SIGNAL sReady : STD_LOGIC; | |
56 |
|
57 | |||
57 | signal FifoCpt : integer range 0 to 4 := 0; |
|
58 | SIGNAL FifoCpt : INTEGER RANGE 0 TO 4 := 0; | |
58 |
|
59 | |||
59 | begin |
|
60 | BEGIN | |
60 |
|
61 | |||
61 | process(clk,rstn) |
|
62 | PROCESS(clk, rstn) | |
62 | begin |
|
63 | BEGIN | |
63 |
|
|
64 | IF(rstn = '0')then | |
64 |
|
|
65 | ect <= e0; | |
65 |
|
|
66 | sRead <= '0'; | |
66 |
|
|
67 | sReady <= '0'; | |
67 |
|
|
68 | Write <= (OTHERS => '1'); | |
68 |
|
|
69 | Reuse <= (OTHERS => '0'); | |
69 |
|
|
70 | FifoCpt <= 0; | |
70 |
|
|
71 | ||
71 | elsif(clk'event and clk='1')then |
|
72 | ELSIF(clk'EVENT AND clk = '1')then | |
72 |
|
|
73 | sReady <= Ready; | |
73 |
|
74 | |||
74 |
|
|
75 | IF(sReady = '1' and Ready = '0')THEN | |
75 |
|
|
76 | IF(FifoCpt = 4)THEN | |
76 |
|
|
77 | FifoCpt <= 0; | |
77 | else |
|
78 | ELSE | |
78 |
|
|
79 | FifoCpt <= FifoCpt + 1; | |
79 | end if; |
|
80 | END IF; | |
80 |
|
|
81 | ELSIF(Ready = '1')then | |
81 |
|
|
82 | sRead <= NOT sRead; | |
82 | else |
|
83 | ELSE | |
83 |
|
|
84 | sRead <= '0'; | |
84 | end if; |
|
85 | END IF; | |
85 |
|
86 | |||
86 | case ect is |
|
87 | CASE ect IS | |
87 |
|
88 | |||
88 |
|
|
89 | WHEN e0 => | |
89 |
|
|
90 | Write(FifoCpt) <= '1'; | |
90 |
|
|
91 | IF(Valid = '1' and Full(FifoCpt) = '0')THEN | |
91 | DataTmp <= Data_im; |
|
92 | DataTmp <= Data_im; | |
92 |
|
|
93 | DATA(((FifoCpt+1)*Data_sz)-1 DOWNTO (FifoCpt*Data_sz)) <= Data_re; | |
93 | Write(FifoCpt) <= '0'; |
|
94 | Write(FifoCpt) <= '0'; | |
94 | ect <= e1; |
|
95 | ect <= e1; | |
95 |
|
|
96 | ELSIF(Full(FifoCpt) = '1')then | |
96 |
|
|
97 | ReUse(FifoCpt) <= '1'; | |
97 | end if; |
|
98 | END IF; | |
98 |
|
99 | |||
99 |
|
|
100 | WHEN e1 => | |
100 |
|
|
101 | DATA(((FifoCpt+1)*Data_sz)-1 DOWNTO (FifoCpt*Data_sz)) <= DataTmp; | |
101 | ect <= e0; |
|
102 | ect <= e0; | |
102 |
|
103 | |||
103 | when others => |
|
104 | WHEN OTHERS => | |
104 | null; |
|
105 | NULL; | |
105 |
|
106 | |||
106 | end case; |
|
107 | END CASE; | |
107 | end if; |
|
108 | END IF; | |
108 | end process; |
|
109 | END PROCESS; | |
109 |
|
110 | |||
110 | Read <= sRead; |
|
111 | Read <= sRead; | |
111 |
|
112 | |||
112 | end architecture; No newline at end of file |
|
113 | END ARCHITECTURE; |
@@ -18,136 +18,139 | |||||
18 | ------------------------------------------------------------------------------ |
|
18 | ------------------------------------------------------------------------------ | |
19 |
-- |
|
19 | -- Author : Martin Morlot | |
20 |
-- |
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |
|
21 | ------------------------------------------------------------------------------- | |||
|
22 | -- Update : Jean-christophe Pellion | |||
|
23 | -- Mail : jean-christophe.pellion@lpp.polytechnique.fr | |||
21 | ------------------------------------------------------------------------------ |
|
24 | ------------------------------------------------------------------------------ | |
22 | library IEEE; |
|
25 | LIBRARY IEEE; | |
23 |
|
|
26 | USE IEEE.std_logic_1164.ALL; | |
24 |
|
|
27 | USE IEEE.numeric_std.ALL; | |
25 |
|
28 | |||
26 | entity DEMUX is |
|
29 | ENTITY DEMUX IS | |
27 | generic( |
|
30 | GENERIC( | |
28 |
Data_sz |
|
31 | Data_sz : INTEGER RANGE 1 TO 32 := 16); | |
29 | port( |
|
32 | PORT( | |
30 | clk : in std_logic; |
|
33 | clk : IN STD_LOGIC; | |
31 | rstn : in std_logic; |
|
34 | rstn : IN STD_LOGIC; | |
32 |
|
||||
33 | Read : in std_logic_vector(4 downto 0); |
|
|||
34 | Load : in std_logic; |
|
|||
35 |
|
35 | |||
36 | EmptyF0 : in std_logic_vector(4 downto 0); |
|
36 | Read : IN STD_LOGIC_VECTOR(4 DOWNTO 0); | |
37 | EmptyF1 : in std_logic_vector(4 downto 0); |
|
37 | Load : IN STD_LOGIC; | |
38 | EmptyF2 : in std_logic_vector(4 downto 0); |
|
38 | ||
|
39 | EmptyF0 : IN STD_LOGIC_VECTOR(4 DOWNTO 0); | |||
|
40 | EmptyF1 : IN STD_LOGIC_VECTOR(4 DOWNTO 0); | |||
|
41 | EmptyF2 : IN STD_LOGIC_VECTOR(4 DOWNTO 0); | |||
39 |
|
42 | |||
40 | DataF0 : in std_logic_vector((5*Data_sz)-1 downto 0); |
|
43 | DataF0 : IN STD_LOGIC_VECTOR((5*Data_sz)-1 DOWNTO 0); | |
41 | DataF1 : in std_logic_vector((5*Data_sz)-1 downto 0); |
|
44 | DataF1 : IN STD_LOGIC_VECTOR((5*Data_sz)-1 DOWNTO 0); | |
42 | DataF2 : in std_logic_vector((5*Data_sz)-1 downto 0); |
|
45 | DataF2 : IN STD_LOGIC_VECTOR((5*Data_sz)-1 DOWNTO 0); | |
43 |
|
46 | |||
44 | WorkFreq : out std_logic_vector(1 downto 0); |
|
47 | WorkFreq : OUT STD_LOGIC_VECTOR(1 DOWNTO 0); | |
45 | Read_DEMUX : out std_logic_vector(14 downto 0); |
|
48 | Read_DEMUX : OUT STD_LOGIC_VECTOR(14 DOWNTO 0); | |
46 | Empty : out std_logic_vector(4 downto 0); |
|
49 | Empty : OUT STD_LOGIC_VECTOR(4 DOWNTO 0); | |
47 | Data : out std_logic_vector((5*Data_sz)-1 downto 0) |
|
50 | Data : OUT STD_LOGIC_VECTOR((5*Data_sz)-1 DOWNTO 0) | |
48 | ); |
|
51 | ); | |
49 | end entity; |
|
52 | END ENTITY; | |
50 |
|
53 | |||
51 |
|
54 | |||
52 | architecture ar_DEMUX of DEMUX is |
|
55 | ARCHITECTURE ar_DEMUX OF DEMUX IS | |
53 |
|
56 | |||
54 |
|
|
57 | TYPE etat IS (eX, e0, e1, e2, e3); | |
55 |
|
|
58 | SIGNAL ect : etat; | |
56 |
|
59 | |||
57 |
|
60 | |||
58 | signal load_reg : std_logic; |
|
61 | SIGNAL load_reg : STD_LOGIC; | |
59 | constant Dummy_Read : std_logic_vector(4 downto 0) := (others => '1'); |
|
62 | CONSTANT Dummy_Read : STD_LOGIC_VECTOR(4 DOWNTO 0) := (OTHERS => '1'); | |
60 |
|
63 | |||
61 | signal Countf0 : integer; |
|
64 | SIGNAL Countf0 : INTEGER; | |
62 | signal Countf1 : integer; |
|
65 | SIGNAL Countf1 : INTEGER; | |
63 | signal i : integer; |
|
66 | SIGNAL i : INTEGER; | |
64 |
|
67 | |||
65 | begin |
|
68 | BEGIN | |
66 | process(clk,rstn) |
|
69 | PROCESS(clk, rstn) | |
67 | begin |
|
70 | BEGIN | |
68 |
|
|
71 | IF(rstn = '0')then | |
69 |
|
|
72 | ect <= e0; | |
70 |
|
|
73 | load_reg <= '0'; | |
71 |
|
|
74 | Countf0 <= 0; | |
72 |
|
|
75 | Countf1 <= 0; | |
73 |
|
|
76 | i <= 0; | |
74 |
|
77 | |||
75 | elsif(clk'event and clk='1')then |
|
78 | ELSIF(clk'EVENT AND clk = '1')then | |
76 |
|
|
79 | load_reg <= Load; | |
77 |
|
80 | |||
78 | case ect is |
|
81 | CASE ect IS | |
79 |
|
82 | |||
80 |
|
|
83 | WHEN e0 => | |
81 |
|
|
84 | IF(load_reg = '1' AND Load = '0')THEN | |
82 |
|
|
85 | IF(Countf0 = 24)THEN | |
83 |
|
|
86 | Countf0 <= 0; | |
84 |
|
|
87 | ect <= e1; | |
85 | else |
|
88 | ELSE | |
86 |
|
|
89 | Countf0 <= Countf0 + 1; | |
87 |
|
|
90 | ect <= e0; | |
88 | end if; |
|
91 | END IF; | |
89 | end if; |
|
92 | END IF; | |
90 |
|
93 | |||
91 |
|
|
94 | WHEN e1 => | |
92 |
|
|
95 | IF(load_reg = '1' AND Load = '0')THEN | |
93 |
|
|
96 | IF(Countf1 = 74)THEN | |
94 |
|
|
97 | Countf1 <= 0; | |
95 |
|
|
98 | ect <= e2; | |
96 | else |
|
99 | ELSE | |
97 |
|
|
100 | Countf1 <= Countf1 + 1; | |
98 | if(i=4)then |
|
101 | IF(i = 4)THEN | |
99 |
|
|
102 | i <= 0; | |
100 |
|
|
103 | ect <= e0; | |
101 | else |
|
104 | ELSE | |
102 |
|
|
105 | i <= i+1; | |
103 |
|
|
106 | ect <= e1; | |
104 | end if; |
|
107 | END IF; | |
105 | end if; |
|
108 | END IF; | |
106 | end if; |
|
109 | END IF; | |
107 |
|
110 | |||
108 |
|
|
111 | WHEN e2 => | |
109 |
|
|
112 | IF(load_reg = '1' AND Load = '0')THEN | |
110 | if(i=4)then |
|
113 | IF(i = 4)THEN | |
111 |
|
|
114 | i <= 0; | |
112 |
|
|
115 | ect <= e0; | |
113 | else |
|
116 | ELSE | |
114 |
|
|
117 | i <= i+1; | |
115 |
|
|
118 | ect <= e2; | |
116 | end if; |
|
119 | END IF; | |
117 | end if; |
|
120 | END IF; | |
118 |
|
|
121 | ||
119 | when others => |
|
122 | WHEN OTHERS => | |
120 | null; |
|
123 | NULL; | |
121 |
|
124 | |||
122 | end case; |
|
125 | END CASE; | |
123 | end if; |
|
126 | END IF; | |
124 | end process; |
|
127 | END PROCESS; | |
125 |
|
128 | |||
126 | with ect select |
|
129 | WITH ect SELECT | |
127 |
Empty |
|
130 | Empty <= EmptyF0 WHEN e0, | |
128 | EmptyF1 when e1, |
|
131 | EmptyF1 WHEN e1, | |
129 | EmptyF2 when e2, |
|
132 | EmptyF2 WHEN e2, | |
130 | (others => '1') when others; |
|
133 | (OTHERS => '1') WHEN OTHERS; | |
131 |
|
134 | |||
132 | with ect select |
|
135 | WITH ect SELECT | |
133 |
Data |
|
136 | Data <= DataF0 WHEN e0, | |
134 | DataF1 when e1, |
|
137 | DataF1 WHEN e1, | |
135 | DataF2 when e2, |
|
138 | DataF2 WHEN e2, | |
136 | (others => '0') when others; |
|
139 | (OTHERS => '0') WHEN OTHERS; | |
137 |
|
140 | |||
138 | with ect select |
|
141 | WITH ect SELECT | |
139 |
Read_DEMUX |
|
142 | Read_DEMUX <= Dummy_Read & Dummy_Read & Read WHEN e0, | |
140 |
|
|
143 | Dummy_Read & Read & Dummy_Read WHEN e1, | |
141 |
|
|
144 | Read & Dummy_Read & Dummy_Read WHEN e2, | |
142 | (others => '1') when others; |
|
145 | (OTHERS => '1') WHEN OTHERS; | |
143 |
|
146 | |||
144 | with ect select |
|
147 | WITH ect SELECT | |
145 |
WorkFreq |
|
148 | WorkFreq <= "01" WHEN e0, | |
146 | "10" when e1, |
|
149 | "10" WHEN e1, | |
147 | "11" when e2, |
|
150 | "11" WHEN e2, | |
148 | "00" when others; |
|
151 | "00" WHEN OTHERS; | |
149 |
|
152 | |||
150 | end architecture; |
|
153 | END ARCHITECTURE; | |
151 |
|
154 | |||
152 |
|
155 | |||
153 |
|
156 |
@@ -33,17 +33,17 entity MatriceSpectrale is | |||||
33 | clkm : in std_logic; |
|
33 | clkm : in std_logic; | |
34 | rstn : in std_logic; |
|
34 | rstn : in std_logic; | |
35 |
|
35 | |||
36 | FifoIN_Full : in std_logic_vector(4 downto 0); |
|
36 | FifoIN_Full : in std_logic_vector(4 downto 0); -- | |
37 | SetReUse : in std_logic_vector(4 downto 0); |
|
37 | SetReUse : in std_logic_vector(4 downto 0); -- | |
38 | Valid : in std_logic; |
|
38 | Valid : in std_logic; | |
39 | Data_IN : in std_logic_vector((5*Input_SZ)-1 downto 0); |
|
39 | Data_IN : in std_logic_vector((5*Input_SZ)-1 downto 0); -- | |
40 | ACK : in std_logic; |
|
40 | ACK : in std_logic; | |
41 | SM_Write : out std_logic; |
|
41 | SM_Write : out std_logic; | |
42 | FlagError : out std_logic; |
|
42 | FlagError : out std_logic; | |
43 | Statu : out std_logic_vector(3 downto 0); |
|
43 | Statu : out std_logic_vector(3 downto 0); | |
44 | Write : out std_logic_vector(1 downto 0); |
|
44 | Write : out std_logic_vector(1 downto 0); | |
45 | Read : out std_logic_vector(4 downto 0); |
|
45 | Read : out std_logic_vector(4 downto 0); -- | |
46 | ReUse : out std_logic_vector(4 downto 0); |
|
46 | ReUse : out std_logic_vector(4 downto 0); -- | |
47 | Data_OUT : out std_logic_vector((2*Result_SZ)-1 downto 0) |
|
47 | Data_OUT : out std_logic_vector((2*Result_SZ)-1 downto 0) | |
48 | ); |
|
48 | ); | |
49 | end entity; |
|
49 | end entity; |
@@ -262,19 +262,19 BEGIN | |||||
262 | PORT MAP ( |
|
262 | PORT MAP ( | |
263 | clkm => clk, |
|
263 | clkm => clk, | |
264 | rstn => rstn, |
|
264 | rstn => rstn, | |
265 | FifoIN_Full => FifoINT_Full, |
|
265 | FifoIN_Full => FifoINT_Full, -- | |
266 | SetReUse => FFT_ReUse, |
|
266 | SetReUse => FFT_ReUse, -- | |
267 | Valid => Head_Valid, |
|
267 | Valid => Head_Valid, -- HeaderBuilder | |
268 | Data_IN => FifoINT_Data, |
|
268 | Data_IN => FifoINT_Data, -- | |
269 | ACK => DMA_ack, |
|
269 | ACK => DMA_ack, -- HeaderBuilder | |
270 | SM_Write => SM_Wen, |
|
270 | SM_Write => SM_Wen, -- HeaderBuilder | |
271 | FlagError => SM_FlagError, |
|
271 | FlagError => SM_FlagError, -- UNUSED | |
272 | -- Pong => SM_Pong, |
|
272 | -- Pong => SM_Pong, | |
273 | Statu => SM_Param, |
|
273 | Statu => SM_Param, -- HeaderBuilder | |
274 | Write => SM_Write, |
|
274 | Write => SM_Write, -- FIFO MemOut | |
275 | Read => SM_Read, |
|
275 | Read => SM_Read, -- | |
276 | ReUse => SM_ReUse, |
|
276 | ReUse => SM_ReUse, -- | |
277 | Data_OUT => SM_Data); |
|
277 | Data_OUT => SM_Data); -- FIFO MemOut | |
278 | ----------------------------------------------------------------------------- |
|
278 | ----------------------------------------------------------------------------- | |
279 |
|
279 | |||
280 | ----------------------------------------------------------------------------- |
|
280 | ----------------------------------------------------------------------------- |
@@ -169,7 +169,7 BEGIN | |||||
169 | '0'; |
|
169 | '0'; | |
170 |
|
170 | |||
171 | header_check_ok <= '0' WHEN component_type = "1111" ELSE -- ?? component_type_pre = "1111" |
|
171 | header_check_ok <= '0' WHEN component_type = "1111" ELSE -- ?? component_type_pre = "1111" | |
172 |
'1' WHEN component_type = "0000" |
|
172 | '1' WHEN component_type = "0000" ELSE --AND component_type_pre = "0000" ELSE | |
173 | '1' WHEN component_type = component_type_pre + "0001" ELSE |
|
173 | '1' WHEN component_type = component_type_pre + "0001" ELSE | |
174 | '0'; |
|
174 | '0'; | |
175 |
|
175 | |||
@@ -217,7 +217,7 BEGIN | |||||
217 | WHEN IDLE => |
|
217 | WHEN IDLE => | |
218 | debug_reg_s(2 DOWNTO 0) <= "000"; |
|
218 | debug_reg_s(2 DOWNTO 0) <= "000"; | |
219 |
|
219 | |||
220 | matrix_type <= header(1 DOWNTO 0); |
|
220 | --matrix_type <= header(1 DOWNTO 0); | |
221 | --component_type <= header(5 DOWNTO 2); |
|
221 | --component_type <= header(5 DOWNTO 2); | |
222 |
|
222 | |||
223 | ready_matrix_f0_0 <= '0'; |
|
223 | ready_matrix_f0_0 <= '0'; | |
@@ -225,7 +225,7 BEGIN | |||||
225 | ready_matrix_f1 <= '0'; |
|
225 | ready_matrix_f1 <= '0'; | |
226 | ready_matrix_f2 <= '0'; |
|
226 | ready_matrix_f2 <= '0'; | |
227 | error_bad_component_error <= '0'; |
|
227 | error_bad_component_error <= '0'; | |
228 | header_select <= '1'; |
|
228 | --header_select <= '1'; | |
229 |
|
229 | |||
230 | IF header_reg_val = '1' AND fifo_empty = '0' AND send_matrix = '1' THEN |
|
230 | IF header_reg_val = '1' AND fifo_empty = '0' AND send_matrix = '1' THEN | |
231 | header_reg_ack <= '1'; |
|
231 | header_reg_ack <= '1'; | |
@@ -407,7 +407,7 BEGIN | |||||
407 | header_ack <= '0'; |
|
407 | header_ack <= '0'; | |
408 | header_reg <= (OTHERS => '0'); |
|
408 | header_reg <= (OTHERS => '0'); | |
409 | header_reg_val <= '0'; |
|
409 | header_reg_val <= '0'; | |
410 |
ELSIF HCLK' |
|
410 | ELSIF HCLK'EVENT AND HCLK = '1' THEN -- rising clock edge | |
411 | header_ack <= '0'; |
|
411 | header_ack <= '0'; | |
412 |
|
412 | |||
413 | IF header_val = '1' THEN |
|
413 | IF header_val = '1' THEN | |
@@ -428,4 +428,4 BEGIN | |||||
428 |
|
428 | |||
429 | debug_reg_s(3) <= header_error; |
|
429 | debug_reg_s(3) <= header_error; | |
430 |
|
430 | |||
431 | END Behavioral; No newline at end of file |
|
431 | END Behavioral; |
General Comments 0
You need to be logged in to leave comments.
Login now