@@ -71,13 +71,12 signal AddrOut : std_logic_vecto | |||||
71 | signal start : std_logic; |
|
71 | signal start : std_logic; | |
72 | signal load : std_logic; |
|
72 | signal load : std_logic; | |
73 | signal rdy : std_logic; |
|
73 | signal rdy : std_logic; | |
74 | signal zero : std_logic; |
|
|||
75 |
|
74 | |||
76 | begin |
|
75 | begin | |
77 |
|
76 | |||
78 | APB : ApbDriver |
|
77 | APB : ApbDriver | |
79 | generic map(pindex,paddr,pmask,pirq,abits,LPP_FFT,Data_sz,Addr_sz,addr_max_int) |
|
78 | generic map(pindex,paddr,pmask,pirq,abits,LPP_FFT,Data_sz,Addr_sz,addr_max_int) | |
80 |
port map(clk,rst,ReadEnable,WriteEnable,FlagEmpty,FlagFull, |
|
79 | port map(clk,rst,ReadEnable,WriteEnable,FlagEmpty,FlagFull,DataIn,DataOut,AddrIn,AddrOut,apbi,apbo); | |
81 |
|
80 | |||
82 |
|
81 | |||
83 | Extremum : Flag_Extremum |
|
82 | Extremum : Flag_Extremum | |
@@ -100,7 +99,6 begin | |||||
100 | port map(clk,start,rst,WriteEnable,ReadEnable,DataIn_im,DataIn_re,load,open,DataOut_im,DataOut_re,open,rdy); |
|
99 | port map(clk,start,rst,WriteEnable,ReadEnable,DataIn_im,DataIn_re,load,open,DataOut_im,DataOut_re,open,rdy); | |
101 |
|
100 | |||
102 | start <= not rst; |
|
101 | start <= not rst; | |
103 | zero <= '0'; |
|
|||
104 |
|
102 | |||
105 | DataIn_re <= DataIn(31 downto 16); |
|
103 | DataIn_re <= DataIn(31 downto 16); | |
106 | DataIn_im <= DataIn(15 downto 0); |
|
104 | DataIn_im <= DataIn(15 downto 0); |
@@ -27,7 +27,7 use std.textio.all; | |||||
27 | library lpp; |
|
27 | library lpp; | |
28 | use lpp.lpp_amba.all; |
|
28 | use lpp.lpp_amba.all; | |
29 |
|
29 | |||
30 |
--! Package contenant tous les programmes qui forment le composant int�gr� dans le l�on |
|
30 | --! Package contenant tous les programmes qui forment le composant int�gr� dans le l�on | |
31 |
|
31 | |||
32 | package lpp_cna is |
|
32 | package lpp_cna is | |
33 |
|
33 | |||
@@ -54,12 +54,10 component CNA_TabloC is | |||||
54 | port( |
|
54 | port( | |
55 | clock : in std_logic; |
|
55 | clock : in std_logic; | |
56 | rst : in std_logic; |
|
56 | rst : in std_logic; | |
57 |
|
|
57 | enable : in std_logic; | |
58 | bp : in std_logic; |
|
|||
59 | Data_C : in std_logic_vector(15 downto 0); |
|
58 | Data_C : in std_logic_vector(15 downto 0); | |
60 | SYNC : out std_logic; |
|
59 | SYNC : out std_logic; | |
61 | SCLK : out std_logic; |
|
60 | SCLK : out std_logic; | |
62 | Rz : out std_logic; |
|
|||
63 | flag_sd : out std_logic; |
|
61 | flag_sd : out std_logic; | |
64 | Data : out std_logic |
|
62 | Data : out std_logic | |
65 | ); |
|
63 | ); |
@@ -55,7 +55,7 entity APB_Matrix is | |||||
55 | -- Read : out std_logic; |
|
55 | -- Read : out std_logic; | |
56 | -- Take : out std_logic; |
|
56 | -- Take : out std_logic; | |
57 | -- Valid : out std_logic; |
|
57 | -- Valid : out std_logic; | |
58 | -- Received : out std_logic; |
|
58 | Res : out std_logic_vector(Result_SZ-1 downto 0); | |
59 | -- Conjugate : out std_logic; |
|
59 | -- Conjugate : out std_logic; | |
60 | -- OP1 : out std_logic_vector(3 downto 0); |
|
60 | -- OP1 : out std_logic_vector(3 downto 0); | |
61 | -- OP2 : out std_logic_vector(3 downto 0); |
|
61 | -- OP2 : out std_logic_vector(3 downto 0); | |
@@ -84,7 +84,7 begin | |||||
84 |
|
84 | |||
85 | Mspec0 : SpectralMatrix |
|
85 | Mspec0 : SpectralMatrix | |
86 | generic map (Input_SZ,Result_SZ) |
|
86 | generic map (Input_SZ,Result_SZ) | |
87 | port map(clk,rst,FIFO1,FIFO2,Full,Empty,Rec.MATRIX_Statu,ReadFIFO,WriteFIFO,Start,Result); --Start,Read,Take,Valid,Received,Conjugate,OP1,OP2 |
|
87 | port map(clk,rst,FIFO1,FIFO2,Full,Empty,Rec.MATRIX_Statu,ReadFIFO,WriteFIFO,Start,Res,Result); --Start,Read,Take,Valid,Received,Conjugate,OP1,OP2 | |
88 |
|
88 | |||
89 | process(rst,clk) |
|
89 | process(rst,clk) | |
90 | begin |
|
90 | begin |
@@ -42,6 +42,7 port( | |||||
42 | -- Read : out std_logic; |
|
42 | -- Read : out std_logic; | |
43 | -- Take : out std_logic; |
|
43 | -- Take : out std_logic; | |
44 | -- Valid : out std_logic; |
|
44 | -- Valid : out std_logic; | |
|
45 | Res : out std_logic_vector(Result_SZ-1 downto 0); | |||
45 | -- Received : out std_logic; |
|
46 | -- Received : out std_logic; | |
46 | -- Conjugate : out std_logic; |
|
47 | -- Conjugate : out std_logic; | |
47 | -- OP1 : out std_logic_vector(3 downto 0); |
|
48 | -- OP1 : out std_logic_vector(3 downto 0); | |
@@ -103,6 +104,6 Start <= Start_int; | |||||
103 | --Received <= Received_int; |
|
104 | --Received <= Received_int; | |
104 | --Valid <= Valid_int; |
|
105 | --Valid <= Valid_int; | |
105 | --Conjugate <= Conjugate_int; |
|
106 | --Conjugate <= Conjugate_int; | |
106 |
|
|
107 | Res <= Resultat; | |
107 |
|
108 | |||
108 | end ar_SpectralMatrix; No newline at end of file |
|
109 | end ar_SpectralMatrix; |
@@ -51,6 +51,7 component APB_Matrix is | |||||
51 | WriteFIFO : out std_logic; |
|
51 | WriteFIFO : out std_logic; | |
52 | Result : out std_logic_vector(Result_SZ-1 downto 0); |
|
52 | Result : out std_logic_vector(Result_SZ-1 downto 0); | |
53 | Start : out std_logic; |
|
53 | Start : out std_logic; | |
|
54 | Res : out std_logic_vector(Result_SZ-1 downto 0); | |||
54 | apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus |
|
55 | apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus | |
55 | apbo : out apb_slv_out_type --! Registre de gestion des sorties du bus |
|
56 | apbo : out apb_slv_out_type --! Registre de gestion des sorties du bus | |
56 | ); |
|
57 | ); | |
@@ -72,6 +73,7 port( | |||||
72 | ReadFIFO : out std_logic_vector(1 downto 0); |
|
73 | ReadFIFO : out std_logic_vector(1 downto 0); | |
73 | WriteFIFO : out std_logic; |
|
74 | WriteFIFO : out std_logic; | |
74 | Start : out std_logic; |
|
75 | Start : out std_logic; | |
|
76 | Res : out std_logic_vector(Result_SZ-1 downto 0); | |||
75 | Result : out std_logic_vector(Result_SZ-1 downto 0) |
|
77 | Result : out std_logic_vector(Result_SZ-1 downto 0) | |
76 | ); |
|
78 | ); | |
77 | end component; |
|
79 | end component; |
@@ -47,6 +47,7 entity APB_FifoRead is | |||||
47 | rst : in std_logic; --! Reset general du composant |
|
47 | rst : in std_logic; --! Reset general du composant | |
48 | apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus |
|
48 | apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus | |
49 | WriteEnable : in std_logic; --! Demande d'�criture dans la m�moire, g�r� hors de l'IP |
|
49 | WriteEnable : in std_logic; --! Demande d'�criture dans la m�moire, g�r� hors de l'IP | |
|
50 | RE : out std_logic; | |||
50 | Full : out std_logic; --! Flag, Memoire pleine |
|
51 | Full : out std_logic; --! Flag, Memoire pleine | |
51 | Empty : out std_logic; --! Flag, Memoire vide |
|
52 | Empty : out std_logic; --! Flag, Memoire vide | |
52 | DATA : in std_logic_vector(Data_sz-1 downto 0); --! Donn�es en entr�e de la m�moire |
|
53 | DATA : in std_logic_vector(Data_sz-1 downto 0); --! Donn�es en entr�e de la m�moire | |
@@ -83,5 +84,6 begin | |||||
83 |
|
84 | |||
84 | Empty <= FlagEmpty; |
|
85 | Empty <= FlagEmpty; | |
85 | Full <= FlagFull; |
|
86 | Full <= FlagFull; | |
|
87 | RE <= ReadEnable; | |||
86 |
|
88 | |||
87 | end ar_APB_FifoRead; No newline at end of file |
|
89 | end ar_APB_FifoRead; |
@@ -135,7 +135,9 Rec.DEVICE_AddrR <= AddrOut; | |||||
135 | if (apbi.psel(pindex) and (not apbi.pwrite)) = '1' then |
|
135 | if (apbi.psel(pindex) and (not apbi.pwrite)) = '1' then | |
136 | case apbi.paddr(abits-1 downto 2) is |
|
136 | case apbi.paddr(abits-1 downto 2) is | |
137 | when "000000" => |
|
137 | when "000000" => | |
138 |
|
|
138 | if(apbi.penable = '1')then | |
|
139 | FlagRE <= '1'; | |||
|
140 | end if; | |||
139 | Rdata(Data_sz-1 downto 0) <= Rec.DEVICE_DataR; |
|
141 | Rdata(Data_sz-1 downto 0) <= Rec.DEVICE_DataR; | |
140 | when "000001" => |
|
142 | when "000001" => | |
141 | -- Rdata(31 downto 8) <= X"AAAAAA"; |
|
143 | -- Rdata(31 downto 8) <= X"AAAAAA"; | |
@@ -166,6 +168,6 Rec.DEVICE_AddrR <= AddrOut; | |||||
166 |
|
168 | |||
167 | apbo.prdata <= Rdata when apbi.penable = '1'; |
|
169 | apbo.prdata <= Rdata when apbi.penable = '1'; | |
168 | WriteEnable <= FlagWR; |
|
170 | WriteEnable <= FlagWR; | |
169 | ReadEnable <= FlagRE; |
|
171 | ReadEnable <= FlagRE; --when apbi.penable = '1'; | |
170 |
|
172 | |||
171 | end ar_ApbDriver; No newline at end of file |
|
173 | end ar_ApbDriver; |
@@ -71,7 +71,7 end component; | |||||
71 |
|
71 | |||
72 | signal Raddr : std_logic_vector(addr_sz-1 downto 0); |
|
72 | signal Raddr : std_logic_vector(addr_sz-1 downto 0); | |
73 | signal Waddr : std_logic_vector(addr_sz-1 downto 0); |
|
73 | signal Waddr : std_logic_vector(addr_sz-1 downto 0); | |
74 |
|
|
74 | signal Data_int : std_logic_vector(Data_sz-1 downto 0); | |
75 | signal s_empty : std_logic; |
|
75 | signal s_empty : std_logic; | |
76 | signal s_full : std_logic; |
|
76 | signal s_full : std_logic; | |
77 | --signal s_full2 : std_logic; |
|
77 | --signal s_full2 : std_logic; | |
@@ -93,12 +93,12 begin | |||||
93 |
|
93 | |||
94 | SRAM : syncram_2p |
|
94 | SRAM : syncram_2p | |
95 | generic map(CFG_MEMTECH,Addr_sz,Data_sz) |
|
95 | generic map(CFG_MEMTECH,Addr_sz,Data_sz) | |
96 |
port map(clk,s_flag_RE,Raddr,Data_ |
|
96 | port map(clk,s_flag_RE,Raddr,Data_int,clk,s_flag_WR,Waddr,Data_in); | |
97 |
|
97 | |||
98 |
|
98 | |||
99 |
|
|
99 | Pipe : Pipeline | |
100 |
|
|
100 | generic map(Data_sz) | |
101 |
|
|
101 | port map(clk,raz,Data_in,Data_int,s_flag_RE,s_flag_WR,s_empty,Data_out); | |
102 |
|
102 | |||
103 |
|
103 | |||
104 | RE : Fifo_Read |
|
104 | RE : Fifo_Read |
@@ -222,6 +222,7 component APB_FifoRead is | |||||
222 | rst : in std_logic; |
|
222 | rst : in std_logic; | |
223 | apbi : in apb_slv_in_type; |
|
223 | apbi : in apb_slv_in_type; | |
224 | WriteEnable : in std_logic; |
|
224 | WriteEnable : in std_logic; | |
|
225 | RE : out std_logic; | |||
225 | Full : out std_logic; |
|
226 | Full : out std_logic; | |
226 | Empty : out std_logic; |
|
227 | Empty : out std_logic; | |
227 | DATA : in std_logic_vector(Data_sz-1 downto 0); |
|
228 | DATA : in std_logic_vector(Data_sz-1 downto 0); |
General Comments 0
You need to be logged in to leave comments.
Login now