@@ -364,7 +364,7 BEGIN -- beh | |||||
364 | pirq_ms => 6, |
|
364 | pirq_ms => 6, | |
365 | pirq_wfp => 14, |
|
365 | pirq_wfp => 14, | |
366 | hindex => 2, |
|
366 | hindex => 2, | |
367 |
top_lfr_version => X"01012 |
|
367 | top_lfr_version => X"010123") -- aa.bb.cc version | |
368 | -- AA : BOARD NUMBER |
|
368 | -- AA : BOARD NUMBER | |
369 | -- 0 => MINI_LFR |
|
369 | -- 0 => MINI_LFR | |
370 | -- 1 => EM |
|
370 | -- 1 => EM |
@@ -16,6 +16,7 USE techmap.gencomp.ALL; | |||||
16 |
|
16 | |||
17 | LIBRARY lpp; |
|
17 | LIBRARY lpp; | |
18 | USE lpp.lpp_sim_pkg.ALL; |
|
18 | USE lpp.lpp_sim_pkg.ALL; | |
|
19 | USE lpp.lpp_lfr_sim_pkg.ALL; | |||
19 | USE lpp.lpp_lfr_apbreg_pkg.ALL; |
|
20 | USE lpp.lpp_lfr_apbreg_pkg.ALL; | |
20 | USE lpp.lpp_lfr_time_management_apbreg_pkg.ALL; |
|
21 | USE lpp.lpp_lfr_time_management_apbreg_pkg.ALL; | |
21 |
|
22 | |||
@@ -134,6 +135,9 ARCHITECTURE behav OF testbench IS | |||||
134 |
|
135 | |||
135 |
|
136 | |||
136 | SIGNAL message_simu : STRING(1 TO 15) := "---------------"; |
|
137 | SIGNAL message_simu : STRING(1 TO 15) := "---------------"; | |
|
138 | ||||
|
139 | SIGNAL data_message : STRING(1 TO 15) := "---------------"; | |||
|
140 | SIGNAL data_read : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0'); | |||
137 |
|
141 | |||
138 | BEGIN |
|
142 | BEGIN | |
139 |
|
143 | |||
@@ -142,6 +146,7 BEGIN | |||||
142 | ----------------------------------------------------------------------------- |
|
146 | ----------------------------------------------------------------------------- | |
143 | PROCESS |
|
147 | PROCESS | |
144 | CONSTANT txp : TIME := 320 ns; |
|
148 | CONSTANT txp : TIME := 320 ns; | |
|
149 | VARIABLE data_read_v : STD_LOGIC_VECTOR(31 DOWNTO 0); | |||
145 | BEGIN -- PROCESS |
|
150 | BEGIN -- PROCESS | |
146 | TXD1 <= '1'; |
|
151 | TXD1 <= '1'; | |
147 | reset <= '0'; |
|
152 | reset <= '0'; | |
@@ -155,11 +160,15 BEGIN | |||||
155 | UART_WRITE(TXD1,txp,ADDR_BASE_GPIO & "000010",X"0000FFFF"); |
|
160 | UART_WRITE(TXD1,txp,ADDR_BASE_GPIO & "000010",X"0000FFFF"); | |
156 | UART_WRITE(TXD1,txp,ADDR_BASE_GPIO & "000001",X"00000A0A"); |
|
161 | UART_WRITE(TXD1,txp,ADDR_BASE_GPIO & "000001",X"00000A0A"); | |
157 | UART_WRITE(TXD1,txp,ADDR_BASE_GPIO & "000001",X"00000B0B"); |
|
162 | UART_WRITE(TXD1,txp,ADDR_BASE_GPIO & "000001",X"00000B0B"); | |
158 |
|
163 | UART_READ(TXD1,RXD1,txp,ADDR_BASE_GPIO & "000001",data_read_v); | ||
|
164 | data_read <= data_read_v; | |||
|
165 | data_message <= "GPIO_data_write"; | |||
|
166 | ||||
159 |
|
|
167 | -- UNSET the LFR reset | |
160 | message_simu <= "2 - LFR UNRESET"; |
|
168 | message_simu <= "2 - LFR UNRESET"; | |
161 |
U |
|
169 | UNRESET_LFR(TXD1,txp,ADDR_BASE_TIME_MANAGMENT); | |
162 |
UART_WRITE(TXD1,txp,ADDR_BASE_TIME_MANAGMENT & ADDR_LFR_TM_ |
|
170 | --UART_WRITE(TXD1,txp,ADDR_BASE_TIME_MANAGMENT & ADDR_LFR_TM_CONTROL , X"00000000"); | |
|
171 | --UART_WRITE(TXD1,txp,ADDR_BASE_TIME_MANAGMENT & ADDR_LFR_TM_TIME_LOAD , X"00000000"); | |||
163 | -- |
|
172 | -- | |
164 | message_simu <= "3 - LFR CONFIG "; |
|
173 | message_simu <= "3 - LFR CONFIG "; | |
165 | UART_WRITE(TXD1,txp,ADDR_BASE_LFR & ADDR_LFR_SM_F0_0_ADDR , X"00000B0B"); |
|
174 | UART_WRITE(TXD1,txp,ADDR_BASE_LFR & ADDR_LFR_SM_F0_0_ADDR , X"00000B0B"); |
@@ -7,10 +7,10 USE lpp.lpp_ad_conv.ALL; | |||||
7 | USE lpp.iir_filter.ALL; |
|
7 | USE lpp.iir_filter.ALL; | |
8 | USE lpp.FILTERcfg.ALL; |
|
8 | USE lpp.FILTERcfg.ALL; | |
9 | USE lpp.lpp_memory.ALL; |
|
9 | USE lpp.lpp_memory.ALL; | |
10 | USE lpp.lpp_waveform_pkg.ALL; |
|
10 | --USE lpp.lpp_waveform_pkg.ALL; | |
11 | USE lpp.lpp_dma_pkg.ALL; |
|
11 | USE lpp.lpp_dma_pkg.ALL; | |
12 | USE lpp.lpp_top_lfr_pkg.ALL; |
|
12 | --USE lpp.lpp_top_lfr_pkg.ALL; | |
13 | USE lpp.lpp_lfr_pkg.ALL; |
|
13 | --USE lpp.lpp_lfr_pkg.ALL; | |
14 | USE lpp.general_purpose.ALL; |
|
14 | USE lpp.general_purpose.ALL; | |
15 |
|
15 | |||
16 | LIBRARY techmap; |
|
16 | LIBRARY techmap; |
@@ -7,10 +7,10 USE lpp.lpp_ad_conv.ALL; | |||||
7 | USE lpp.iir_filter.ALL; |
|
7 | USE lpp.iir_filter.ALL; | |
8 | USE lpp.FILTERcfg.ALL; |
|
8 | USE lpp.FILTERcfg.ALL; | |
9 | USE lpp.lpp_memory.ALL; |
|
9 | USE lpp.lpp_memory.ALL; | |
10 | USE lpp.lpp_waveform_pkg.ALL; |
|
10 | --USE lpp.lpp_waveform_pkg.ALL; | |
11 | USE lpp.lpp_dma_pkg.ALL; |
|
11 | USE lpp.lpp_dma_pkg.ALL; | |
12 | USE lpp.lpp_top_lfr_pkg.ALL; |
|
12 | --USE lpp.lpp_top_lfr_pkg.ALL; | |
13 | USE lpp.lpp_lfr_pkg.ALL; |
|
13 | --USE lpp.lpp_lfr_pkg.ALL; | |
14 | USE lpp.general_purpose.ALL; |
|
14 | USE lpp.general_purpose.ALL; | |
15 |
|
15 | |||
16 | LIBRARY techmap; |
|
16 | LIBRARY techmap; |
@@ -7,10 +7,10 USE lpp.lpp_ad_conv.ALL; | |||||
7 | USE lpp.iir_filter.ALL; |
|
7 | USE lpp.iir_filter.ALL; | |
8 | USE lpp.FILTERcfg.ALL; |
|
8 | USE lpp.FILTERcfg.ALL; | |
9 | USE lpp.lpp_memory.ALL; |
|
9 | USE lpp.lpp_memory.ALL; | |
10 | USE lpp.lpp_waveform_pkg.ALL; |
|
10 | --USE lpp.lpp_waveform_pkg.ALL; | |
11 | USE lpp.lpp_dma_pkg.ALL; |
|
11 | USE lpp.lpp_dma_pkg.ALL; | |
12 | USE lpp.lpp_top_lfr_pkg.ALL; |
|
12 | --USE lpp.lpp_top_lfr_pkg.ALL; | |
13 | USE lpp.lpp_lfr_pkg.ALL; |
|
13 | --USE lpp.lpp_lfr_pkg.ALL; | |
14 | USE lpp.general_purpose.ALL; |
|
14 | USE lpp.general_purpose.ALL; | |
15 |
|
15 | |||
16 | LIBRARY techmap; |
|
16 | LIBRARY techmap; |
@@ -37,7 +37,7 USE lpp.lpp_amba.ALL; | |||||
37 | USE lpp.apb_devices_list.ALL; |
|
37 | USE lpp.apb_devices_list.ALL; | |
38 | USE lpp.lpp_memory.ALL; |
|
38 | USE lpp.lpp_memory.ALL; | |
39 | USE lpp.lpp_dma_pkg.ALL; |
|
39 | USE lpp.lpp_dma_pkg.ALL; | |
40 | USE lpp.lpp_waveform_pkg.ALL; |
|
40 | --USE lpp.lpp_waveform_pkg.ALL; | |
41 | LIBRARY techmap; |
|
41 | LIBRARY techmap; | |
42 | USE techmap.gencomp.ALL; |
|
42 | USE techmap.gencomp.ALL; | |
43 |
|
43 |
@@ -50,7 +50,15 PACKAGE lpp_sim_pkg IS | |||||
50 | CONSTANT ADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 2); |
|
50 | CONSTANT ADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 2); | |
51 | CONSTANT DATA : IN STD_LOGIC_VECTOR(31 DOWNTO 0) |
|
51 | CONSTANT DATA : IN STD_LOGIC_VECTOR(31 DOWNTO 0) | |
52 | ); |
|
52 | ); | |
53 |
|
53 | PROCEDURE UART_READ ( | ||
|
54 | SIGNAL TX : OUT STD_LOGIC; | |||
|
55 | SIGNAL RX : IN STD_LOGIC; | |||
|
56 | CONSTANT tx_period : IN TIME; | |||
|
57 | CONSTANT ADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 2); | |||
|
58 | DATA : OUT STD_LOGIC_VECTOR | |||
|
59 | ); | |||
|
60 | ||||
|
61 | ||||
54 | END lpp_sim_pkg; |
|
62 | END lpp_sim_pkg; | |
55 |
|
63 | |||
56 | PACKAGE BODY lpp_sim_pkg IS |
|
64 | PACKAGE BODY lpp_sim_pkg IS | |
@@ -101,4 +109,31 PACKAGE BODY lpp_sim_pkg IS | |||||
101 | tx_period); |
|
109 | tx_period); | |
102 | END; |
|
110 | END; | |
103 |
|
111 | |||
|
112 | PROCEDURE UART_READ ( | |||
|
113 | SIGNAL TX : OUT STD_LOGIC; | |||
|
114 | SIGNAL RX : IN STD_LOGIC; | |||
|
115 | CONSTANT tx_period : IN TIME; | |||
|
116 | CONSTANT ADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 2); | |||
|
117 | DATA : OUT STD_LOGIC_VECTOR ) | |||
|
118 | IS | |||
|
119 | VARIABLE V_DATA : STD_LOGIC_VECTOR(7 DOWNTO 0); | |||
|
120 | CONSTANT ADDR_last : STD_LOGIC_VECTOR(7 DOWNTO 0) := ADDR(7 DOWNTO 2) & "00"; | |||
|
121 | BEGIN | |||
|
122 | txc(TX, 16#80#, tx_period); | |||
|
123 | txa(TX, | |||
|
124 | to_integer(UNSIGNED(ADDR(31 DOWNTO 24))), | |||
|
125 | to_integer(UNSIGNED(ADDR(23 DOWNTO 16))), | |||
|
126 | to_integer(UNSIGNED(ADDR(15 DOWNTO 8))), | |||
|
127 | to_integer(UNSIGNED(ADDR_last)), | |||
|
128 | tx_period); | |||
|
129 | rxc(RX,V_DATA,tx_period); | |||
|
130 | DATA(31 DOWNTO 24) := V_DATA; | |||
|
131 | rxc(RX,V_DATA,tx_period); | |||
|
132 | DATA(23 DOWNTO 16) := V_DATA; | |||
|
133 | rxc(RX,V_DATA,tx_period); | |||
|
134 | DATA(15 DOWNTO 8) := V_DATA; | |||
|
135 | rxc(RX,V_DATA,tx_period); | |||
|
136 | DATA(7 DOWNTO 0) := V_DATA; | |||
|
137 | END; | |||
|
138 | ||||
104 | END lpp_sim_pkg; |
|
139 | END lpp_sim_pkg; |
General Comments 0
You need to be logged in to leave comments.
Login now