##// END OF EJS Templates
Changed design MINI-LFR_WFP_MS to SOLO_LFR_MINI-LFR....
Alexis Jeandet -
r656:a69a331fccb2 SOLO_LFR_01-5A (MINI-LFR) default draft
parent child
Show More
@@ -0,0 +1,10
1 SOLO\_LFR\_MINI-LFR is the implementation of Solar Orbiter LFR analyser for the board MINI-LFR.
2
3 You can find information about :
4
5 - MINI-LFR board in the redmine here :
6 [Mini_LFR](https://hephaistos.lpp.polytechnique.fr/redmine/projects/mini-lfr/wiki)
7 - the bistream Generation :
8 [Bitstream_Generation](https://hephaistos.lpp.polytechnique.fr/redmine/projects/vhdlib/wiki/Mini_LFR_-_Bitstream_Generation)
9
10
1 NO CONTENT: file renamed from boards/MINI-LFR/MINI-LFR.sdc to boards/MINI-LFR/MINI-LFR_PlaceAndRoute.sdc
NO CONTENT: file renamed from boards/MINI-LFR/MINI-LFR.sdc to boards/MINI-LFR/MINI-LFR_PlaceAndRoute.sdc
This diff has been collapsed as it changes many lines, (1264 lines changed) Show them Hide them
@@ -1,632 +1,632
1 ------------------------------------------------------------------------------
1 ------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------
18 -------------------------------------------------------------------------------
19 -- Author : Jean-christophe Pellion
19 -- Author : Jean-christophe Pellion
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
21 -------------------------------------------------------------------------------
21 -------------------------------------------------------------------------------
22 LIBRARY IEEE;
22 LIBRARY IEEE;
23 USE IEEE.numeric_std.ALL;
23 USE IEEE.numeric_std.ALL;
24 USE IEEE.std_logic_1164.ALL;
24 USE IEEE.std_logic_1164.ALL;
25 LIBRARY grlib;
25 LIBRARY grlib;
26 USE grlib.amba.ALL;
26 USE grlib.amba.ALL;
27 USE grlib.stdlib.ALL;
27 USE grlib.stdlib.ALL;
28 LIBRARY techmap;
28 LIBRARY techmap;
29 USE techmap.gencomp.ALL;
29 USE techmap.gencomp.ALL;
30 LIBRARY gaisler;
30 LIBRARY gaisler;
31 USE gaisler.memctrl.ALL;
31 USE gaisler.memctrl.ALL;
32 USE gaisler.leon3.ALL;
32 USE gaisler.leon3.ALL;
33 USE gaisler.uart.ALL;
33 USE gaisler.uart.ALL;
34 USE gaisler.misc.ALL;
34 USE gaisler.misc.ALL;
35 USE gaisler.spacewire.ALL;
35 USE gaisler.spacewire.ALL;
36 LIBRARY esa;
36 LIBRARY esa;
37 USE esa.memoryctrl.ALL;
37 USE esa.memoryctrl.ALL;
38 LIBRARY lpp;
38 LIBRARY lpp;
39 USE lpp.lpp_memory.ALL;
39 USE lpp.lpp_memory.ALL;
40 USE lpp.lpp_ad_conv.ALL;
40 USE lpp.lpp_ad_conv.ALL;
41 USE lpp.lpp_lfr_pkg.ALL;
41 USE lpp.lpp_lfr_pkg.ALL;
42 USE lpp.lpp_top_lfr_pkg.ALL;
42 USE lpp.lpp_top_lfr_pkg.ALL;
43 USE lpp.iir_filter.ALL;
43 USE lpp.iir_filter.ALL;
44 USE lpp.general_purpose.ALL;
44 USE lpp.general_purpose.ALL;
45 USE lpp.lpp_lfr_management.ALL;
45 USE lpp.lpp_lfr_management.ALL;
46 USE lpp.lpp_leon3_soc_pkg.ALL;
46 USE lpp.lpp_leon3_soc_pkg.ALL;
47
47
48 ENTITY MINI_LFR_top IS
48 ENTITY MINI_LFR_top IS
49
49
50 PORT (
50 PORT (
51 clk100MHz : IN STD_LOGIC;
51 clk100MHz : IN STD_LOGIC;
52 clk49_152MHz : IN STD_LOGIC;
52 clk49_152MHz : IN STD_LOGIC;
53 reset : IN STD_LOGIC;
53 reset : IN STD_LOGIC;
54 --BPs
54 --BPs
55 BP0 : IN STD_LOGIC;
55 BP0 : IN STD_LOGIC;
56 BP1 : IN STD_LOGIC;
56 BP1 : IN STD_LOGIC;
57 --LEDs
57 --LEDs
58 LED0 : OUT STD_LOGIC;
58 LED0 : OUT STD_LOGIC;
59 LED1 : OUT STD_LOGIC;
59 LED1 : OUT STD_LOGIC;
60 LED2 : OUT STD_LOGIC;
60 LED2 : OUT STD_LOGIC;
61 --UARTs
61 --UARTs
62 TXD1 : IN STD_LOGIC;
62 TXD1 : IN STD_LOGIC;
63 RXD1 : OUT STD_LOGIC;
63 RXD1 : OUT STD_LOGIC;
64 nCTS1 : OUT STD_LOGIC;
64 nCTS1 : OUT STD_LOGIC;
65 nRTS1 : IN STD_LOGIC;
65 nRTS1 : IN STD_LOGIC;
66
66
67 TXD2 : IN STD_LOGIC;
67 TXD2 : IN STD_LOGIC;
68 RXD2 : OUT STD_LOGIC;
68 RXD2 : OUT STD_LOGIC;
69 nCTS2 : OUT STD_LOGIC;
69 nCTS2 : OUT STD_LOGIC;
70 nDTR2 : IN STD_LOGIC;
70 nDTR2 : IN STD_LOGIC;
71 nRTS2 : IN STD_LOGIC;
71 nRTS2 : IN STD_LOGIC;
72 nDCD2 : OUT STD_LOGIC;
72 nDCD2 : OUT STD_LOGIC;
73
73
74 --EXT CONNECTOR
74 --EXT CONNECTOR
75 IO0 : INOUT STD_LOGIC;
75 IO0 : INOUT STD_LOGIC;
76 IO1 : INOUT STD_LOGIC;
76 IO1 : INOUT STD_LOGIC;
77 IO2 : INOUT STD_LOGIC;
77 IO2 : INOUT STD_LOGIC;
78 IO3 : INOUT STD_LOGIC;
78 IO3 : INOUT STD_LOGIC;
79 IO4 : INOUT STD_LOGIC;
79 IO4 : INOUT STD_LOGIC;
80 IO5 : INOUT STD_LOGIC;
80 IO5 : INOUT STD_LOGIC;
81 IO6 : INOUT STD_LOGIC;
81 IO6 : INOUT STD_LOGIC;
82 IO7 : INOUT STD_LOGIC;
82 IO7 : INOUT STD_LOGIC;
83 IO8 : INOUT STD_LOGIC;
83 IO8 : INOUT STD_LOGIC;
84 IO9 : INOUT STD_LOGIC;
84 IO9 : INOUT STD_LOGIC;
85 IO10 : INOUT STD_LOGIC;
85 IO10 : INOUT STD_LOGIC;
86 IO11 : INOUT STD_LOGIC;
86 IO11 : INOUT STD_LOGIC;
87
87
88 --SPACE WIRE
88 --SPACE WIRE
89 SPW_EN : OUT STD_LOGIC; -- 0 => off
89 SPW_EN : OUT STD_LOGIC; -- 0 => off
90 SPW_NOM_DIN : IN STD_LOGIC; -- NOMINAL LINK
90 SPW_NOM_DIN : IN STD_LOGIC; -- NOMINAL LINK
91 SPW_NOM_SIN : IN STD_LOGIC;
91 SPW_NOM_SIN : IN STD_LOGIC;
92 SPW_NOM_DOUT : OUT STD_LOGIC;
92 SPW_NOM_DOUT : OUT STD_LOGIC;
93 SPW_NOM_SOUT : OUT STD_LOGIC;
93 SPW_NOM_SOUT : OUT STD_LOGIC;
94 SPW_RED_DIN : IN STD_LOGIC; -- REDUNDANT LINK
94 SPW_RED_DIN : IN STD_LOGIC; -- REDUNDANT LINK
95 SPW_RED_SIN : IN STD_LOGIC;
95 SPW_RED_SIN : IN STD_LOGIC;
96 SPW_RED_DOUT : OUT STD_LOGIC;
96 SPW_RED_DOUT : OUT STD_LOGIC;
97 SPW_RED_SOUT : OUT STD_LOGIC;
97 SPW_RED_SOUT : OUT STD_LOGIC;
98 -- MINI LFR ADC INPUTS
98 -- MINI LFR ADC INPUTS
99 ADC_nCS : OUT STD_LOGIC;
99 ADC_nCS : OUT STD_LOGIC;
100 ADC_CLK : OUT STD_LOGIC;
100 ADC_CLK : OUT STD_LOGIC;
101 ADC_SDO : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
101 ADC_SDO : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
102
102
103 -- SRAM
103 -- SRAM
104 SRAM_nWE : OUT STD_LOGIC;
104 SRAM_nWE : OUT STD_LOGIC;
105 SRAM_CE : OUT STD_LOGIC;
105 SRAM_CE : OUT STD_LOGIC;
106 SRAM_nOE : OUT STD_LOGIC;
106 SRAM_nOE : OUT STD_LOGIC;
107 SRAM_nBE : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
107 SRAM_nBE : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
108 SRAM_A : OUT STD_LOGIC_VECTOR(19 DOWNTO 0);
108 SRAM_A : OUT STD_LOGIC_VECTOR(19 DOWNTO 0);
109 SRAM_DQ : INOUT STD_LOGIC_VECTOR(31 DOWNTO 0)
109 SRAM_DQ : INOUT STD_LOGIC_VECTOR(31 DOWNTO 0)
110 );
110 );
111
111
112 END MINI_LFR_top;
112 END MINI_LFR_top;
113
113
114
114
115 ARCHITECTURE beh OF MINI_LFR_top IS
115 ARCHITECTURE beh OF MINI_LFR_top IS
116
116
117 --==========================================================================
117 --==========================================================================
118 -- USE_IAP_MEMCTRL allow to use the srctrle-0ws on MINILFR board
118 -- USE_IAP_MEMCTRL allow to use the srctrle-0ws on MINILFR board
119 -- when enabled, chip enable polarity should be reversed and bank size also
119 -- when enabled, chip enable polarity should be reversed and bank size also
120 -- MINILFR -> 1 bank of 4MBytes -> SRBANKSZ=9
120 -- MINILFR -> 1 bank of 4MBytes -> SRBANKSZ=9
121 -- LFR EQM & FM -> 2 banks of 2MBytes -> SRBANKSZ=8
121 -- LFR EQM & FM -> 2 banks of 2MBytes -> SRBANKSZ=8
122 --==========================================================================
122 --==========================================================================
123 CONSTANT USE_IAP_MEMCTRL : integer := 1;
123 CONSTANT USE_IAP_MEMCTRL : integer := 1;
124 --==========================================================================
124 --==========================================================================
125
125
126 SIGNAL clk_50_s : STD_LOGIC := '0';
126 SIGNAL clk_50_s : STD_LOGIC := '0';
127 SIGNAL clk_25 : STD_LOGIC := '0';
127 SIGNAL clk_25 : STD_LOGIC := '0';
128 SIGNAL clk_24 : STD_LOGIC := '0';
128 SIGNAL clk_24 : STD_LOGIC := '0';
129 -----------------------------------------------------------------------------
129 -----------------------------------------------------------------------------
130 SIGNAL coarse_time : STD_LOGIC_VECTOR(31 DOWNTO 0);
130 SIGNAL coarse_time : STD_LOGIC_VECTOR(31 DOWNTO 0);
131 SIGNAL fine_time : STD_LOGIC_VECTOR(15 DOWNTO 0);
131 SIGNAL fine_time : STD_LOGIC_VECTOR(15 DOWNTO 0);
132 --
132 --
133 SIGNAL errorn : STD_LOGIC;
133 SIGNAL errorn : STD_LOGIC;
134 --
134 --
135 SIGNAL I00_s : STD_LOGIC;
135 SIGNAL I00_s : STD_LOGIC;
136
136
137 -- CONSTANTS
137 -- CONSTANTS
138 CONSTANT CFG_PADTECH : INTEGER := inferred;
138 CONSTANT CFG_PADTECH : INTEGER := inferred;
139 --
139 --
140 CONSTANT NB_APB_SLAVE : INTEGER := 11; -- 3 = grspw + waveform picker + time manager, 11 allows pindex = f
140 CONSTANT NB_APB_SLAVE : INTEGER := 11; -- 3 = grspw + waveform picker + time manager, 11 allows pindex = f
141 CONSTANT NB_AHB_SLAVE : INTEGER := 1;
141 CONSTANT NB_AHB_SLAVE : INTEGER := 1;
142 CONSTANT NB_AHB_MASTER : INTEGER := 2; -- 2 = grspw + waveform picker
142 CONSTANT NB_AHB_MASTER : INTEGER := 2; -- 2 = grspw + waveform picker
143
143
144 SIGNAL apbi_ext : apb_slv_in_type;
144 SIGNAL apbi_ext : apb_slv_in_type;
145 SIGNAL apbo_ext : soc_apb_slv_out_vector(NB_APB_SLAVE-1+5 DOWNTO 5); -- := (OTHERS => apb_none);
145 SIGNAL apbo_ext : soc_apb_slv_out_vector(NB_APB_SLAVE-1+5 DOWNTO 5); -- := (OTHERS => apb_none);
146 SIGNAL ahbi_s_ext : ahb_slv_in_type;
146 SIGNAL ahbi_s_ext : ahb_slv_in_type;
147 SIGNAL ahbo_s_ext : soc_ahb_slv_out_vector(NB_AHB_SLAVE-1+3 DOWNTO 3); -- := (OTHERS => ahbs_none);
147 SIGNAL ahbo_s_ext : soc_ahb_slv_out_vector(NB_AHB_SLAVE-1+3 DOWNTO 3); -- := (OTHERS => ahbs_none);
148 SIGNAL ahbi_m_ext : AHB_Mst_In_Type;
148 SIGNAL ahbi_m_ext : AHB_Mst_In_Type;
149 SIGNAL ahbo_m_ext : soc_ahb_mst_out_vector(NB_AHB_MASTER-1+1 DOWNTO 1); -- := (OTHERS => ahbm_none);
149 SIGNAL ahbo_m_ext : soc_ahb_mst_out_vector(NB_AHB_MASTER-1+1 DOWNTO 1); -- := (OTHERS => ahbm_none);
150
150
151 -- Spacewire signals
151 -- Spacewire signals
152 SIGNAL dtmp : STD_LOGIC_VECTOR(1 DOWNTO 0);
152 SIGNAL dtmp : STD_LOGIC_VECTOR(1 DOWNTO 0);
153 SIGNAL stmp : STD_LOGIC_VECTOR(1 DOWNTO 0);
153 SIGNAL stmp : STD_LOGIC_VECTOR(1 DOWNTO 0);
154 SIGNAL spw_rxclk : STD_LOGIC_VECTOR(1 DOWNTO 0);
154 SIGNAL spw_rxclk : STD_LOGIC_VECTOR(1 DOWNTO 0);
155 SIGNAL spw_rxtxclk : STD_ULOGIC;
155 SIGNAL spw_rxtxclk : STD_ULOGIC;
156 SIGNAL spw_rxclkn : STD_ULOGIC;
156 SIGNAL spw_rxclkn : STD_ULOGIC;
157 SIGNAL spw_clk : STD_LOGIC;
157 SIGNAL spw_clk : STD_LOGIC;
158 SIGNAL swni : grspw_in_type;
158 SIGNAL swni : grspw_in_type;
159 SIGNAL swno : grspw_out_type;
159 SIGNAL swno : grspw_out_type;
160
160
161 --GPIO
161 --GPIO
162 SIGNAL gpioi : gpio_in_type;
162 SIGNAL gpioi : gpio_in_type;
163 SIGNAL gpioo : gpio_out_type;
163 SIGNAL gpioo : gpio_out_type;
164
164
165 -- AD Converter ADS7886
165 -- AD Converter ADS7886
166 SIGNAL sample : Samples14v(7 DOWNTO 0);
166 SIGNAL sample : Samples14v(7 DOWNTO 0);
167 SIGNAL sample_s : Samples(7 DOWNTO 0);
167 SIGNAL sample_s : Samples(7 DOWNTO 0);
168 SIGNAL sample_val : STD_LOGIC;
168 SIGNAL sample_val : STD_LOGIC;
169 SIGNAL ADC_nCS_sig : STD_LOGIC;
169 SIGNAL ADC_nCS_sig : STD_LOGIC;
170 SIGNAL ADC_CLK_sig : STD_LOGIC;
170 SIGNAL ADC_CLK_sig : STD_LOGIC;
171 SIGNAL ADC_SDO_sig : STD_LOGIC_VECTOR(7 DOWNTO 0);
171 SIGNAL ADC_SDO_sig : STD_LOGIC_VECTOR(7 DOWNTO 0);
172
172
173 SIGNAL bias_fail_sw_sig : STD_LOGIC;
173 SIGNAL bias_fail_sw_sig : STD_LOGIC;
174
174
175 SIGNAL observation_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
175 SIGNAL observation_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
176 SIGNAL observation_vector_0 : STD_LOGIC_VECTOR(11 DOWNTO 0);
176 SIGNAL observation_vector_0 : STD_LOGIC_VECTOR(11 DOWNTO 0);
177 SIGNAL observation_vector_1 : STD_LOGIC_VECTOR(11 DOWNTO 0);
177 SIGNAL observation_vector_1 : STD_LOGIC_VECTOR(11 DOWNTO 0);
178 -----------------------------------------------------------------------------
178 -----------------------------------------------------------------------------
179
179
180 SIGNAL LFR_soft_rstn : STD_LOGIC;
180 SIGNAL LFR_soft_rstn : STD_LOGIC;
181 SIGNAL LFR_rstn : STD_LOGIC;
181 SIGNAL LFR_rstn : STD_LOGIC;
182
182
183
183
184 SIGNAL rstn_25 : STD_LOGIC;
184 SIGNAL rstn_25 : STD_LOGIC;
185 SIGNAL rstn_25_d1 : STD_LOGIC;
185 SIGNAL rstn_25_d1 : STD_LOGIC;
186 SIGNAL rstn_25_d2 : STD_LOGIC;
186 SIGNAL rstn_25_d2 : STD_LOGIC;
187 SIGNAL rstn_25_d3 : STD_LOGIC;
187 SIGNAL rstn_25_d3 : STD_LOGIC;
188
188
189 SIGNAL rstn_24 : STD_LOGIC;
189 SIGNAL rstn_24 : STD_LOGIC;
190 SIGNAL rstn_24_d1 : STD_LOGIC;
190 SIGNAL rstn_24_d1 : STD_LOGIC;
191 SIGNAL rstn_24_d2 : STD_LOGIC;
191 SIGNAL rstn_24_d2 : STD_LOGIC;
192 SIGNAL rstn_24_d3 : STD_LOGIC;
192 SIGNAL rstn_24_d3 : STD_LOGIC;
193
193
194 SIGNAL rstn_50 : STD_LOGIC;
194 SIGNAL rstn_50 : STD_LOGIC;
195 SIGNAL rstn_50_d1 : STD_LOGIC;
195 SIGNAL rstn_50_d1 : STD_LOGIC;
196 SIGNAL rstn_50_d2 : STD_LOGIC;
196 SIGNAL rstn_50_d2 : STD_LOGIC;
197 SIGNAL rstn_50_d3 : STD_LOGIC;
197 SIGNAL rstn_50_d3 : STD_LOGIC;
198
198
199 SIGNAL lfr_debug_vector : STD_LOGIC_VECTOR(11 DOWNTO 0);
199 SIGNAL lfr_debug_vector : STD_LOGIC_VECTOR(11 DOWNTO 0);
200 SIGNAL lfr_debug_vector_ms : STD_LOGIC_VECTOR(11 DOWNTO 0);
200 SIGNAL lfr_debug_vector_ms : STD_LOGIC_VECTOR(11 DOWNTO 0);
201
201
202 --
202 --
203 SIGNAL SRAM_CE_s : STD_LOGIC_VECTOR(1 DOWNTO 0);
203 SIGNAL SRAM_CE_s : STD_LOGIC_VECTOR(1 DOWNTO 0);
204
204
205 --
205 --
206 SIGNAL sample_hk : STD_LOGIC_VECTOR(15 DOWNTO 0);
206 SIGNAL sample_hk : STD_LOGIC_VECTOR(15 DOWNTO 0);
207 SIGNAL HK_SEL : STD_LOGIC_VECTOR(1 DOWNTO 0);
207 SIGNAL HK_SEL : STD_LOGIC_VECTOR(1 DOWNTO 0);
208
208
209 SIGNAL nSRAM_READY : STD_LOGIC;
209 SIGNAL nSRAM_READY : STD_LOGIC;
210
210
211 BEGIN -- beh
211 BEGIN -- beh
212
212
213 -----------------------------------------------------------------------------
213 -----------------------------------------------------------------------------
214 PROCESS (clk100MHz, reset)
214 PROCESS (clk100MHz, reset)
215 BEGIN -- PROCESS
215 BEGIN -- PROCESS
216 IF clk100MHz'EVENT AND clk100MHz = '1' THEN -- rising clock edge
216 IF clk100MHz'EVENT AND clk100MHz = '1' THEN -- rising clock edge
217 clk_50_s <= NOT clk_50_s;
217 clk_50_s <= NOT clk_50_s;
218 END IF;
218 END IF;
219 END PROCESS;
219 END PROCESS;
220 -----------------------------------------------------------------------------
220 -----------------------------------------------------------------------------
221
221
222 PROCESS (clk_50_s, reset)
222 PROCESS (clk_50_s, reset)
223 BEGIN -- PROCESS
223 BEGIN -- PROCESS
224 IF reset = '0' THEN -- asynchronous reset (active low)
224 IF reset = '0' THEN -- asynchronous reset (active low)
225 clk_25 <= '0';
225 clk_25 <= '0';
226 rstn_25 <= '0';
226 rstn_25 <= '0';
227 rstn_25_d1 <= '0';
227 rstn_25_d1 <= '0';
228 rstn_25_d2 <= '0';
228 rstn_25_d2 <= '0';
229 rstn_25_d3 <= '0';
229 rstn_25_d3 <= '0';
230 ELSIF clk_50_s'EVENT AND clk_50_s = '1' THEN -- rising clock edge
230 ELSIF clk_50_s'EVENT AND clk_50_s = '1' THEN -- rising clock edge
231 clk_25 <= NOT clk_25;
231 clk_25 <= NOT clk_25;
232 rstn_25_d1 <= '1';
232 rstn_25_d1 <= '1';
233 rstn_25_d2 <= rstn_25_d1;
233 rstn_25_d2 <= rstn_25_d1;
234 rstn_25_d3 <= rstn_25_d2;
234 rstn_25_d3 <= rstn_25_d2;
235 rstn_25 <= rstn_25_d3;
235 rstn_25 <= rstn_25_d3;
236 END IF;
236 END IF;
237 END PROCESS;
237 END PROCESS;
238
238
239 PROCESS (clk49_152MHz, reset)
239 PROCESS (clk49_152MHz, reset)
240 BEGIN -- PROCESS
240 BEGIN -- PROCESS
241 IF reset = '0' THEN -- asynchronous reset (active low)
241 IF reset = '0' THEN -- asynchronous reset (active low)
242 clk_24 <= '0';
242 clk_24 <= '0';
243 rstn_24_d1 <= '0';
243 rstn_24_d1 <= '0';
244 rstn_24_d2 <= '0';
244 rstn_24_d2 <= '0';
245 rstn_24_d3 <= '0';
245 rstn_24_d3 <= '0';
246 rstn_24 <= '0';
246 rstn_24 <= '0';
247 ELSIF clk49_152MHz'EVENT AND clk49_152MHz = '1' THEN -- rising clock edge
247 ELSIF clk49_152MHz'EVENT AND clk49_152MHz = '1' THEN -- rising clock edge
248 clk_24 <= NOT clk_24;
248 clk_24 <= NOT clk_24;
249 rstn_24_d1 <= '1';
249 rstn_24_d1 <= '1';
250 rstn_24_d2 <= rstn_24_d1;
250 rstn_24_d2 <= rstn_24_d1;
251 rstn_24_d3 <= rstn_24_d2;
251 rstn_24_d3 <= rstn_24_d2;
252 rstn_24 <= rstn_24_d3;
252 rstn_24 <= rstn_24_d3;
253 END IF;
253 END IF;
254 END PROCESS;
254 END PROCESS;
255
255
256 -----------------------------------------------------------------------------
256 -----------------------------------------------------------------------------
257
257
258 PROCESS (clk_25, rstn_25)
258 PROCESS (clk_25, rstn_25)
259 BEGIN -- PROCESS
259 BEGIN -- PROCESS
260 IF rstn_25 = '0' THEN -- asynchronous reset (active low)
260 IF rstn_25 = '0' THEN -- asynchronous reset (active low)
261 LED0 <= '0';
261 LED0 <= '0';
262 LED1 <= '0';
262 LED1 <= '0';
263 LED2 <= '0';
263 LED2 <= '0';
264 ELSIF clk_25'EVENT AND clk_25 = '1' THEN -- rising clock edge
264 ELSIF clk_25'EVENT AND clk_25 = '1' THEN -- rising clock edge
265 LED0 <= '0';
265 LED0 <= '0';
266 LED1 <= '1';
266 LED1 <= '1';
267 LED2 <= BP0 OR BP1 OR nDTR2 OR nRTS2 OR nRTS1;
267 LED2 <= BP0 OR BP1 OR nDTR2 OR nRTS2 OR nRTS1;
268 END IF;
268 END IF;
269 END PROCESS;
269 END PROCESS;
270
270
271 PROCESS (clk49_152MHz, rstn_24)
271 PROCESS (clk49_152MHz, rstn_24)
272 BEGIN -- PROCESS
272 BEGIN -- PROCESS
273 IF rstn_24 = '0' THEN -- asynchronous reset (active low)
273 IF rstn_24 = '0' THEN -- asynchronous reset (active low)
274 I00_s <= '0';
274 I00_s <= '0';
275 ELSIF clk49_152MHz'EVENT AND clk49_152MHz = '1' THEN -- rising clock edge
275 ELSIF clk49_152MHz'EVENT AND clk49_152MHz = '1' THEN -- rising clock edge
276 I00_s <= NOT I00_s;
276 I00_s <= NOT I00_s;
277 END IF;
277 END IF;
278 END PROCESS;
278 END PROCESS;
279
279
280 --UARTs
280 --UARTs
281 nCTS1 <= '1';
281 nCTS1 <= '1';
282 nCTS2 <= '1';
282 nCTS2 <= '1';
283 nDCD2 <= '1';
283 nDCD2 <= '1';
284 -- No AHB UART
284 -- No AHB UART
285 RXD1 <= TXD1;
285 RXD1 <= TXD1;
286
286
287 --
287 --
288
288
289 leon3_soc_1 : leon3_soc
289 leon3_soc_1 : leon3_soc
290 GENERIC MAP (
290 GENERIC MAP (
291 fabtech => apa3e,
291 fabtech => apa3e,
292 memtech => apa3e,
292 memtech => apa3e,
293 padtech => inferred,
293 padtech => inferred,
294 clktech => inferred,
294 clktech => inferred,
295 disas => 0,
295 disas => 0,
296 dbguart => 0,
296 dbguart => 0,
297 pclow => 2,
297 pclow => 2,
298 clk_freq => 25000,
298 clk_freq => 25000,
299 IS_RADHARD => 0,
299 IS_RADHARD => 0,
300 NB_CPU => 1,
300 NB_CPU => 1,
301 ENABLE_FPU => 1,
301 ENABLE_FPU => 1,
302 FPU_NETLIST => 0,
302 FPU_NETLIST => 0,
303 ENABLE_DSU => 1,
303 ENABLE_DSU => 1,
304 ENABLE_AHB_UART => 0,
304 ENABLE_AHB_UART => 0,
305 ENABLE_APB_UART => 1,
305 ENABLE_APB_UART => 1,
306 ENABLE_IRQMP => 1,
306 ENABLE_IRQMP => 1,
307 ENABLE_GPT => 1,
307 ENABLE_GPT => 1,
308 NB_AHB_MASTER => NB_AHB_MASTER,
308 NB_AHB_MASTER => NB_AHB_MASTER,
309 NB_AHB_SLAVE => NB_AHB_SLAVE,
309 NB_AHB_SLAVE => NB_AHB_SLAVE,
310 NB_APB_SLAVE => NB_APB_SLAVE,
310 NB_APB_SLAVE => NB_APB_SLAVE,
311 ADDRESS_SIZE => 20,
311 ADDRESS_SIZE => 20,
312 USES_IAP_MEMCTRLR => USE_IAP_MEMCTRL,
312 USES_IAP_MEMCTRLR => USE_IAP_MEMCTRL,
313 BYPASS_EDAC_MEMCTRLR => '0',
313 BYPASS_EDAC_MEMCTRLR => '0',
314 SRBANKSZ => 9)
314 SRBANKSZ => 9)
315 PORT MAP (
315 PORT MAP (
316 clk => clk_25,
316 clk => clk_25,
317 reset => rstn_25,
317 reset => rstn_25,
318 errorn => errorn,
318 errorn => errorn,
319 ahbrxd => OPEN,--TXD1,
319 ahbrxd => OPEN,--TXD1,
320 ahbtxd => OPEN,--RXD1,
320 ahbtxd => OPEN,--RXD1,
321 urxd1 => TXD2,
321 urxd1 => TXD2,
322 utxd1 => RXD2,
322 utxd1 => RXD2,
323 address => SRAM_A,
323 address => SRAM_A,
324 data => SRAM_DQ,
324 data => SRAM_DQ,
325 nSRAM_BE0 => SRAM_nBE(0),
325 nSRAM_BE0 => SRAM_nBE(0),
326 nSRAM_BE1 => SRAM_nBE(1),
326 nSRAM_BE1 => SRAM_nBE(1),
327 nSRAM_BE2 => SRAM_nBE(2),
327 nSRAM_BE2 => SRAM_nBE(2),
328 nSRAM_BE3 => SRAM_nBE(3),
328 nSRAM_BE3 => SRAM_nBE(3),
329 nSRAM_WE => SRAM_nWE,
329 nSRAM_WE => SRAM_nWE,
330 nSRAM_CE => SRAM_CE_s,
330 nSRAM_CE => SRAM_CE_s,
331 nSRAM_OE => SRAM_nOE,
331 nSRAM_OE => SRAM_nOE,
332 nSRAM_READY => nSRAM_READY,
332 nSRAM_READY => nSRAM_READY,
333 SRAM_MBE => OPEN,
333 SRAM_MBE => OPEN,
334 apbi_ext => apbi_ext,
334 apbi_ext => apbi_ext,
335 apbo_ext => apbo_ext,
335 apbo_ext => apbo_ext,
336 ahbi_s_ext => ahbi_s_ext,
336 ahbi_s_ext => ahbi_s_ext,
337 ahbo_s_ext => ahbo_s_ext,
337 ahbo_s_ext => ahbo_s_ext,
338 ahbi_m_ext => ahbi_m_ext,
338 ahbi_m_ext => ahbi_m_ext,
339 ahbo_m_ext => ahbo_m_ext);
339 ahbo_m_ext => ahbo_m_ext);
340
340
341 PROCESS (clk_25, rstn_25)
341 PROCESS (clk_25, rstn_25)
342 BEGIN -- PROCESS
342 BEGIN -- PROCESS
343 IF rstn_25 = '0' THEN -- asynchronous reset (active low)
343 IF rstn_25 = '0' THEN -- asynchronous reset (active low)
344 nSRAM_READY <= '1';
344 nSRAM_READY <= '1';
345 ELSIF clk_25'event AND clk_25 = '1' THEN -- rising clock edge
345 ELSIF clk_25'event AND clk_25 = '1' THEN -- rising clock edge
346 nSRAM_READY <= '1';
346 nSRAM_READY <= '1';
347 IF IO0 = '1' THEN
347 IF IO0 = '1' THEN
348 nSRAM_READY <= '0';
348 nSRAM_READY <= '0';
349 END IF;
349 END IF;
350 END IF;
350 END IF;
351 END PROCESS;
351 END PROCESS;
352
352
353
353
354
354
355 IAP:if USE_IAP_MEMCTRL = 1 GENERATE
355 IAP:if USE_IAP_MEMCTRL = 1 GENERATE
356 SRAM_CE <= not SRAM_CE_s(0);
356 SRAM_CE <= not SRAM_CE_s(0);
357 END GENERATE;
357 END GENERATE;
358
358
359 NOIAP:if USE_IAP_MEMCTRL = 0 GENERATE
359 NOIAP:if USE_IAP_MEMCTRL = 0 GENERATE
360 SRAM_CE <= SRAM_CE_s(0);
360 SRAM_CE <= SRAM_CE_s(0);
361 END GENERATE;
361 END GENERATE;
362 -------------------------------------------------------------------------------
362 -------------------------------------------------------------------------------
363 -- APB_LFR_MANAGEMENT ---------------------------------------------------------
363 -- APB_LFR_MANAGEMENT ---------------------------------------------------------
364 -------------------------------------------------------------------------------
364 -------------------------------------------------------------------------------
365 apb_lfr_management_1 : apb_lfr_management
365 apb_lfr_management_1 : apb_lfr_management
366 GENERIC MAP (
366 GENERIC MAP (
367 tech => apa3e,
367 tech => apa3e,
368 pindex => 6,
368 pindex => 6,
369 paddr => 6,
369 paddr => 6,
370 pmask => 16#fff#,
370 pmask => 16#fff#,
371 NB_SECOND_DESYNC => 60) -- 60 secondes of desynchronization before CoarseTime's MSB is Set
371 NB_SECOND_DESYNC => 60) -- 60 secondes of desynchronization before CoarseTime's MSB is Set
372 PORT MAP (
372 PORT MAP (
373 clk25MHz => clk_25,
373 clk25MHz => clk_25,
374 resetn_25MHz => rstn_25,
374 resetn_25MHz => rstn_25,
375 grspw_tick => swno.tickout,
375 grspw_tick => swno.tickout,
376 apbi => apbi_ext,
376 apbi => apbi_ext,
377 apbo => apbo_ext(6),
377 apbo => apbo_ext(6),
378 HK_sample => sample_hk,
378 HK_sample => sample_hk,
379 HK_val => sample_val,
379 HK_val => sample_val,
380 HK_sel => HK_SEL,
380 HK_sel => HK_SEL,
381 DAC_SDO => OPEN,
381 DAC_SDO => OPEN,
382 DAC_SCK => OPEN,
382 DAC_SCK => OPEN,
383 DAC_SYNC => OPEN,
383 DAC_SYNC => OPEN,
384 DAC_CAL_EN => OPEN,
384 DAC_CAL_EN => OPEN,
385 coarse_time => coarse_time,
385 coarse_time => coarse_time,
386 fine_time => fine_time,
386 fine_time => fine_time,
387 LFR_soft_rstn => LFR_soft_rstn
387 LFR_soft_rstn => LFR_soft_rstn
388 );
388 );
389
389
390 -----------------------------------------------------------------------
390 -----------------------------------------------------------------------
391 --- SpaceWire --------------------------------------------------------
391 --- SpaceWire --------------------------------------------------------
392 -----------------------------------------------------------------------
392 -----------------------------------------------------------------------
393
393
394 SPW_EN <= '1';
394 SPW_EN <= '1';
395
395
396 spw_clk <= clk_50_s;
396 spw_clk <= clk_50_s;
397 spw_rxtxclk <= spw_clk;
397 spw_rxtxclk <= spw_clk;
398 spw_rxclkn <= NOT spw_rxtxclk;
398 spw_rxclkn <= NOT spw_rxtxclk;
399
399
400 -- PADS for SPW1
400 -- PADS for SPW1
401 spw1_rxd_pad : inpad GENERIC MAP (tech => inferred)
401 spw1_rxd_pad : inpad GENERIC MAP (tech => inferred)
402 PORT MAP (SPW_NOM_DIN, dtmp(0));
402 PORT MAP (SPW_NOM_DIN, dtmp(0));
403 spw1_rxs_pad : inpad GENERIC MAP (tech => inferred)
403 spw1_rxs_pad : inpad GENERIC MAP (tech => inferred)
404 PORT MAP (SPW_NOM_SIN, stmp(0));
404 PORT MAP (SPW_NOM_SIN, stmp(0));
405 spw1_txd_pad : outpad GENERIC MAP (tech => inferred)
405 spw1_txd_pad : outpad GENERIC MAP (tech => inferred)
406 PORT MAP (SPW_NOM_DOUT, swno.d(0));
406 PORT MAP (SPW_NOM_DOUT, swno.d(0));
407 spw1_txs_pad : outpad GENERIC MAP (tech => inferred)
407 spw1_txs_pad : outpad GENERIC MAP (tech => inferred)
408 PORT MAP (SPW_NOM_SOUT, swno.s(0));
408 PORT MAP (SPW_NOM_SOUT, swno.s(0));
409 -- PADS FOR SPW2
409 -- PADS FOR SPW2
410 spw2_rxd_pad : inpad GENERIC MAP (tech => inferred) -- bad naming of the MINI-LFR /!\
410 spw2_rxd_pad : inpad GENERIC MAP (tech => inferred) -- bad naming of the MINI-LFR /!\
411 PORT MAP (SPW_RED_SIN, dtmp(1));
411 PORT MAP (SPW_RED_SIN, dtmp(1));
412 spw2_rxs_pad : inpad GENERIC MAP (tech => inferred) -- bad naming of the MINI-LFR /!\
412 spw2_rxs_pad : inpad GENERIC MAP (tech => inferred) -- bad naming of the MINI-LFR /!\
413 PORT MAP (SPW_RED_DIN, stmp(1));
413 PORT MAP (SPW_RED_DIN, stmp(1));
414 spw2_txd_pad : outpad GENERIC MAP (tech => inferred)
414 spw2_txd_pad : outpad GENERIC MAP (tech => inferred)
415 PORT MAP (SPW_RED_DOUT, swno.d(1));
415 PORT MAP (SPW_RED_DOUT, swno.d(1));
416 spw2_txs_pad : outpad GENERIC MAP (tech => inferred)
416 spw2_txs_pad : outpad GENERIC MAP (tech => inferred)
417 PORT MAP (SPW_RED_SOUT, swno.s(1));
417 PORT MAP (SPW_RED_SOUT, swno.s(1));
418
418
419 -- GRSPW PHY
419 -- GRSPW PHY
420 spw_inputloop : FOR j IN 0 TO 1 GENERATE
420 spw_inputloop : FOR j IN 0 TO 1 GENERATE
421 spw_phy0 : grspw_phy
421 spw_phy0 : grspw_phy
422 GENERIC MAP(
422 GENERIC MAP(
423 tech => apa3e,
423 tech => apa3e,
424 rxclkbuftype => 1,
424 rxclkbuftype => 1,
425 scantest => 0)
425 scantest => 0)
426 PORT MAP(
426 PORT MAP(
427 rxrst => swno.rxrst,
427 rxrst => swno.rxrst,
428 di => dtmp(j),
428 di => dtmp(j),
429 si => stmp(j),
429 si => stmp(j),
430 rxclko => spw_rxclk(j),
430 rxclko => spw_rxclk(j),
431 do => swni.d(j),
431 do => swni.d(j),
432 ndo => swni.nd(j*5+4 DOWNTO j*5),
432 ndo => swni.nd(j*5+4 DOWNTO j*5),
433 dconnect => swni.dconnect(j*2+1 DOWNTO j*2));
433 dconnect => swni.dconnect(j*2+1 DOWNTO j*2));
434 END GENERATE spw_inputloop;
434 END GENERATE spw_inputloop;
435
435
436 swni.rmapnodeaddr <= (OTHERS => '0');
436 swni.rmapnodeaddr <= (OTHERS => '0');
437
437
438 -- SPW core
438 -- SPW core
439 sw0 : grspwm GENERIC MAP(
439 sw0 : grspwm GENERIC MAP(
440 tech => apa3e,
440 tech => apa3e,
441 hindex => 1,
441 hindex => 1,
442 pindex => 5,
442 pindex => 5,
443 paddr => 5,
443 paddr => 5,
444 pirq => 11,
444 pirq => 11,
445 sysfreq => 25000, -- CPU_FREQ
445 sysfreq => 25000, -- CPU_FREQ
446 rmap => 1,
446 rmap => 1,
447 rmapcrc => 1,
447 rmapcrc => 1,
448 fifosize1 => 16,
448 fifosize1 => 16,
449 fifosize2 => 16,
449 fifosize2 => 16,
450 rxclkbuftype => 1,
450 rxclkbuftype => 1,
451 rxunaligned => 0,
451 rxunaligned => 0,
452 rmapbufs => 4,
452 rmapbufs => 4,
453 ft => 0,
453 ft => 0,
454 netlist => 0,
454 netlist => 0,
455 ports => 2,
455 ports => 2,
456 --dmachan => CFG_SPW_DMACHAN, -- not used byt the spw core 1
456 --dmachan => CFG_SPW_DMACHAN, -- not used byt the spw core 1
457 memtech => apa3e,
457 memtech => apa3e,
458 destkey => 2,
458 destkey => 2,
459 spwcore => 1
459 spwcore => 1
460 --input_type => CFG_SPW_INPUT, -- not used byt the spw core 1
460 --input_type => CFG_SPW_INPUT, -- not used byt the spw core 1
461 --output_type => CFG_SPW_OUTPUT, -- not used byt the spw core 1
461 --output_type => CFG_SPW_OUTPUT, -- not used byt the spw core 1
462 --rxtx_sameclk => CFG_SPW_RTSAME -- not used byt the spw core 1
462 --rxtx_sameclk => CFG_SPW_RTSAME -- not used byt the spw core 1
463 )
463 )
464 PORT MAP(rstn_25, clk_25, spw_rxclk(0),
464 PORT MAP(rstn_25, clk_25, spw_rxclk(0),
465 spw_rxclk(1), spw_rxtxclk, spw_rxtxclk,
465 spw_rxclk(1), spw_rxtxclk, spw_rxtxclk,
466 ahbi_m_ext, ahbo_m_ext(1), apbi_ext, apbo_ext(5),
466 ahbi_m_ext, ahbo_m_ext(1), apbi_ext, apbo_ext(5),
467 swni, swno);
467 swni, swno);
468
468
469 swni.tickin <= '0';
469 swni.tickin <= '0';
470 swni.rmapen <= '1';
470 swni.rmapen <= '1';
471 swni.clkdiv10 <= "00000100"; -- 10 MHz / (4 + 1) = 10 MHz
471 swni.clkdiv10 <= "00000100"; -- 10 MHz / (4 + 1) = 10 MHz
472 swni.tickinraw <= '0';
472 swni.tickinraw <= '0';
473 swni.timein <= (OTHERS => '0');
473 swni.timein <= (OTHERS => '0');
474 swni.dcrstval <= (OTHERS => '0');
474 swni.dcrstval <= (OTHERS => '0');
475 swni.timerrstval <= (OTHERS => '0');
475 swni.timerrstval <= (OTHERS => '0');
476
476
477 -------------------------------------------------------------------------------
477 -------------------------------------------------------------------------------
478 -- LFR ------------------------------------------------------------------------
478 -- LFR ------------------------------------------------------------------------
479 -------------------------------------------------------------------------------
479 -------------------------------------------------------------------------------
480
480
481
481
482 LFR_rstn <= LFR_soft_rstn AND rstn_25;
482 LFR_rstn <= LFR_soft_rstn AND rstn_25;
483
483
484 lpp_lfr_1 : lpp_lfr
484 lpp_lfr_1 : lpp_lfr
485 GENERIC MAP (
485 GENERIC MAP (
486 Mem_use => use_RAM,
486 Mem_use => use_RAM,
487 nb_data_by_buffer_size => 32,
487 nb_data_by_buffer_size => 32,
488 nb_snapshot_param_size => 32,
488 nb_snapshot_param_size => 32,
489 delta_vector_size => 32,
489 delta_vector_size => 32,
490 delta_vector_size_f0_2 => 7, -- log2(96)
490 delta_vector_size_f0_2 => 7, -- log2(96)
491 pindex => 15,
491 pindex => 15,
492 paddr => 15,
492 paddr => 15,
493 pmask => 16#fff#,
493 pmask => 16#fff#,
494 pirq_ms => 6,
494 pirq_ms => 6,
495 pirq_wfp => 14,
495 pirq_wfp => 14,
496 hindex => 2,
496 hindex => 2,
497 top_lfr_version => X"000159") -- aa.bb.cc version
497 top_lfr_version => LPP_LFR_BOARD_MINI_LFR & X"015A") -- aa.bb.cc version
498 PORT MAP (
498 PORT MAP (
499 clk => clk_25,
499 clk => clk_25,
500 rstn => LFR_rstn,
500 rstn => LFR_rstn,
501 sample_B => sample_s(2 DOWNTO 0),
501 sample_B => sample_s(2 DOWNTO 0),
502 sample_E => sample_s(7 DOWNTO 3),
502 sample_E => sample_s(7 DOWNTO 3),
503 sample_val => sample_val,
503 sample_val => sample_val,
504 apbi => apbi_ext,
504 apbi => apbi_ext,
505 apbo => apbo_ext(15),
505 apbo => apbo_ext(15),
506 ahbi => ahbi_m_ext,
506 ahbi => ahbi_m_ext,
507 ahbo => ahbo_m_ext(2),
507 ahbo => ahbo_m_ext(2),
508 coarse_time => coarse_time,
508 coarse_time => coarse_time,
509 fine_time => fine_time,
509 fine_time => fine_time,
510 data_shaping_BW => bias_fail_sw_sig,
510 data_shaping_BW => bias_fail_sw_sig,
511 debug_vector => lfr_debug_vector,
511 debug_vector => lfr_debug_vector,
512 debug_vector_ms => lfr_debug_vector_ms
512 debug_vector_ms => lfr_debug_vector_ms
513 );
513 );
514
514
515 observation_reg(11 DOWNTO 0) <= lfr_debug_vector;
515 observation_reg(11 DOWNTO 0) <= lfr_debug_vector;
516 observation_reg(31 DOWNTO 12) <= (OTHERS => '0');
516 observation_reg(31 DOWNTO 12) <= (OTHERS => '0');
517 observation_vector_0(11 DOWNTO 0) <= lfr_debug_vector;
517 observation_vector_0(11 DOWNTO 0) <= lfr_debug_vector;
518 observation_vector_1(11 DOWNTO 0) <= lfr_debug_vector;
518 observation_vector_1(11 DOWNTO 0) <= lfr_debug_vector;
519
519
520 IO1 <= lfr_debug_vector_ms(0); -- LFR MS FFT data_valid
520 IO1 <= lfr_debug_vector_ms(0); -- LFR MS FFT data_valid
521 IO2 <= lfr_debug_vector_ms(0); -- LFR MS FFT ready
521 IO2 <= lfr_debug_vector_ms(0); -- LFR MS FFT ready
522 IO3 <= lfr_debug_vector(0); -- LFR APBREG error_buffer_full
522 IO3 <= lfr_debug_vector(0); -- LFR APBREG error_buffer_full
523 IO4 <= lfr_debug_vector(1); -- LFR APBREG reg_sp.status_error_buffer_full
523 IO4 <= lfr_debug_vector(1); -- LFR APBREG reg_sp.status_error_buffer_full
524 IO5 <= lfr_debug_vector(8); -- LFR APBREG ready_matrix_f2
524 IO5 <= lfr_debug_vector(8); -- LFR APBREG ready_matrix_f2
525 IO6 <= lfr_debug_vector(9); -- LFR APBREG reg0_ready_matrix_f2
525 IO6 <= lfr_debug_vector(9); -- LFR APBREG reg0_ready_matrix_f2
526 IO7 <= lfr_debug_vector(10); -- LFR APBREG reg0_ready_matrix_f2
526 IO7 <= lfr_debug_vector(10); -- LFR APBREG reg0_ready_matrix_f2
527
527
528 all_sample : FOR I IN 7 DOWNTO 0 GENERATE
528 all_sample : FOR I IN 7 DOWNTO 0 GENERATE
529 sample_s(I) <= sample(I)(11 DOWNTO 0) & '0' & '0' & '0' & '0';
529 sample_s(I) <= sample(I)(11 DOWNTO 0) & '0' & '0' & '0' & '0';
530 END GENERATE all_sample;
530 END GENERATE all_sample;
531
531
532 top_ad_conv_ADS7886_v2_1 : top_ad_conv_ADS7886_v2
532 top_ad_conv_ADS7886_v2_1 : top_ad_conv_ADS7886_v2
533 GENERIC MAP(
533 GENERIC MAP(
534 ChannelCount => 8,
534 ChannelCount => 8,
535 SampleNbBits => 14,
535 SampleNbBits => 14,
536 ncycle_cnv_high => 40, -- at least 32 cycles at 25 MHz, 32 * 49.152 / 25 /2 = 31.5
536 ncycle_cnv_high => 40, -- at least 32 cycles at 25 MHz, 32 * 49.152 / 25 /2 = 31.5
537 ncycle_cnv => 249) -- 49 152 000 / 98304 /2
537 ncycle_cnv => 249) -- 49 152 000 / 98304 /2
538 PORT MAP (
538 PORT MAP (
539 -- CONV
539 -- CONV
540 cnv_clk => clk_24,
540 cnv_clk => clk_24,
541 cnv_rstn => rstn_24,
541 cnv_rstn => rstn_24,
542 cnv => ADC_nCS_sig,
542 cnv => ADC_nCS_sig,
543 -- DATA
543 -- DATA
544 clk => clk_25,
544 clk => clk_25,
545 rstn => rstn_25,
545 rstn => rstn_25,
546 sck => ADC_CLK_sig,
546 sck => ADC_CLK_sig,
547 sdo => ADC_SDO_sig,
547 sdo => ADC_SDO_sig,
548 -- SAMPLE
548 -- SAMPLE
549 sample => sample,
549 sample => sample,
550 sample_val => sample_val);
550 sample_val => sample_val);
551
551
552 ADC_nCS <= ADC_nCS_sig;
552 ADC_nCS <= ADC_nCS_sig;
553 ADC_CLK <= ADC_CLK_sig;
553 ADC_CLK <= ADC_CLK_sig;
554 ADC_SDO_sig <= ADC_SDO;
554 ADC_SDO_sig <= ADC_SDO;
555
555
556 sample_hk <= "0001000100010001" WHEN HK_SEL = "00" ELSE
556 sample_hk <= "0001000100010001" WHEN HK_SEL = "00" ELSE
557 "0010001000100010" WHEN HK_SEL = "01" ELSE
557 "0010001000100010" WHEN HK_SEL = "01" ELSE
558 "0100010001000100" WHEN HK_SEL = "10" ELSE
558 "0100010001000100" WHEN HK_SEL = "10" ELSE
559 (OTHERS => '0');
559 (OTHERS => '0');
560
560
561
561
562 ----------------------------------------------------------------------
562 ----------------------------------------------------------------------
563 --- GPIO -----------------------------------------------------------
563 --- GPIO -----------------------------------------------------------
564 ----------------------------------------------------------------------
564 ----------------------------------------------------------------------
565
565
566 grgpio0 : grgpio
566 grgpio0 : grgpio
567 GENERIC MAP(pindex => 11, paddr => 11, imask => 16#0000#, nbits => 8)
567 GENERIC MAP(pindex => 11, paddr => 11, imask => 16#0000#, nbits => 8)
568 PORT MAP(rstn_25, clk_25, apbi_ext, apbo_ext(11), gpioi, gpioo);
568 PORT MAP(rstn_25, clk_25, apbi_ext, apbo_ext(11), gpioi, gpioo);
569
569
570 gpioi.sig_en <= (OTHERS => '0');
570 gpioi.sig_en <= (OTHERS => '0');
571 gpioi.sig_in <= (OTHERS => '0');
571 gpioi.sig_in <= (OTHERS => '0');
572 gpioi.din <= (OTHERS => '0');
572 gpioi.din <= (OTHERS => '0');
573 PROCESS (clk_25, rstn_25)
573 PROCESS (clk_25, rstn_25)
574 BEGIN -- PROCESS
574 BEGIN -- PROCESS
575 IF rstn_25 = '0' THEN -- asynchronous reset (active low)
575 IF rstn_25 = '0' THEN -- asynchronous reset (active low)
576 IO8 <= '0';
576 IO8 <= '0';
577 IO9 <= '0';
577 IO9 <= '0';
578 IO10 <= '0';
578 IO10 <= '0';
579 IO11 <= '0';
579 IO11 <= '0';
580 ELSIF clk_25'EVENT AND clk_25 = '1' THEN -- rising clock edge
580 ELSIF clk_25'EVENT AND clk_25 = '1' THEN -- rising clock edge
581 CASE gpioo.dout(2 DOWNTO 0) IS
581 CASE gpioo.dout(2 DOWNTO 0) IS
582 WHEN "011" =>
582 WHEN "011" =>
583 IO8 <= observation_reg(8);
583 IO8 <= observation_reg(8);
584 IO9 <= observation_reg(9);
584 IO9 <= observation_reg(9);
585 IO10 <= observation_reg(10);
585 IO10 <= observation_reg(10);
586 IO11 <= observation_reg(11);
586 IO11 <= observation_reg(11);
587 WHEN "001" =>
587 WHEN "001" =>
588 IO8 <= observation_reg(8 + 12);
588 IO8 <= observation_reg(8 + 12);
589 IO9 <= observation_reg(9 + 12);
589 IO9 <= observation_reg(9 + 12);
590 IO10 <= observation_reg(10 + 12);
590 IO10 <= observation_reg(10 + 12);
591 IO11 <= observation_reg(11 + 12);
591 IO11 <= observation_reg(11 + 12);
592 WHEN "010" =>
592 WHEN "010" =>
593 IO8 <= '0';
593 IO8 <= '0';
594 IO9 <= '0';
594 IO9 <= '0';
595 IO10 <= '0';
595 IO10 <= '0';
596 IO11 <= '0';
596 IO11 <= '0';
597 WHEN "000" =>
597 WHEN "000" =>
598 IO8 <= observation_vector_0(8);
598 IO8 <= observation_vector_0(8);
599 IO9 <= observation_vector_0(9);
599 IO9 <= observation_vector_0(9);
600 IO10 <= observation_vector_0(10);
600 IO10 <= observation_vector_0(10);
601 IO11 <= observation_vector_0(11);
601 IO11 <= observation_vector_0(11);
602 WHEN "100" =>
602 WHEN "100" =>
603 IO8 <= observation_vector_1(8);
603 IO8 <= observation_vector_1(8);
604 IO9 <= observation_vector_1(9);
604 IO9 <= observation_vector_1(9);
605 IO10 <= observation_vector_1(10);
605 IO10 <= observation_vector_1(10);
606 IO11 <= observation_vector_1(11);
606 IO11 <= observation_vector_1(11);
607 WHEN OTHERS => NULL;
607 WHEN OTHERS => NULL;
608 END CASE;
608 END CASE;
609
609
610 END IF;
610 END IF;
611 END PROCESS;
611 END PROCESS;
612 -----------------------------------------------------------------------------
612 -----------------------------------------------------------------------------
613 --
613 --
614 -----------------------------------------------------------------------------
614 -----------------------------------------------------------------------------
615 all_apbo_ext : FOR I IN NB_APB_SLAVE-1+5 DOWNTO 5 GENERATE
615 all_apbo_ext : FOR I IN NB_APB_SLAVE-1+5 DOWNTO 5 GENERATE
616 apbo_ext_not_used : IF I /= 5 AND I /= 6 AND I /= 11 AND I /= 15 GENERATE
616 apbo_ext_not_used : IF I /= 5 AND I /= 6 AND I /= 11 AND I /= 15 GENERATE
617 apbo_ext(I) <= apb_none;
617 apbo_ext(I) <= apb_none;
618 END GENERATE apbo_ext_not_used;
618 END GENERATE apbo_ext_not_used;
619 END GENERATE all_apbo_ext;
619 END GENERATE all_apbo_ext;
620
620
621
621
622 all_ahbo_ext : FOR I IN NB_AHB_SLAVE-1+3 DOWNTO 3 GENERATE
622 all_ahbo_ext : FOR I IN NB_AHB_SLAVE-1+3 DOWNTO 3 GENERATE
623 ahbo_s_ext(I) <= ahbs_none;
623 ahbo_s_ext(I) <= ahbs_none;
624 END GENERATE all_ahbo_ext;
624 END GENERATE all_ahbo_ext;
625
625
626 all_ahbo_m_ext : FOR I IN NB_AHB_MASTER-1+1 DOWNTO 1 GENERATE
626 all_ahbo_m_ext : FOR I IN NB_AHB_MASTER-1+1 DOWNTO 1 GENERATE
627 ahbo_m_ext_not_used : IF I /= 1 AND I /= 2 GENERATE
627 ahbo_m_ext_not_used : IF I /= 1 AND I /= 2 GENERATE
628 ahbo_m_ext(I) <= ahbm_none;
628 ahbo_m_ext(I) <= ahbm_none;
629 END GENERATE ahbo_m_ext_not_used;
629 END GENERATE ahbo_m_ext_not_used;
630 END GENERATE all_ahbo_m_ext;
630 END GENERATE all_ahbo_m_ext;
631
631
632 END beh;
632 END beh; No newline at end of file
@@ -1,52 +1,52
1 VHDLIB=../..
1 VHDLIB=../..
2 SCRIPTSDIR=$(VHDLIB)/scripts/
2 SCRIPTSDIR=$(VHDLIB)/scripts/
3 GRLIB := $(shell sh $(VHDLIB)/scripts/lpp_relpath.sh)
3 GRLIB := $(shell sh $(VHDLIB)/scripts/lpp_relpath.sh)
4 TOP=MINI_LFR_top
4 TOP=MINI_LFR_top
5 BOARD=MINI-LFR
5 BOARD=MINI-LFR
6 include $(VHDLIB)/boards/$(BOARD)/Makefile.inc
6 include $(VHDLIB)/boards/$(BOARD)/Makefile.inc
7 DEVICE=$(PART)-$(PACKAGE)$(SPEED)
7 DEVICE=$(PART)-$(PACKAGE)$(SPEED)
8 UCF=$(VHDLIB)/boards/$(BOARD)/$(TOP).ucf
8 UCF=$(VHDLIB)/boards/$(BOARD)/$(TOP).ucf
9 QSF=$(VHDLIB)/boards/$(BOARD)/$(TOP).qsf
9 QSF=$(VHDLIB)/boards/$(BOARD)/$(TOP).qsf
10 EFFORT=high
10 EFFORT=high
11 XSTOPT=
11 XSTOPT=
12 SYNPOPT="set_option -pipe 0; set_option -retiming 0; set_option -write_apr_constraint 0"
12 SYNPOPT="set_option -pipe 0; set_option -retiming 0; set_option -write_apr_constraint 0"
13 VHDLSYNFILES= MINI_LFR_top.vhd
13 VHDLSYNFILES= MINI_LFR_top.vhd
14 VHDLSIMFILES= testbench.vhd
14 VHDLSIMFILES= testbench.vhd
15 SIMTOP=testbench
15 SIMTOP=testbench
16 PDC=$(VHDLIB)/boards/$(BOARD)/default.pdc
16 PDC=$(VHDLIB)/boards/$(BOARD)/default.pdc
17 SDCFILE=$(VHDLIB)/boards/$(BOARD)/MINI-LFR.sdc
17 SDCFILE=$(VHDLIB)/boards/$(BOARD)/MINI-LFR_PlaceAndRoute.sdc
18 SDC=$(VHDLIB)/boards/$(BOARD)/MINI-LFR.sdc
18 SDC=$(VHDLIB)/boards/$(BOARD)/MINI-LFR_PlaceAndRoute.sdc
19 BITGEN=$(VHDLIB)/boards/$(BOARD)/default.ut
19 BITGEN=$(VHDLIB)/boards/$(BOARD)/default.ut
20 CLEAN=soft-clean
20 CLEAN=soft-clean
21
21
22 TECHLIBS = proasic3e
22 TECHLIBS = proasic3e
23
23
24 LIBSKIP = core1553bbc core1553brm core1553brt gr1553 corePCIF \
24 LIBSKIP = core1553bbc core1553brm core1553brt gr1553 corePCIF \
25 tmtc openchip hynix ihp gleichmann micron usbhc ge_1000baseX
25 tmtc openchip hynix ihp gleichmann micron usbhc ge_1000baseX
26
26
27 DIRSKIP = b1553 pcif leon2 leon2ft crypto satcan ddr usb ata i2c \
27 DIRSKIP = b1553 pcif leon2 leon2ft crypto satcan ddr usb ata i2c \
28 pci grusbhc haps slink ascs pwm coremp7 spi ac97 \
28 pci grusbhc haps slink ascs pwm coremp7 spi ac97 \
29 ./amba_lcd_16x2_ctrlr \
29 ./amba_lcd_16x2_ctrlr \
30 ./general_purpose/lpp_AMR \
30 ./general_purpose/lpp_AMR \
31 ./general_purpose/lpp_balise \
31 ./general_purpose/lpp_balise \
32 ./general_purpose/lpp_delay \
32 ./general_purpose/lpp_delay \
33 ./lpp_bootloader \
33 ./lpp_bootloader \
34 ./lpp_uart \
34 ./lpp_uart \
35 ./lpp_usb \
35 ./lpp_usb \
36 ./dsp/lpp_fft_rtax \
36 ./dsp/lpp_fft_rtax \
37 ./lpp_sim/CY7C1061DV33 \
37 ./lpp_sim/CY7C1061DV33 \
38
38
39 FILESKIP =i2cmst.vhd \
39 FILESKIP =i2cmst.vhd \
40 APB_MULTI_DIODE.vhd \
40 APB_MULTI_DIODE.vhd \
41 APB_SIMPLE_DIODE.vhd \
41 APB_SIMPLE_DIODE.vhd \
42 Top_MatrixSpec.vhd \
42 Top_MatrixSpec.vhd \
43 APB_FFT.vhd \
43 APB_FFT.vhd \
44 CoreFFT_simu.vhd \
44 CoreFFT_simu.vhd \
45 lpp_lfr_apbreg_simu.vhd \
45 lpp_lfr_apbreg_simu.vhd \
46 sgmii.vhd
46 sgmii.vhd
47
47
48 include $(GRLIB)/bin/Makefile
48 include $(GRLIB)/bin/Makefile
49 include $(GRLIB)/software/leon3/Makefile
49 include $(GRLIB)/software/leon3/Makefile
50
50
51 ################## project specific targets ##########################
51 ################## project specific targets ##########################
52
52
1 NO CONTENT: file renamed from designs/MINI-LFR_WFP_MS/run.do to designs/SOLO_LFR_MINI-LFR/run.do
NO CONTENT: file renamed from designs/MINI-LFR_WFP_MS/run.do to designs/SOLO_LFR_MINI-LFR/run.do
1 NO CONTENT: file renamed from designs/MINI-LFR_WFP_MS/testbench.vhd to designs/SOLO_LFR_MINI-LFR/testbench.vhd
NO CONTENT: file renamed from designs/MINI-LFR_WFP_MS/testbench.vhd to designs/SOLO_LFR_MINI-LFR/testbench.vhd
1 NO CONTENT: file renamed from designs/MINI-LFR_WFP_MS/wave.do to designs/SOLO_LFR_MINI-LFR/wave.do
NO CONTENT: file renamed from designs/MINI-LFR_WFP_MS/wave.do to designs/SOLO_LFR_MINI-LFR/wave.do
@@ -1,413 +1,420
1 LIBRARY ieee;
1 LIBRARY ieee;
2 USE ieee.std_logic_1164.ALL;
2 USE ieee.std_logic_1164.ALL;
3
3
4 LIBRARY grlib;
4 LIBRARY grlib;
5 USE grlib.amba.ALL;
5 USE grlib.amba.ALL;
6
6
7 LIBRARY lpp;
7 LIBRARY lpp;
8 USE lpp.lpp_ad_conv.ALL;
8 USE lpp.lpp_ad_conv.ALL;
9 USE lpp.iir_filter.ALL;
9 USE lpp.iir_filter.ALL;
10 USE lpp.FILTERcfg.ALL;
10 USE lpp.FILTERcfg.ALL;
11 USE lpp.lpp_memory.ALL;
11 USE lpp.lpp_memory.ALL;
12 LIBRARY techmap;
12 LIBRARY techmap;
13 USE techmap.gencomp.ALL;
13 USE techmap.gencomp.ALL;
14
14
15 PACKAGE lpp_lfr_pkg IS
15 PACKAGE lpp_lfr_pkg IS
16
17 constant LPP_LFR_BOARD_MINI_LFR : std_logic_vector(7 downto 0) := X"00"; -- with fpga A3PE3000
18 constant LPP_LFR_BOARD_LFR_EM : std_logic_vector(7 downto 0) := X"01"; -- with fpga A3PE3000
19 constant LPP_LFR_BOARD_LFR_EQM : std_logic_vector(7 downto 0) := X"02"; -- with fpga A3PE3000
20 constant LPP_LFR_BOARD_LFR_FM : std_logic_vector(7 downto 0) := X"03"; -- with fpga RTAX4000D
21 constant LPP_LFR_BOARD_DISCOSPACE : std_logic_vector(7 downto 0) := X"04"; -- with fpga A3PE3000
22
16 -----------------------------------------------------------------------------
23 -----------------------------------------------------------------------------
17 -- TEMP
24 -- TEMP
18 -----------------------------------------------------------------------------
25 -----------------------------------------------------------------------------
19 COMPONENT lpp_lfr_ms_test
26 COMPONENT lpp_lfr_ms_test
20 GENERIC (
27 GENERIC (
21 Mem_use : INTEGER);
28 Mem_use : INTEGER);
22 PORT (
29 PORT (
23 clk : IN STD_LOGIC;
30 clk : IN STD_LOGIC;
24 rstn : IN STD_LOGIC;
31 rstn : IN STD_LOGIC;
25
32
26 -- TIME
33 -- TIME
27 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0); -- todo
34 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0); -- todo
28 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0); -- todo
35 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0); -- todo
29 --
36 --
30 sample_f0_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
37 sample_f0_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
31 sample_f0_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
38 sample_f0_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
32 --
39 --
33 sample_f1_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
40 sample_f1_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
34 sample_f1_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
41 sample_f1_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
35 --
42 --
36 sample_f2_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
43 sample_f2_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
37 sample_f2_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
44 sample_f2_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
38
45
39
46
40
47
41 ---------------------------------------------------------------------------
48 ---------------------------------------------------------------------------
42 error_input_fifo_write : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
49 error_input_fifo_write : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
43
50
44 --
51 --
45 --sample_ren : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
52 --sample_ren : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
46 --sample_full : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
53 --sample_full : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
47 --sample_empty : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
54 --sample_empty : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
48 --sample_rdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
55 --sample_rdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
49
56
50 --status_channel : IN STD_LOGIC_VECTOR(49 DOWNTO 0);
57 --status_channel : IN STD_LOGIC_VECTOR(49 DOWNTO 0);
51
58
52 -- IN
59 -- IN
53 MEM_IN_SM_locked : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
60 MEM_IN_SM_locked : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
54
61
55 -----------------------------------------------------------------------------
62 -----------------------------------------------------------------------------
56
63
57 status_component : OUT STD_LOGIC_VECTOR(53 DOWNTO 0);
64 status_component : OUT STD_LOGIC_VECTOR(53 DOWNTO 0);
58 SM_in_data : OUT STD_LOGIC_VECTOR(32*2-1 DOWNTO 0);
65 SM_in_data : OUT STD_LOGIC_VECTOR(32*2-1 DOWNTO 0);
59 SM_in_ren : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
66 SM_in_ren : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
60 SM_in_empty : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
67 SM_in_empty : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
61
68
62 SM_correlation_start : OUT STD_LOGIC;
69 SM_correlation_start : OUT STD_LOGIC;
63 SM_correlation_auto : OUT STD_LOGIC;
70 SM_correlation_auto : OUT STD_LOGIC;
64 SM_correlation_done : IN STD_LOGIC
71 SM_correlation_done : IN STD_LOGIC
65 );
72 );
66 END COMPONENT;
73 END COMPONENT;
67
74
68
75
69 -----------------------------------------------------------------------------
76 -----------------------------------------------------------------------------
70 COMPONENT lpp_lfr_ms
77 COMPONENT lpp_lfr_ms
71 GENERIC (
78 GENERIC (
72 Mem_use : INTEGER;
79 Mem_use : INTEGER;
73 WINDOWS_HAANNING_PARAM_SIZE : INTEGER);
80 WINDOWS_HAANNING_PARAM_SIZE : INTEGER);
74 PORT (
81 PORT (
75 clk : IN STD_LOGIC;
82 clk : IN STD_LOGIC;
76 rstn : IN STD_LOGIC;
83 rstn : IN STD_LOGIC;
77 run : IN STD_LOGIC;
84 run : IN STD_LOGIC;
78 start_date : IN STD_LOGIC_VECTOR(30 DOWNTO 0);
85 start_date : IN STD_LOGIC_VECTOR(30 DOWNTO 0);
79 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
86 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
80 sample_f0_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
87 sample_f0_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
81 sample_f0_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
88 sample_f0_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
82 sample_f0_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
89 sample_f0_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
83 sample_f1_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
90 sample_f1_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
84 sample_f1_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
91 sample_f1_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
85 sample_f1_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
92 sample_f1_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
86 sample_f2_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
93 sample_f2_wen : IN STD_LOGIC_VECTOR(4 DOWNTO 0);
87 sample_f2_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
94 sample_f2_wdata : IN STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
88 sample_f2_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
95 sample_f2_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
89 dma_fifo_burst_valid : OUT STD_LOGIC;
96 dma_fifo_burst_valid : OUT STD_LOGIC;
90 dma_fifo_data : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
97 dma_fifo_data : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
91 dma_fifo_ren : IN STD_LOGIC;
98 dma_fifo_ren : IN STD_LOGIC;
92 dma_buffer_new : OUT STD_LOGIC;
99 dma_buffer_new : OUT STD_LOGIC;
93 dma_buffer_addr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
100 dma_buffer_addr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
94 dma_buffer_length : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
101 dma_buffer_length : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
95 dma_buffer_full : IN STD_LOGIC;
102 dma_buffer_full : IN STD_LOGIC;
96 dma_buffer_full_err : IN STD_LOGIC;
103 dma_buffer_full_err : IN STD_LOGIC;
97 ready_matrix_f0 : OUT STD_LOGIC;
104 ready_matrix_f0 : OUT STD_LOGIC;
98 ready_matrix_f1 : OUT STD_LOGIC;
105 ready_matrix_f1 : OUT STD_LOGIC;
99 ready_matrix_f2 : OUT STD_LOGIC;
106 ready_matrix_f2 : OUT STD_LOGIC;
100 error_buffer_full : OUT STD_LOGIC;
107 error_buffer_full : OUT STD_LOGIC;
101 error_input_fifo_write : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
108 error_input_fifo_write : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
102 status_ready_matrix_f0 : IN STD_LOGIC;
109 status_ready_matrix_f0 : IN STD_LOGIC;
103 status_ready_matrix_f1 : IN STD_LOGIC;
110 status_ready_matrix_f1 : IN STD_LOGIC;
104 status_ready_matrix_f2 : IN STD_LOGIC;
111 status_ready_matrix_f2 : IN STD_LOGIC;
105 addr_matrix_f0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
112 addr_matrix_f0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
106 addr_matrix_f1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
113 addr_matrix_f1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
107 addr_matrix_f2 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
114 addr_matrix_f2 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
108 length_matrix_f0 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
115 length_matrix_f0 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
109 length_matrix_f1 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
116 length_matrix_f1 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
110 length_matrix_f2 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
117 length_matrix_f2 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
111 matrix_time_f0 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
118 matrix_time_f0 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
112 matrix_time_f1 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
119 matrix_time_f1 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
113 matrix_time_f2 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
120 matrix_time_f2 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
114 debug_vector : OUT STD_LOGIC_VECTOR(11 DOWNTO 0));
121 debug_vector : OUT STD_LOGIC_VECTOR(11 DOWNTO 0));
115 END COMPONENT;
122 END COMPONENT;
116
123
117 COMPONENT lpp_lfr_ms_fsmdma
124 COMPONENT lpp_lfr_ms_fsmdma
118 PORT (
125 PORT (
119 clk : IN STD_ULOGIC;
126 clk : IN STD_ULOGIC;
120 rstn : IN STD_ULOGIC;
127 rstn : IN STD_ULOGIC;
121 run : IN STD_LOGIC;
128 run : IN STD_LOGIC;
122 fifo_matrix_type : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
129 fifo_matrix_type : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
123 fifo_matrix_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
130 fifo_matrix_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
124 fifo_data : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
131 fifo_data : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
125 fifo_empty : IN STD_LOGIC;
132 fifo_empty : IN STD_LOGIC;
126 fifo_empty_threshold : IN STD_LOGIC;
133 fifo_empty_threshold : IN STD_LOGIC;
127 fifo_ren : OUT STD_LOGIC;
134 fifo_ren : OUT STD_LOGIC;
128 dma_fifo_valid_burst : OUT STD_LOGIC;
135 dma_fifo_valid_burst : OUT STD_LOGIC;
129 dma_fifo_data : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
136 dma_fifo_data : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
130 dma_fifo_ren : IN STD_LOGIC;
137 dma_fifo_ren : IN STD_LOGIC;
131 dma_buffer_new : OUT STD_LOGIC;
138 dma_buffer_new : OUT STD_LOGIC;
132 dma_buffer_addr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
139 dma_buffer_addr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
133 dma_buffer_length : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
140 dma_buffer_length : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
134 dma_buffer_full : IN STD_LOGIC;
141 dma_buffer_full : IN STD_LOGIC;
135 dma_buffer_full_err : IN STD_LOGIC;
142 dma_buffer_full_err : IN STD_LOGIC;
136 status_ready_matrix_f0 : IN STD_LOGIC;
143 status_ready_matrix_f0 : IN STD_LOGIC;
137 status_ready_matrix_f1 : IN STD_LOGIC;
144 status_ready_matrix_f1 : IN STD_LOGIC;
138 status_ready_matrix_f2 : IN STD_LOGIC;
145 status_ready_matrix_f2 : IN STD_LOGIC;
139 addr_matrix_f0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
146 addr_matrix_f0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
140 addr_matrix_f1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
147 addr_matrix_f1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
141 addr_matrix_f2 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
148 addr_matrix_f2 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
142 length_matrix_f0 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
149 length_matrix_f0 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
143 length_matrix_f1 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
150 length_matrix_f1 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
144 length_matrix_f2 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
151 length_matrix_f2 : IN STD_LOGIC_VECTOR(25 DOWNTO 0);
145 ready_matrix_f0 : OUT STD_LOGIC;
152 ready_matrix_f0 : OUT STD_LOGIC;
146 ready_matrix_f1 : OUT STD_LOGIC;
153 ready_matrix_f1 : OUT STD_LOGIC;
147 ready_matrix_f2 : OUT STD_LOGIC;
154 ready_matrix_f2 : OUT STD_LOGIC;
148 matrix_time_f0 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
155 matrix_time_f0 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
149 matrix_time_f1 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
156 matrix_time_f1 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
150 matrix_time_f2 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
157 matrix_time_f2 : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
151 error_buffer_full : OUT STD_LOGIC);
158 error_buffer_full : OUT STD_LOGIC);
152 END COMPONENT;
159 END COMPONENT;
153
160
154 COMPONENT lpp_lfr_ms_FFT
161 COMPONENT lpp_lfr_ms_FFT
155 GENERIC (
162 GENERIC (
156 WINDOWS_HAANNING_PARAM_SIZE : INTEGER);
163 WINDOWS_HAANNING_PARAM_SIZE : INTEGER);
157 PORT (
164 PORT (
158 clk : IN STD_LOGIC;
165 clk : IN STD_LOGIC;
159 rstn : IN STD_LOGIC;
166 rstn : IN STD_LOGIC;
160 sample_valid : IN STD_LOGIC;
167 sample_valid : IN STD_LOGIC;
161 fft_read : IN STD_LOGIC;
168 fft_read : IN STD_LOGIC;
162 sample_data : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
169 sample_data : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
163 sample_load : OUT STD_LOGIC;
170 sample_load : OUT STD_LOGIC;
164 fft_pong : OUT STD_LOGIC;
171 fft_pong : OUT STD_LOGIC;
165 fft_data_im : OUT STD_LOGIC_VECTOR(15 DOWNTO 0);
172 fft_data_im : OUT STD_LOGIC_VECTOR(15 DOWNTO 0);
166 fft_data_re : OUT STD_LOGIC_VECTOR(15 DOWNTO 0);
173 fft_data_re : OUT STD_LOGIC_VECTOR(15 DOWNTO 0);
167 fft_data_valid : OUT STD_LOGIC;
174 fft_data_valid : OUT STD_LOGIC;
168 fft_ready : OUT STD_LOGIC);
175 fft_ready : OUT STD_LOGIC);
169 END COMPONENT;
176 END COMPONENT;
170
177
171 COMPONENT lpp_lfr_filter
178 COMPONENT lpp_lfr_filter
172 GENERIC (
179 GENERIC (
173 tech : INTEGER;
180 tech : INTEGER;
174 Mem_use : INTEGER;
181 Mem_use : INTEGER;
175 RTL_DESIGN_LIGHT : INTEGER
182 RTL_DESIGN_LIGHT : INTEGER
176 );
183 );
177 PORT (
184 PORT (
178 sample : IN Samples(7 DOWNTO 0);
185 sample : IN Samples(7 DOWNTO 0);
179 sample_val : IN STD_LOGIC;
186 sample_val : IN STD_LOGIC;
180 sample_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
187 sample_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
181 clk : IN STD_LOGIC;
188 clk : IN STD_LOGIC;
182 rstn : IN STD_LOGIC;
189 rstn : IN STD_LOGIC;
183 data_shaping_SP0 : IN STD_LOGIC;
190 data_shaping_SP0 : IN STD_LOGIC;
184 data_shaping_SP1 : IN STD_LOGIC;
191 data_shaping_SP1 : IN STD_LOGIC;
185 data_shaping_R0 : IN STD_LOGIC;
192 data_shaping_R0 : IN STD_LOGIC;
186 data_shaping_R1 : IN STD_LOGIC;
193 data_shaping_R1 : IN STD_LOGIC;
187 data_shaping_R2 : IN STD_LOGIC;
194 data_shaping_R2 : IN STD_LOGIC;
188 sample_f0_val : OUT STD_LOGIC;
195 sample_f0_val : OUT STD_LOGIC;
189 sample_f1_val : OUT STD_LOGIC;
196 sample_f1_val : OUT STD_LOGIC;
190 sample_f2_val : OUT STD_LOGIC;
197 sample_f2_val : OUT STD_LOGIC;
191 sample_f3_val : OUT STD_LOGIC;
198 sample_f3_val : OUT STD_LOGIC;
192 sample_f0_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
199 sample_f0_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
193 sample_f1_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
200 sample_f1_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
194 sample_f2_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
201 sample_f2_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
195 sample_f3_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
202 sample_f3_wdata : OUT STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
196 sample_f0_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
203 sample_f0_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
197 sample_f1_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
204 sample_f1_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
198 sample_f2_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
205 sample_f2_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
199 sample_f3_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0)
206 sample_f3_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0)
200 );
207 );
201 END COMPONENT;
208 END COMPONENT;
202
209
203 COMPONENT lpp_lfr
210 COMPONENT lpp_lfr
204 GENERIC (
211 GENERIC (
205 Mem_use : INTEGER;
212 Mem_use : INTEGER;
206 tech : INTEGER;
213 tech : INTEGER;
207 nb_data_by_buffer_size : INTEGER;
214 nb_data_by_buffer_size : INTEGER;
208 -- nb_word_by_buffer_size : INTEGER;
215 -- nb_word_by_buffer_size : INTEGER;
209 nb_snapshot_param_size : INTEGER;
216 nb_snapshot_param_size : INTEGER;
210 delta_vector_size : INTEGER;
217 delta_vector_size : INTEGER;
211 delta_vector_size_f0_2 : INTEGER;
218 delta_vector_size_f0_2 : INTEGER;
212 pindex : INTEGER;
219 pindex : INTEGER;
213 paddr : INTEGER;
220 paddr : INTEGER;
214 pmask : INTEGER;
221 pmask : INTEGER;
215 pirq_ms : INTEGER;
222 pirq_ms : INTEGER;
216 pirq_wfp : INTEGER;
223 pirq_wfp : INTEGER;
217 hindex : INTEGER;
224 hindex : INTEGER;
218 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0);
225 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0);
219 DEBUG_FORCE_DATA_DMA : INTEGER;
226 DEBUG_FORCE_DATA_DMA : INTEGER;
220 RTL_DESIGN_LIGHT : INTEGER;
227 RTL_DESIGN_LIGHT : INTEGER;
221 WINDOWS_HAANNING_PARAM_SIZE : INTEGER
228 WINDOWS_HAANNING_PARAM_SIZE : INTEGER
222 );
229 );
223 PORT (
230 PORT (
224 clk : IN STD_LOGIC;
231 clk : IN STD_LOGIC;
225 rstn : IN STD_LOGIC;
232 rstn : IN STD_LOGIC;
226 sample_B : IN Samples(2 DOWNTO 0);
233 sample_B : IN Samples(2 DOWNTO 0);
227 sample_E : IN Samples(4 DOWNTO 0);
234 sample_E : IN Samples(4 DOWNTO 0);
228 sample_val : IN STD_LOGIC;
235 sample_val : IN STD_LOGIC;
229 apbi : IN apb_slv_in_type;
236 apbi : IN apb_slv_in_type;
230 apbo : OUT apb_slv_out_type;
237 apbo : OUT apb_slv_out_type;
231 ahbi : IN AHB_Mst_In_Type;
238 ahbi : IN AHB_Mst_In_Type;
232 ahbo : OUT AHB_Mst_Out_Type;
239 ahbo : OUT AHB_Mst_Out_Type;
233 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
240 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
234 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
241 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
235 data_shaping_BW : OUT STD_LOGIC;
242 data_shaping_BW : OUT STD_LOGIC;
236 debug_vector : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
243 debug_vector : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
237 debug_vector_ms : OUT STD_LOGIC_VECTOR(11 DOWNTO 0)
244 debug_vector_ms : OUT STD_LOGIC_VECTOR(11 DOWNTO 0)
238 );
245 );
239 END COMPONENT;
246 END COMPONENT;
240
247
241 -----------------------------------------------------------------------------
248 -----------------------------------------------------------------------------
242 -- LPP_LFR with only WaveForm Picker (and without Spectral Matrix Sub System)
249 -- LPP_LFR with only WaveForm Picker (and without Spectral Matrix Sub System)
243 -----------------------------------------------------------------------------
250 -----------------------------------------------------------------------------
244 COMPONENT lpp_lfr_WFP_nMS
251 COMPONENT lpp_lfr_WFP_nMS
245 GENERIC (
252 GENERIC (
246 Mem_use : INTEGER;
253 Mem_use : INTEGER;
247 nb_data_by_buffer_size : INTEGER;
254 nb_data_by_buffer_size : INTEGER;
248 nb_word_by_buffer_size : INTEGER;
255 nb_word_by_buffer_size : INTEGER;
249 nb_snapshot_param_size : INTEGER;
256 nb_snapshot_param_size : INTEGER;
250 delta_vector_size : INTEGER;
257 delta_vector_size : INTEGER;
251 delta_vector_size_f0_2 : INTEGER;
258 delta_vector_size_f0_2 : INTEGER;
252 pindex : INTEGER;
259 pindex : INTEGER;
253 paddr : INTEGER;
260 paddr : INTEGER;
254 pmask : INTEGER;
261 pmask : INTEGER;
255 pirq_ms : INTEGER;
262 pirq_ms : INTEGER;
256 pirq_wfp : INTEGER;
263 pirq_wfp : INTEGER;
257 hindex : INTEGER;
264 hindex : INTEGER;
258 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0));
265 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0));
259 PORT (
266 PORT (
260 clk : IN STD_LOGIC;
267 clk : IN STD_LOGIC;
261 rstn : IN STD_LOGIC;
268 rstn : IN STD_LOGIC;
262 sample_B : IN Samples(2 DOWNTO 0);
269 sample_B : IN Samples(2 DOWNTO 0);
263 sample_E : IN Samples(4 DOWNTO 0);
270 sample_E : IN Samples(4 DOWNTO 0);
264 sample_val : IN STD_LOGIC;
271 sample_val : IN STD_LOGIC;
265 apbi : IN apb_slv_in_type;
272 apbi : IN apb_slv_in_type;
266 apbo : OUT apb_slv_out_type;
273 apbo : OUT apb_slv_out_type;
267 ahbi : IN AHB_Mst_In_Type;
274 ahbi : IN AHB_Mst_In_Type;
268 ahbo : OUT AHB_Mst_Out_Type;
275 ahbo : OUT AHB_Mst_Out_Type;
269 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
276 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
270 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
277 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
271 data_shaping_BW : OUT STD_LOGIC;
278 data_shaping_BW : OUT STD_LOGIC;
272 observation_reg : OUT STD_LOGIC_VECTOR(31 DOWNTO 0));
279 observation_reg : OUT STD_LOGIC_VECTOR(31 DOWNTO 0));
273 END COMPONENT;
280 END COMPONENT;
274 -----------------------------------------------------------------------------
281 -----------------------------------------------------------------------------
275
282
276 COMPONENT lpp_lfr_apbreg
283 COMPONENT lpp_lfr_apbreg
277 GENERIC (
284 GENERIC (
278 nb_data_by_buffer_size : INTEGER;
285 nb_data_by_buffer_size : INTEGER;
279 nb_snapshot_param_size : INTEGER;
286 nb_snapshot_param_size : INTEGER;
280 delta_vector_size : INTEGER;
287 delta_vector_size : INTEGER;
281 delta_vector_size_f0_2 : INTEGER;
288 delta_vector_size_f0_2 : INTEGER;
282 pindex : INTEGER;
289 pindex : INTEGER;
283 paddr : INTEGER;
290 paddr : INTEGER;
284 pmask : INTEGER;
291 pmask : INTEGER;
285 pirq_ms : INTEGER;
292 pirq_ms : INTEGER;
286 pirq_wfp : INTEGER;
293 pirq_wfp : INTEGER;
287 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0));
294 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0));
288 PORT (
295 PORT (
289 HCLK : IN STD_ULOGIC;
296 HCLK : IN STD_ULOGIC;
290 HRESETn : IN STD_ULOGIC;
297 HRESETn : IN STD_ULOGIC;
291 apbi : IN apb_slv_in_type;
298 apbi : IN apb_slv_in_type;
292 apbo : OUT apb_slv_out_type;
299 apbo : OUT apb_slv_out_type;
293 -- run_ms : OUT STD_LOGIC;
300 -- run_ms : OUT STD_LOGIC;
294 ready_matrix_f0 : IN STD_LOGIC;
301 ready_matrix_f0 : IN STD_LOGIC;
295 ready_matrix_f1 : IN STD_LOGIC;
302 ready_matrix_f1 : IN STD_LOGIC;
296 ready_matrix_f2 : IN STD_LOGIC;
303 ready_matrix_f2 : IN STD_LOGIC;
297 error_buffer_full : IN STD_LOGIC;
304 error_buffer_full : IN STD_LOGIC;
298 error_input_fifo_write : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
305 error_input_fifo_write : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
299 status_ready_matrix_f0 : OUT STD_LOGIC;
306 status_ready_matrix_f0 : OUT STD_LOGIC;
300 status_ready_matrix_f1 : OUT STD_LOGIC;
307 status_ready_matrix_f1 : OUT STD_LOGIC;
301 status_ready_matrix_f2 : OUT STD_LOGIC;
308 status_ready_matrix_f2 : OUT STD_LOGIC;
302 addr_matrix_f0 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
309 addr_matrix_f0 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
303 addr_matrix_f1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
310 addr_matrix_f1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
304 addr_matrix_f2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
311 addr_matrix_f2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
305 length_matrix_f0 : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
312 length_matrix_f0 : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
306 length_matrix_f1 : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
313 length_matrix_f1 : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
307 length_matrix_f2 : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
314 length_matrix_f2 : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
308 matrix_time_f0 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
315 matrix_time_f0 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
309 matrix_time_f1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
316 matrix_time_f1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
310 matrix_time_f2 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
317 matrix_time_f2 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
311 status_new_err : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
318 status_new_err : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
312 data_shaping_BW : OUT STD_LOGIC;
319 data_shaping_BW : OUT STD_LOGIC;
313 data_shaping_SP0 : OUT STD_LOGIC;
320 data_shaping_SP0 : OUT STD_LOGIC;
314 data_shaping_SP1 : OUT STD_LOGIC;
321 data_shaping_SP1 : OUT STD_LOGIC;
315 data_shaping_R0 : OUT STD_LOGIC;
322 data_shaping_R0 : OUT STD_LOGIC;
316 data_shaping_R1 : OUT STD_LOGIC;
323 data_shaping_R1 : OUT STD_LOGIC;
317 data_shaping_R2 : OUT STD_LOGIC;
324 data_shaping_R2 : OUT STD_LOGIC;
318 delta_snapshot : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
325 delta_snapshot : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
319 delta_f0 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
326 delta_f0 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
320 delta_f0_2 : OUT STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
327 delta_f0_2 : OUT STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
321 delta_f1 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
328 delta_f1 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
322 delta_f2 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
329 delta_f2 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
323 nb_data_by_buffer : OUT STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
330 nb_data_by_buffer : OUT STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
324 nb_snapshot_param : OUT STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
331 nb_snapshot_param : OUT STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
325 enable_f0 : OUT STD_LOGIC;
332 enable_f0 : OUT STD_LOGIC;
326 enable_f1 : OUT STD_LOGIC;
333 enable_f1 : OUT STD_LOGIC;
327 enable_f2 : OUT STD_LOGIC;
334 enable_f2 : OUT STD_LOGIC;
328 enable_f3 : OUT STD_LOGIC;
335 enable_f3 : OUT STD_LOGIC;
329 burst_f0 : OUT STD_LOGIC;
336 burst_f0 : OUT STD_LOGIC;
330 burst_f1 : OUT STD_LOGIC;
337 burst_f1 : OUT STD_LOGIC;
331 burst_f2 : OUT STD_LOGIC;
338 burst_f2 : OUT STD_LOGIC;
332 run : OUT STD_LOGIC;
339 run : OUT STD_LOGIC;
333 start_date : OUT STD_LOGIC_VECTOR(30 DOWNTO 0);
340 start_date : OUT STD_LOGIC_VECTOR(30 DOWNTO 0);
334 wfp_status_buffer_ready : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
341 wfp_status_buffer_ready : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
335 wfp_addr_buffer : OUT STD_LOGIC_VECTOR(32*4-1 DOWNTO 0);
342 wfp_addr_buffer : OUT STD_LOGIC_VECTOR(32*4-1 DOWNTO 0);
336 wfp_length_buffer : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
343 wfp_length_buffer : OUT STD_LOGIC_VECTOR(25 DOWNTO 0);
337 wfp_ready_buffer : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
344 wfp_ready_buffer : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
338 wfp_buffer_time : IN STD_LOGIC_VECTOR(48*4-1 DOWNTO 0);
345 wfp_buffer_time : IN STD_LOGIC_VECTOR(48*4-1 DOWNTO 0);
339 wfp_error_buffer_full : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
346 wfp_error_buffer_full : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
340 sample_f3_v : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
347 sample_f3_v : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
341 sample_f3_e1 : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
348 sample_f3_e1 : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
342 sample_f3_e2 : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
349 sample_f3_e2 : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
343 sample_f3_valid : IN STD_LOGIC;
350 sample_f3_valid : IN STD_LOGIC;
344 debug_vector : OUT STD_LOGIC_VECTOR(11 DOWNTO 0));
351 debug_vector : OUT STD_LOGIC_VECTOR(11 DOWNTO 0));
345 END COMPONENT;
352 END COMPONENT;
346
353
347 COMPONENT lpp_top_ms
354 COMPONENT lpp_top_ms
348 GENERIC (
355 GENERIC (
349 Mem_use : INTEGER;
356 Mem_use : INTEGER;
350 nb_burst_available_size : INTEGER;
357 nb_burst_available_size : INTEGER;
351 nb_snapshot_param_size : INTEGER;
358 nb_snapshot_param_size : INTEGER;
352 delta_snapshot_size : INTEGER;
359 delta_snapshot_size : INTEGER;
353 delta_f2_f0_size : INTEGER;
360 delta_f2_f0_size : INTEGER;
354 delta_f2_f1_size : INTEGER;
361 delta_f2_f1_size : INTEGER;
355 pindex : INTEGER;
362 pindex : INTEGER;
356 paddr : INTEGER;
363 paddr : INTEGER;
357 pmask : INTEGER;
364 pmask : INTEGER;
358 pirq_ms : INTEGER;
365 pirq_ms : INTEGER;
359 pirq_wfp : INTEGER;
366 pirq_wfp : INTEGER;
360 hindex_wfp : INTEGER;
367 hindex_wfp : INTEGER;
361 hindex_ms : INTEGER);
368 hindex_ms : INTEGER);
362 PORT (
369 PORT (
363 clk : IN STD_LOGIC;
370 clk : IN STD_LOGIC;
364 rstn : IN STD_LOGIC;
371 rstn : IN STD_LOGIC;
365 sample_B : IN Samples14v(2 DOWNTO 0);
372 sample_B : IN Samples14v(2 DOWNTO 0);
366 sample_E : IN Samples14v(4 DOWNTO 0);
373 sample_E : IN Samples14v(4 DOWNTO 0);
367 sample_val : IN STD_LOGIC;
374 sample_val : IN STD_LOGIC;
368 apbi : IN apb_slv_in_type;
375 apbi : IN apb_slv_in_type;
369 apbo : OUT apb_slv_out_type;
376 apbo : OUT apb_slv_out_type;
370 ahbi_ms : IN AHB_Mst_In_Type;
377 ahbi_ms : IN AHB_Mst_In_Type;
371 ahbo_ms : OUT AHB_Mst_Out_Type;
378 ahbo_ms : OUT AHB_Mst_Out_Type;
372 data_shaping_BW : OUT STD_LOGIC;
379 data_shaping_BW : OUT STD_LOGIC;
373 matrix_time_f0_0 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
380 matrix_time_f0_0 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
374 matrix_time_f0_1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
381 matrix_time_f0_1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
375 matrix_time_f1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
382 matrix_time_f1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
376 matrix_time_f2 : IN STD_LOGIC_VECTOR(47 DOWNTO 0)
383 matrix_time_f2 : IN STD_LOGIC_VECTOR(47 DOWNTO 0)
377 );
384 );
378 END COMPONENT;
385 END COMPONENT;
379
386
380 COMPONENT lpp_apbreg_ms_pointer
387 COMPONENT lpp_apbreg_ms_pointer
381 PORT (
388 PORT (
382 clk : IN STD_LOGIC;
389 clk : IN STD_LOGIC;
383 rstn : IN STD_LOGIC;
390 rstn : IN STD_LOGIC;
384 run : IN STD_LOGIC;
391 run : IN STD_LOGIC;
385 reg0_status_ready_matrix : IN STD_LOGIC;
392 reg0_status_ready_matrix : IN STD_LOGIC;
386 reg0_ready_matrix : OUT STD_LOGIC;
393 reg0_ready_matrix : OUT STD_LOGIC;
387 reg0_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
394 reg0_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
388 reg0_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
395 reg0_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
389 reg1_status_ready_matrix : IN STD_LOGIC;
396 reg1_status_ready_matrix : IN STD_LOGIC;
390 reg1_ready_matrix : OUT STD_LOGIC;
397 reg1_ready_matrix : OUT STD_LOGIC;
391 reg1_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
398 reg1_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
392 reg1_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
399 reg1_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
393 ready_matrix : IN STD_LOGIC;
400 ready_matrix : IN STD_LOGIC;
394 status_ready_matrix : OUT STD_LOGIC;
401 status_ready_matrix : OUT STD_LOGIC;
395 addr_matrix : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
402 addr_matrix : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
396 matrix_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0));
403 matrix_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0));
397 END COMPONENT;
404 END COMPONENT;
398
405
399 COMPONENT lpp_lfr_ms_reg_head
406 COMPONENT lpp_lfr_ms_reg_head
400 PORT (
407 PORT (
401 clk : IN STD_LOGIC;
408 clk : IN STD_LOGIC;
402 rstn : IN STD_LOGIC;
409 rstn : IN STD_LOGIC;
403 in_wen : IN STD_LOGIC;
410 in_wen : IN STD_LOGIC;
404 in_data : IN STD_LOGIC_VECTOR(5*16-1 DOWNTO 0);
411 in_data : IN STD_LOGIC_VECTOR(5*16-1 DOWNTO 0);
405 in_full : IN STD_LOGIC;
412 in_full : IN STD_LOGIC;
406 in_empty : IN STD_LOGIC;
413 in_empty : IN STD_LOGIC;
407 out_write_error : OUT STD_LOGIC;
414 out_write_error : OUT STD_LOGIC;
408 out_wen : OUT STD_LOGIC;
415 out_wen : OUT STD_LOGIC;
409 out_data : OUT STD_LOGIC_VECTOR(5*16-1 DOWNTO 0);
416 out_data : OUT STD_LOGIC_VECTOR(5*16-1 DOWNTO 0);
410 out_full : OUT STD_LOGIC);
417 out_full : OUT STD_LOGIC);
411 END COMPONENT;
418 END COMPONENT;
412
419
413 END lpp_lfr_pkg;
420 END lpp_lfr_pkg;
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now