##// END OF EJS Templates
modif sur qq lib
martin -
r209:fc145b4179f4 martin
parent child
Show More
@@ -1,4 +1,12
1 lpp_fft.vhd
1 lpp_fft.vhd
2 actar.vhd
3 actram.vhd
4 CoreFFT.vhd
5 fft_components.vhd
6 fftDp.vhd
7 fftSm.vhd
8 primitives.vhd
9 twiddle.vhd
2 APB_FFT.vhd
10 APB_FFT.vhd
3 APB_FFT_half.vhd
11 APB_FFT_half.vhd
4 Driver_FFT.vhd
12 Driver_FFT.vhd
@@ -47,6 +47,8 use lpp.general_purpose.all;
47 use lpp.Filtercfg.all;
47 use lpp.Filtercfg.all;
48 use lpp.lpp_demux.all;
48 use lpp.lpp_demux.all;
49 use lpp.lpp_top_lfr_pkg.all;
49 use lpp.lpp_top_lfr_pkg.all;
50 use lpp.lpp_dma_pkg.all;
51 use lpp.lpp_Header.all;
50
52
51 entity leon3mp is
53 entity leon3mp is
52 generic (
54 generic (
@@ -124,7 +126,7 end;
124 architecture Behavioral of leon3mp is
126 architecture Behavioral of leon3mp is
125
127
126 constant maxahbmsp : integer := CFG_NCPU+CFG_AHB_UART+
128 constant maxahbmsp : integer := CFG_NCPU+CFG_AHB_UART+
127 CFG_GRETH+CFG_AHB_JTAG;
129 CFG_GRETH+CFG_AHB_JTAG+1; -- +1 pour le DMA
128 constant maxahbm : integer := maxahbmsp;
130 constant maxahbm : integer := maxahbmsp;
129
131
130 --Clk & Rst g�n�
132 --Clk & Rst g�n�
@@ -188,17 +190,22 signal FifoINT_Full : std_logic_vect
188 signal FifoINT_Data : std_logic_vector(79 downto 0);
190 signal FifoINT_Data : std_logic_vector(79 downto 0);
189
191
190 signal FifoOUT_Full : std_logic_vector(1 downto 0);
192 signal FifoOUT_Full : std_logic_vector(1 downto 0);
193 signal FifoOUT_Empty : std_logic_vector(1 downto 0);
194 signal FifoOUT_Data : std_logic_vector(63 downto 0);
195
191
196
192 -- MATRICE SPECTRALE
197 -- MATRICE SPECTRALE
193 signal SM_FlagError : std_logic;
198 signal SM_FlagError : std_logic;
194 signal SM_Pong : std_logic;
199 signal SM_Pong : std_logic;
200 signal SM_Wen : std_logic;
195 signal SM_Read : std_logic_vector(4 downto 0);
201 signal SM_Read : std_logic_vector(4 downto 0);
196 signal SM_Write : std_logic_vector(1 downto 0);
202 signal SM_Write : std_logic_vector(1 downto 0);
197 signal SM_ReUse : std_logic_vector(4 downto 0);
203 signal SM_ReUse : std_logic_vector(4 downto 0);
198 signal SM_Param : std_logic_vector(3 downto 0);
204 signal SM_Param : std_logic_vector(3 downto 0);
199 signal SM_Data : std_logic_vector(63 downto 0);
205 signal SM_Data : std_logic_vector(63 downto 0);
200
206
201 signal Dma_acq : std_logic;
207 --signal Dma_acq : std_logic;
208 --signal Head_Valid : std_logic;
202
209
203 -- FFT
210 -- FFT
204 signal FFT_Load : std_logic;
211 signal FFT_Load : std_logic;
@@ -208,20 +215,36 signal FFT_ReUse : std_logic_vecto
208 signal FFT_Data : std_logic_vector(79 downto 0);
215 signal FFT_Data : std_logic_vector(79 downto 0);
209
216
210 -- DEMUX
217 -- DEMUX
211 signal DEMU_Read : std_logic_vector(14 downto 0);
218 signal DMUX_Read : std_logic_vector(14 downto 0);
212 signal DEMU_Empty : std_logic_vector(4 downto 0);
219 signal DMUX_Empty : std_logic_vector(4 downto 0);
213 signal DEMU_Data : std_logic_vector(79 downto 0);
220 signal DMUX_Data : std_logic_vector(79 downto 0);
221 signal DMUX_WorkFreq : std_logic_vector(1 downto 0);
214
222
215 -- ACQ
223 -- ACQ
216 signal sample_val : STD_LOGIC;
224 signal sample_val : STD_LOGIC;
217 signal sample : Samples(8-1 DOWNTO 0);
225 signal sample : Samples(8-1 DOWNTO 0);
218
226
219 signal TopACQ_WenF0 : STD_LOGIC_VECTOR(4 DOWNTO 0);
227 signal ACQ_WenF0 : STD_LOGIC_VECTOR(4 DOWNTO 0);
220 signal TopACQ_DataF0 : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
228 signal ACQ_DataF0 : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
221 signal TopACQ_WenF1 : STD_LOGIC_VECTOR(4 DOWNTO 0);
229 signal ACQ_WenF1 : STD_LOGIC_VECTOR(4 DOWNTO 0);
222 signal TopACQ_DataF1 : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
230 signal ACQ_DataF1 : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
223 signal TopACQ_WenF3 : STD_LOGIC_VECTOR(4 DOWNTO 0);
231 signal ACQ_WenF3 : STD_LOGIC_VECTOR(4 DOWNTO 0);
224 signal TopACQ_DataF3 : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
232 signal ACQ_DataF3 : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
233
234 -- Header
235 signal Head_Read : std_logic_vector(1 downto 0);
236 signal Head_Data : std_logic_vector(31 downto 0);
237 signal Head_Empty : std_logic;
238 signal Head_Header : std_logic_vector(31 DOWNTO 0);
239 signal Head_Valid : std_logic;
240 signal Head_Val : std_logic;
241
242 --DMA
243 signal DMA_Read : std_logic;
244 signal DMA_ack : std_logic;
245 --signal AHB_Master_In : AHB_Mst_In_Type;
246 --signal AHB_Master_Out : AHB_Mst_Out_Type;
247
225
248
226 -- ADC
249 -- ADC
227 --signal SmplClk : std_logic;
250 --signal SmplClk : std_logic;
@@ -351,74 +374,103 led(1 downto 0) <= gpio(1 downto 0);
351 -- end if;
374 -- end if;
352 --end process;
375 --end process;
353
376
354 TopACQ : lpp_top_acq
377 ACQ0 : lpp_top_acq
355 port map('1',CNV_CH1,SCK_CH1,SDO_CH1,clk50MHz,rstn,clkm,rstn,TopACQ_WenF0,TopACQ_DataF0,TopACQ_WenF1,TopACQ_DataF1,open,open,TopACQ_WenF3,TopACQ_DataF3);
378 port map('1',CNV_CH1,SCK_CH1,SDO_CH1,clk50MHz,rstn,clkm,rstn,ACQ_WenF0,ACQ_DataF0,ACQ_WenF1,ACQ_DataF1,open,open,ACQ_WenF3,ACQ_DataF3);
356
379
357 Bias_Fails <= '0';
380 Bias_Fails <= '0';
358 --- FIFO IN -------------------------------------------------------------
381 --------- FIFO IN -------------------------------------------------------------
382 ----
383 -- Memf0 : APB_FIFO
384 -- generic map (pindex => 9, paddr => 9, FifoCnt => 5, Data_sz => 16, Addr_sz => 9, Enable_ReUse => '0', R => 1, W => 0)
385 -- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),ACQ_WenF0,open,open,open,ACQ_DataF0,open,open,apbi,apbo(9));
386 --
387 -- Memf1 : APB_FIFO
388 -- generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0)
389 -- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),ACQ_WenF1,open,open,open,ACQ_DataF1,open,open,apbi,apbo(8));
390 --
391 -- Memf3 : APB_FIFO
392 -- generic map (pindex => 5, paddr => 5, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0)
393 -- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),ACQ_WenF3,open,open,open,ACQ_DataF3,open,open,apbi,apbo(5));
359
394
360 -- MemOut : APB_FIFO
361 -- generic map (pindex => 9, paddr => 9, FifoCnt => 5, Data_sz => 16, Addr_sz => 9, Enable_ReUse => '0', R => 1, W => 0)
362 -- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),TopACQ_WenF0,FifoF0_Empty,open,open,TopACQ_DataF0,open,open,apbi,apbo(9));
363 Memf0 : lppFIFOxN
395 Memf0 : lppFIFOxN
364 generic map(Data_sz => 16, Addr_sz => 9, FifoCnt => 5, Enable_ReUse => '0')
396 generic map(Data_sz => 16, Addr_sz => 9, FifoCnt => 5, Enable_ReUse => '0')
365 port map(rstn,clkm,clkm,(others => '0'),TopACQ_WenF0,DEMU_Read(4 downto 0),TopACQ_DataF0,FifoF0_Data,open,FifoF0_Empty);
397 port map(rstn,clkm,clkm,(others => '0'),ACQ_WenF0,DMUX_Read(4 downto 0),ACQ_DataF0,FifoF0_Data,open,FifoF0_Empty);
366
398
367 Memf1 : lppFIFOxN
399 Memf1 : lppFIFOxN
368 generic map(Data_sz => 16, Addr_sz => 8, FifoCnt => 5, Enable_ReUse => '0')
400 generic map(Data_sz => 16, Addr_sz => 8, FifoCnt => 5, Enable_ReUse => '0')
369 port map(rstn,clkm,clkm,(others => '0'),TopACQ_WenF1,DEMU_Read(9 downto 5),TopACQ_DataF1,FifoF1_Data,open,FifoF1_Empty);
401 port map(rstn,clkm,clkm,(others => '0'),ACQ_WenF1,DMUX_Read(9 downto 5),ACQ_DataF1,FifoF1_Data,open,FifoF1_Empty);
370
402
371 Memf3 : lppFIFOxN
403 Memf3 : lppFIFOxN
372 generic map(Data_sz => 16, Addr_sz => 8, FifoCnt => 5, Enable_ReUse => '0')
404 generic map(Data_sz => 16, Addr_sz => 8, FifoCnt => 5, Enable_ReUse => '0')
373 port map(rstn,clkm,clkm,(others => '0'),TopACQ_WenF3,DEMU_Read(14 downto 10),TopACQ_DataF3,FifoF3_Data,open,FifoF3_Empty);
405 port map(rstn,clkm,clkm,(others => '0'),ACQ_WenF3,DMUX_Read(14 downto 10),ACQ_DataF3,FifoF3_Data,open,FifoF3_Empty);
374
406 --
375 --- DEMUX -------------------------------------------------------------
407 ----- DEMUX -------------------------------------------------------------
376
408
377 DEMU0 : DEMUX
409 DMUX0 : DEMUX
378 generic map(Data_sz => 16)
410 generic map(Data_sz => 16)
379 port map(clkm,rstn,FFT_Read,FFT_Load,FifoF0_Empty,FifoF1_Empty,FifoF3_Empty,FifoF0_Data,FifoF1_Data,FifoF3_Data,DEMU_Read,DEMU_Empty,DEMU_Data);
411 port map(clkm,rstn,FFT_Read,FFT_Load,FifoF0_Empty,FifoF1_Empty,FifoF3_Empty,FifoF0_Data,FifoF1_Data,FifoF3_Data,DMUX_WorkFreq,DMUX_Read,DMUX_Empty,DMUX_Data);
380
412
381 --- FFT -------------------------------------------------------------
413 ------- FFT -------------------------------------------------------------
382
414
383 -- MemIn : APB_FIFO
415 -- MemIn : APB_FIFO
384 -- generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 0, W => 1)
416 -- generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 0, W => 1)
385 -- port map (clkm,rstn,clkm,clkm,(others => '0'),FFT_Read,(others => '1'),FifoIN_Empty,FifoIN_Full,FifoIN_Data,(others => '0'),open,open,apbi,apbo(8));
417 -- port map (clkm,rstn,clkm,clkm,(others => '0'),FFT_Read,(others => '1'),DMUX_Empty,open,DMUX_Data,(others => '0'),open,open,apbi,apbo(8));
386
418
387 FFT0 : FFT
419 FFT0 : FFT
388 generic map(Data_sz => 16,NbData => 256)
420 generic map(Data_sz => 16,NbData => 256)
389 port map(clkm,rstn,DEMU_Empty,DEMU_Data,FifoINT_Full,FFT_Load,FFT_Read,FFT_Write,FFT_ReUse,FFT_Data);
421 port map(clkm,rstn,DMUX_Empty,DMUX_Data,FifoINT_Full,FFT_Load,FFT_Read,FFT_Write,FFT_ReUse,FFT_Data);
390
422
391 ----- LINK MEMORY -------------------------------------------------------
423 --------- LINK MEMORY -------------------------------------------------------
392
424
393 -- MemOut : APB_FIFO
425 -- MemOut : APB_FIFO
394 -- generic map (pindex => 9, paddr => 9, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 1, W => 0)
426 -- generic map (pindex => 9, paddr => 9, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 1, W => 0)
395 -- port map (clkm,rstn,clkm,clkm,FFT_ReUse,(others =>'1'),FFT_Write,open,FifoINT_Full,open,FFT_Data,open,open,apbi,apbo(9));
427 -- port map (clkm,rstn,clkm,clkm,FFT_ReUse,(others =>'1'),FFT_Write,open,FifoINT_Full,open,FFT_Data,open,open,apbi,apbo(9));
396
428
397 MemInt : lppFIFOxN
429 MemInt : lppFIFOxN
398 generic map(Data_sz => 16, FifoCnt => 5, Enable_ReUse => '1')
430 generic map(Data_sz => 16, Addr_sz => 8, FifoCnt => 5, Enable_ReUse => '1')
399 port map(rstn,clkm,clkm,SM_ReUse,FFT_Write,SM_Read,FFT_Data,FifoINT_Data,FifoINT_Full,open);
431 port map(rstn,clkm,clkm,SM_ReUse,FFT_Write,SM_Read,FFT_Data,FifoINT_Data,FifoINT_Full,open);
400 --
432
401 -- MemIn : APB_FIFO
433 -- MemIn : APB_FIFO
402 -- generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 0, W => 1)
434 -- generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 0, W => 1)
403 -- port map (clkm,rstn,clkm,clkm,(others => '0'),TopSM_Read,(others => '1'),open,FifoINT_Full,FifoINT_Data,(others => '0'),open,open,apbi,apbo(8));
435 -- port map (clkm,rstn,clkm,clkm,(others => '0'),SM_Read,(others => '1'),open,FifoINT_Full,FifoINT_Data,(others => '0'),open,open,apbi,apbo(8));
404
436
405 ----- MATRICE SPECTRALE ---------------------5 FIFO Input---------------
437 ----- MATRICE SPECTRALE ---------------------5 FIFO Input---------------
406
438
407 SM0 : MatriceSpectrale
439 SM0 : MatriceSpectrale
408 generic map(Input_SZ => 16,Result_SZ => 32)
440 generic map(Input_SZ => 16,Result_SZ => 32)
409 port map(clkm,rstn,FifoINT_Full,FFT_ReUse,FifoOUT_Full,FifoINT_Data,Dma_acq,SM_FlagError,SM_Pong,SM_Param,SM_Write,SM_Read,SM_ReUse,SM_Data);
441 port map(clkm,rstn,FifoINT_Full,FFT_ReUse,Head_Valid,FifoINT_Data,DMA_ack,SM_Wen,SM_FlagError,SM_Pong,SM_Param,SM_Write,SM_Read,SM_ReUse,SM_Data);
442
443
444 --DMA_ack <= '1';
445 --Head_Valid <= '1';
410
446
411 Dma_acq <= '1';
447 -- MemOut : APB_FIFO
448 -- generic map (pindex => 9, paddr => 9, FifoCnt => 2, Data_sz => 32, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0)
449 -- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),SM_Write,open,FifoOUT_Full,open,SM_Data,open,open,apbi,apbo(9));
450
451 MemOut : lppFIFOxN
452 generic map(Data_sz => 32, Addr_sz => 8, FifoCnt => 2, Enable_ReUse => '0')
453 port map(rstn,clkm,clkm,(others => '0'),SM_Write,Head_Read,SM_Data,FifoOUT_Data,FifoOUT_Full,FifoOUT_Empty);
412
454
413 MemOut : APB_FIFO
455 ----------- Header -------------------------------------------------------
414 generic map (pindex => 9, paddr => 9, FifoCnt => 2, Data_sz => 32, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0)
456
415 port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),SM_Write,open,FifoOUT_Full,open,SM_Data,open,open,apbi,apbo(9));
457 Head0 : HeaderBuilder
458 generic map(Data_sz => 32)
459 port map(clkm,rstn,SM_Pong,SM_Param,DMUX_WorkFreq,SM_Wen,Head_Valid,FifoOUT_Data,FifoOUT_Empty,Head_Read,Head_Data,Head_Empty,DMA_Read,Head_Header,Head_Val,DMA_ack);
460
461
462 --- DMA -------------------------------------------------------
463
464 DMA0 : lpp_dma
465 generic map(hindex => 1,pindex => 9, paddr => 9,pirq => 14, pmask =>16#fff#,tech => CFG_FABTECH)
466 port map(clkm,rstn,apbi,apbo(9),ahbmi,ahbmo(1),Head_Data,Head_Empty,DMA_Read,Head_Header,Head_Val,DMA_ack);
467
416
468
417 ----- FIFO -------------------------------------------------------------
469 ----- FIFO -------------------------------------------------------------
418
470
419 Memtest : APB_FIFO
471 -- Memtest : APB_FIFO
420 generic map (pindex => 5, paddr => 5, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 1, W => 1)
472 -- generic map (pindex => 5, paddr => 5, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 1, W => 1)
421 port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),(others => '1'),open,open,open,(others => '0'),open,open,apbi,apbo(5));
473 -- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),(others => '1'),open,open,open,(others => '0'),open,open,apbi,apbo(5));
422
474
423 --***************************************TEST DEMI-FIFO********************************************************************************
475 --***************************************TEST DEMI-FIFO********************************************************************************
424 -- MemIn : APB_FIFO
476 -- MemIn : APB_FIFO
@@ -585,8 +637,8 end process;
585
637
586 dcomgen : if CFG_AHB_UART = 1 generate
638 dcomgen : if CFG_AHB_UART = 1 generate
587 dcom0: ahbuart -- Debug UART
639 dcom0: ahbuart -- Debug UART
588 generic map (hindex => CFG_NCPU, pindex => 7, paddr => 7)
640 generic map (hindex => 2, pindex => 7, paddr => 7)
589 port map (rstn, clkm, ahbuarti, ahbuarto, apbi, apbo(7), ahbmi, ahbmo(CFG_NCPU));
641 port map (rstn, clkm, ahbuarti, ahbuarto, apbi, apbo(7), ahbmi, ahbmo(2));
590 dsurx_pad : inpad generic map (tech => padtech) port map (ahbrxd, ahbuarti.rxd);
642 dsurx_pad : inpad generic map (tech => padtech) port map (ahbrxd, ahbuarti.rxd);
591 dsutx_pad : outpad generic map (tech => padtech) port map (ahbtxd, ahbuarto.txd);
643 dsutx_pad : outpad generic map (tech => padtech) port map (ahbtxd, ahbuarto.txd);
592 -- led(0) <= not ahbuarti.rxd; led(1) <= not ahbuarto.txd;
644 -- led(0) <= not ahbuarti.rxd; led(1) <= not ahbuarto.txd;
@@ -189,16 +189,16 BEGIN -- beh
189 END IF;
189 END IF;
190 END PROCESS lpp_dma_apbreg;
190 END PROCESS lpp_dma_apbreg;
191
191
192 apbo.pirq <= (reg.config_active_interruption_onNewMatrix AND (ready_matrix_f0_0 OR
192 apbo.pirq(pirq) <= (reg.config_active_interruption_onNewMatrix AND (ready_matrix_f0_0 OR
193 ready_matrix_f0_1 OR
193 ready_matrix_f0_1 OR
194 ready_matrix_f1 OR
194 ready_matrix_f1 OR
195 ready_matrix_f2)
195 ready_matrix_f2)
196 )
196 )
197 OR
197 OR
198 (reg.config_active_interruption_onError AND (error_anticipating_empty_fifo OR
198 (reg.config_active_interruption_onError AND (error_anticipating_empty_fifo OR
199 error_bad_component_error)
199 error_bad_component_error)
200 );
200 );
201
201
202
202
203
203
204
204
@@ -208,4 +208,4 BEGIN -- beh
208 apbo.prdata <= prdata;
208 apbo.prdata <= prdata;
209
209
210
210
211 END beh;
211 END beh; No newline at end of file
@@ -1,5 +1,6
1 ALU_Driver.vhd
1 ALU_Driver.vhd
2 APB_Matrix.vhd
2 APB_Matrix.vhd
3 ReUse_CTRLR.vhd
3 Dispatch.vhd
4 Dispatch.vhd
4 DriveInputs.vhd
5 DriveInputs.vhd
5 GetResult.vhd
6 GetResult.vhd
@@ -1,5 +1,6
1 lpp_memory.vhd
1 lpp_memory.vhd
2 lpp_FIFO.vhd
2 lpp_FIFO.vhd
3 FillFifo.vhd
3 APB_FIFO.vhd
4 APB_FIFO.vhd
4 Bridge.vhd
5 Bridge.vhd
5 SSRAM_plugin.vhd
6 SSRAM_plugin.vhd
@@ -1,5 +1,6
1 lpp_top_lfr_pkg.vhd
1 lpp_top_lfr_pkg.vhd
2 lpp_top_apbreg.vhd
2 lpp_top_apbreg.vhd
3 lpp_top_acq.vhd
3 lpp_top_lfr_wf_picker.vhd
4 lpp_top_lfr_wf_picker.vhd
4 lpp_top_lfr_wf_picker_ip.vhd
5 lpp_top_lfr_wf_picker_ip.vhd
5 lpp_top_lfr_wf_picker_ip_whitout_filter.vhd
6 lpp_top_lfr_wf_picker_ip_whitout_filter.vhd
General Comments 0
You need to be logged in to leave comments. Login now