1 |
2 |
dimamali |
------------------------------------------------------------------------------
|
2 |
|
|
-- LEON3 Demonstration design test bench
|
3 |
|
|
-- Copyright (C) 2004 Jiri Gaisler, Gaisler Research
|
4 |
|
|
--
|
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
|
7 |
|
|
-- the Free Software Foundation; either version 2 of the License, or
|
8 |
|
|
-- (at your option) any later version.
|
9 |
|
|
--
|
10 |
|
|
-- This program is distributed in the hope that it will be useful,
|
11 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
|
|
-- GNU General Public License for more details.
|
14 |
|
|
------------------------------------------------------------------------------
|
15 |
|
|
|
16 |
|
|
library ieee;
|
17 |
|
|
use ieee.std_logic_1164.all;
|
18 |
|
|
library gaisler;
|
19 |
|
|
use gaisler.libdcom.all;
|
20 |
|
|
use gaisler.sim.all;
|
21 |
|
|
use work.debug.all;
|
22 |
|
|
use work.config.all;
|
23 |
|
|
library techmap;
|
24 |
|
|
use techmap.gencomp.all;
|
25 |
|
|
library micron;
|
26 |
|
|
use micron.components.all;
|
27 |
|
|
|
28 |
|
|
use work.config.all; -- configuration
|
29 |
|
|
|
30 |
|
|
entity testbench is
|
31 |
|
|
generic (
|
32 |
|
|
fabtech : integer := CFG_FABTECH;
|
33 |
|
|
memtech : integer := CFG_MEMTECH;
|
34 |
|
|
padtech : integer := CFG_PADTECH;
|
35 |
|
|
clktech : integer := CFG_CLKTECH;
|
36 |
|
|
disas : integer := CFG_DISAS; -- Enable disassembly to console
|
37 |
|
|
dbguart : integer := CFG_DUART; -- Print UART on console
|
38 |
|
|
pclow : integer := CFG_PCLOW;
|
39 |
|
|
|
40 |
|
|
clkperiod : integer := 20; -- system clock period
|
41 |
|
|
romwidth : integer := 32; -- rom data width (8/32)
|
42 |
|
|
romdepth : integer := 16; -- rom address depth
|
43 |
|
|
sramwidth : integer := 32; -- ram data width (8/16/32)
|
44 |
|
|
sramdepth : integer := 20; -- ram address depth
|
45 |
|
|
srambanks : integer := 2 -- number of ram banks
|
46 |
|
|
);
|
47 |
|
|
port (
|
48 |
|
|
pci_clk : inout std_logic := '0';
|
49 |
|
|
pci_lock : inout std_logic := 'H';
|
50 |
|
|
pci_ad : inout std_logic_vector(31 downto 0) := (others => 'H');
|
51 |
|
|
pci_cbe : inout std_logic_vector(3 downto 0) := (others => 'H');
|
52 |
|
|
pci_frame : inout std_logic := 'H';
|
53 |
|
|
pci_irdy : inout std_logic := 'H';
|
54 |
|
|
pci_trdy : inout std_logic := 'H';
|
55 |
|
|
pci_devsel : inout std_logic := 'H';
|
56 |
|
|
pci_stop : inout std_logic := 'H';
|
57 |
|
|
pci_perr : inout std_logic := 'H';
|
58 |
|
|
pci_par : inout std_logic := 'H';
|
59 |
|
|
pci_serr : inout std_logic := 'H'
|
60 |
|
|
|
61 |
|
|
);
|
62 |
|
|
end;
|
63 |
|
|
|
64 |
|
|
architecture behav of testbench is
|
65 |
|
|
|
66 |
|
|
constant promfile : string := "prom.srec"; -- rom contents
|
67 |
|
|
constant sramfile : string := "sram.srec"; -- ram contents
|
68 |
|
|
constant sdramfile : string := "sdram.srec"; -- sdram contents
|
69 |
|
|
|
70 |
|
|
constant CFG_SDEN : integer := CFG_MCTRLFT_SDEN + CFG_MCTRL_SDEN;
|
71 |
|
|
|
72 |
|
|
signal pci_req : std_logic := 'H';
|
73 |
|
|
signal pci_arb_gnt : std_logic_vector(0 to CFG_PCI_ARB_NGNT-1);
|
74 |
|
|
signal pci_rst : std_logic; -- PCI bus
|
75 |
|
|
signal pci_gnt : std_logic;
|
76 |
|
|
signal pci_idsel : std_logic;
|
77 |
|
|
signal pci_host : std_logic;
|
78 |
|
|
signal pci_arb_req : std_logic_vector(0 to CFG_PCI_ARB_NGNT-1);
|
79 |
|
|
|
80 |
|
|
signal clk : std_logic := '0';
|
81 |
|
|
signal Rst : std_logic := '0'; -- Reset
|
82 |
|
|
constant ct : integer := clkperiod/2;
|
83 |
|
|
|
84 |
|
|
signal address : std_logic_vector(27 downto 0);
|
85 |
|
|
signal data : std_logic_vector(31 downto 0);
|
86 |
|
|
signal cb, scb : std_logic_vector(15 downto 0);
|
87 |
|
|
|
88 |
|
|
signal ramsn : std_logic_vector(4 downto 0);
|
89 |
|
|
signal ramoen : std_logic_vector(4 downto 0);
|
90 |
|
|
signal rwen : std_logic_vector(3 downto 0);
|
91 |
|
|
signal rwenx : std_logic_vector(3 downto 0);
|
92 |
|
|
signal romsn : std_logic_vector(1 downto 0);
|
93 |
|
|
signal iosn : std_logic;
|
94 |
|
|
signal oen : std_logic;
|
95 |
|
|
signal read : std_logic;
|
96 |
|
|
signal writen : std_logic;
|
97 |
|
|
signal brdyn : std_logic;
|
98 |
|
|
signal bexcn : std_logic;
|
99 |
|
|
signal wdogn : std_logic;
|
100 |
|
|
signal dsuen, dsutx, dsurx, dsubre, dsuact : std_logic;
|
101 |
|
|
signal dsurst : std_logic;
|
102 |
|
|
signal test : std_logic;
|
103 |
|
|
signal error : std_logic;
|
104 |
|
|
signal gpio : std_logic_vector(CFG_GRGPIO_WIDTH-1 downto 0);
|
105 |
|
|
signal GND : std_logic := '0';
|
106 |
|
|
signal VCC : std_logic := '1';
|
107 |
|
|
signal NC : std_logic := 'Z';
|
108 |
|
|
signal clk2 : std_logic := '1';
|
109 |
|
|
|
110 |
|
|
signal sdcke : std_logic_vector ( 1 downto 0); -- clk en
|
111 |
|
|
signal sdcsn : std_logic_vector ( 1 downto 0); -- chip sel
|
112 |
|
|
signal sdwen : std_logic; -- write en
|
113 |
|
|
signal sdrasn : std_logic; -- row addr stb
|
114 |
|
|
signal sdcasn : std_logic; -- col addr stb
|
115 |
|
|
signal sddqm : std_logic_vector ( 3 downto 0); -- data i/o mask
|
116 |
|
|
signal sdclk : std_logic;
|
117 |
|
|
signal plllock, pllref : std_logic;
|
118 |
|
|
signal txd1, rxd1 : std_logic;
|
119 |
|
|
signal txd2, rxd2 : std_logic;
|
120 |
|
|
|
121 |
|
|
signal etx_clk, erx_clk, erx_dv, erx_er, erx_col, erx_crs, etx_en, etx_er : std_logic:='0';
|
122 |
|
|
signal erxd, etxd: std_logic_vector(3 downto 0):=(others=>'0');
|
123 |
|
|
signal emdc, emdio: std_logic; --dummy signal for the mdc,mdio in the phy which is not used
|
124 |
|
|
|
125 |
|
|
signal emddis : std_logic;
|
126 |
|
|
signal epwrdwn : std_logic;
|
127 |
|
|
signal ereset : std_logic;
|
128 |
|
|
signal esleep : std_logic;
|
129 |
|
|
signal epause : std_logic;
|
130 |
|
|
|
131 |
|
|
signal led_cfg: std_logic_vector(2 downto 0);
|
132 |
|
|
|
133 |
|
|
constant lresp : boolean := false;
|
134 |
|
|
|
135 |
|
|
signal sa : std_logic_vector(14 downto 0);
|
136 |
|
|
signal sd : std_logic_vector(31 downto 0);
|
137 |
|
|
|
138 |
|
|
signal can_txd : std_logic_vector(0 to CFG_CAN_NUM-1);
|
139 |
|
|
signal can_rxd : std_logic_vector(0 to CFG_CAN_NUM-1);
|
140 |
|
|
|
141 |
|
|
signal can_stb : std_logic;
|
142 |
|
|
|
143 |
|
|
signal spw_clkp : std_logic := '0';
|
144 |
|
|
signal spw_clkn : std_logic := '1';
|
145 |
|
|
signal spw_rxdp : std_logic_vector(0 to CFG_SPW_NUM-1) := (others => '0');
|
146 |
|
|
signal spw_rxdn : std_logic_vector(0 to CFG_SPW_NUM-1) := (others => '0');
|
147 |
|
|
signal spw_rxsp : std_logic_vector(0 to CFG_SPW_NUM-1) := (others => '0');
|
148 |
|
|
signal spw_rxsn : std_logic_vector(0 to CFG_SPW_NUM-1) := (others => '0');
|
149 |
|
|
signal spw_txdp : std_logic_vector(0 to CFG_SPW_NUM-1);
|
150 |
|
|
signal spw_txdn : std_logic_vector(0 to CFG_SPW_NUM-1);
|
151 |
|
|
signal spw_txsp : std_logic_vector(0 to CFG_SPW_NUM-1);
|
152 |
|
|
signal spw_txsn : std_logic_vector(0 to CFG_SPW_NUM-1);
|
153 |
|
|
|
154 |
|
|
begin
|
155 |
|
|
|
156 |
|
|
pci_rst <= '0', '1' after 30*20 ns;
|
157 |
|
|
pci_gnt <= 'H';
|
158 |
|
|
pci_idsel <= 'L';
|
159 |
|
|
pci_lock <= 'H';
|
160 |
|
|
pci_ad <= (others => 'H');
|
161 |
|
|
pci_cbe <= (others => 'H');
|
162 |
|
|
pci_frame <= 'H';
|
163 |
|
|
pci_irdy <= 'H';
|
164 |
|
|
pci_trdy <= 'H';
|
165 |
|
|
pci_devsel <= 'H';
|
166 |
|
|
pci_stop <= 'H';
|
167 |
|
|
pci_perr <= 'H';
|
168 |
|
|
pci_par <= 'H';
|
169 |
|
|
pci_req <= 'H';
|
170 |
|
|
pci_serr <= 'H';
|
171 |
|
|
pci_host <= 'L';
|
172 |
|
|
pci_arb_req <= (others => 'H');
|
173 |
|
|
|
174 |
|
|
pci_arb_req(1) <= pci_req;
|
175 |
|
|
pci_gnt <= pci_arb_gnt(1);
|
176 |
|
|
|
177 |
|
|
-- clock and reset
|
178 |
|
|
|
179 |
|
|
clk <= not clk after ct * 1 ns;
|
180 |
|
|
pci_clk <= not pci_clk after 30 ns;
|
181 |
|
|
spw_clkp <= not spw_clkp after 10 ns;
|
182 |
|
|
spw_clkn <= not spw_clkn after 10 ns;
|
183 |
|
|
rst <= dsurst;
|
184 |
|
|
dsuen <= '1'; dsubre <= '0'; rxd1 <= '1';
|
185 |
|
|
led_cfg<="000"; --put the phy in base10h mode
|
186 |
|
|
can_rxd <= (others => 'H'); can_rxd <= can_txd;
|
187 |
|
|
bexcn <= '1'; wdogn <= 'H';
|
188 |
|
|
gpio(2 downto 0) <= "LHL";
|
189 |
|
|
gpio(CFG_GRGPIO_WIDTH-1 downto 3) <= (others => 'H');
|
190 |
|
|
pci_arb_req <= (others => 'H');
|
191 |
|
|
pllref <= sdclk;
|
192 |
|
|
-- spacewire loop-back
|
193 |
|
|
spw_rxdp <= spw_txdp; spw_rxdn <= spw_txdn;
|
194 |
|
|
spw_rxsp <= spw_txsp; spw_rxsn <= spw_txsn;
|
195 |
|
|
|
196 |
|
|
d3 : entity work.leon3mp
|
197 |
|
|
generic map ( fabtech, memtech, padtech, clktech, disas, dbguart, pclow )
|
198 |
|
|
port map (rst, clk, error, wdogn, address(27 downto 0), data,
|
199 |
|
|
cb(7 downto 0), sdclk, sdcke, sdcsn, sdwen, sdrasn, sdcasn, sddqm,
|
200 |
|
|
dsutx, dsurx, dsuen, dsubre, dsuact, txd1, rxd1, --txd2, rxd2,
|
201 |
|
|
ramsn, ramoen, rwen, oen, writen, read, iosn, romsn, brdyn, bexcn, gpio,
|
202 |
|
|
emdio, etx_clk, erx_clk, erxd, erx_dv, erx_er, erx_col, erx_crs,
|
203 |
|
|
etxd, etx_en, etx_er, emdc,
|
204 |
|
|
pci_rst, pci_clk, pci_gnt, pci_idsel, --pci_lock,
|
205 |
|
|
pci_ad, pci_cbe, pci_frame, pci_irdy, pci_trdy, pci_devsel, pci_stop,
|
206 |
|
|
pci_perr, pci_par, pci_req, --pci_serr,
|
207 |
|
|
pci_host, --pci_66,
|
208 |
|
|
pci_arb_req, pci_arb_gnt,
|
209 |
|
|
can_txd, can_rxd,
|
210 |
|
|
spw_clkp, spw_clkn, spw_rxdp, spw_rxdn, spw_rxsp, spw_rxsn, spw_txdp,
|
211 |
|
|
spw_txdn, spw_txsp, spw_txsn, pllref
|
212 |
|
|
);
|
213 |
|
|
|
214 |
|
|
-- optional sdram
|
215 |
|
|
|
216 |
|
|
sd0 : if (CFG_SDEN = 1) and (CFG_MCTRLFT_SEPBUS = 0) generate
|
217 |
|
|
u0: mt48lc16m16a2 generic map (index => 0, fname => sdramfile)
|
218 |
|
|
PORT MAP(
|
219 |
|
|
Dq => data(31 downto 16), Addr => address(14 downto 2),
|
220 |
|
|
Ba => address(16 downto 15), Clk => sdclk, Cke => sdcke(0),
|
221 |
|
|
Cs_n => sdcsn(0), Ras_n => sdrasn, Cas_n => sdcasn, We_n => sdwen,
|
222 |
|
|
Dqm => sddqm(3 downto 2));
|
223 |
|
|
u1: mt48lc16m16a2 generic map (index => 16, fname => sdramfile)
|
224 |
|
|
PORT MAP(
|
225 |
|
|
Dq => data(15 downto 0), Addr => address(14 downto 2),
|
226 |
|
|
Ba => address(16 downto 15), Clk => sdclk, Cke => sdcke(0),
|
227 |
|
|
Cs_n => sdcsn(0), Ras_n => sdrasn, Cas_n => sdcasn, We_n => sdwen,
|
228 |
|
|
Dqm => sddqm(1 downto 0));
|
229 |
|
|
fr : if CFG_MCTRLFT = 1 generate
|
230 |
|
|
cb0: ftmt48lc16m16a2 generic map (index => 8, fname => sdramfile)
|
231 |
|
|
PORT MAP(
|
232 |
|
|
Dq => cb(15 downto 0), Addr => address(14 downto 2),
|
233 |
|
|
Ba => address(16 downto 15), Clk => sdclk, Cke => sdcke(0),
|
234 |
|
|
Cs_n => sdcsn(0), Ras_n => sdrasn, Cas_n => sdcasn, We_n => sdwen,
|
235 |
|
|
Dqm => sddqm(1 downto 0));
|
236 |
|
|
cb1: ftmt48lc16m16a2 generic map (index => 8, fname => sdramfile)
|
237 |
|
|
PORT MAP(
|
238 |
|
|
Dq => cb(15 downto 0), Addr => address(14 downto 2),
|
239 |
|
|
Ba => address(16 downto 15), Clk => sdclk, Cke => sdcke(0),
|
240 |
|
|
Cs_n => sdcsn(1), Ras_n => sdrasn, Cas_n => sdcasn, We_n => sdwen,
|
241 |
|
|
Dqm => sddqm(1 downto 0));
|
242 |
|
|
end generate;
|
243 |
|
|
u2: mt48lc16m16a2 generic map (index => 0, fname => sdramfile)
|
244 |
|
|
PORT MAP(
|
245 |
|
|
Dq => data(31 downto 16), Addr => address(14 downto 2),
|
246 |
|
|
Ba => address(16 downto 15), Clk => sdclk, Cke => sdcke(0),
|
247 |
|
|
Cs_n => sdcsn(1), Ras_n => sdrasn, Cas_n => sdcasn, We_n => sdwen,
|
248 |
|
|
Dqm => sddqm(3 downto 2));
|
249 |
|
|
u3: mt48lc16m16a2 generic map (index => 16, fname => sdramfile)
|
250 |
|
|
PORT MAP(
|
251 |
|
|
Dq => data(15 downto 0), Addr => address(14 downto 2),
|
252 |
|
|
Ba => address(16 downto 15), Clk => sdclk, Cke => sdcke(0),
|
253 |
|
|
Cs_n => sdcsn(1), Ras_n => sdrasn, Cas_n => sdcasn, We_n => sdwen,
|
254 |
|
|
Dqm => sddqm(1 downto 0));
|
255 |
|
|
end generate;
|
256 |
|
|
|
257 |
|
|
prom0 : for i in 0 to (romwidth/8)-1 generate
|
258 |
|
|
sr0 : sram generic map (index => i, abits => romdepth, fname => promfile)
|
259 |
|
|
port map (address(romdepth+1 downto 2), data(31-i*8 downto 24-i*8), romsn(0),
|
260 |
|
|
rwen(i), oen);
|
261 |
|
|
end generate;
|
262 |
|
|
|
263 |
|
|
sram0 : for i in 0 to (sramwidth/8)-1 generate
|
264 |
|
|
sr0 : sram generic map (index => i, abits => sramdepth, fname => sramfile)
|
265 |
|
|
port map (address(sramdepth+1 downto 2), data(31-i*8 downto 24-i*8), ramsn(0),
|
266 |
|
|
rwen(0), ramoen(0));
|
267 |
|
|
end generate;
|
268 |
|
|
|
269 |
|
|
fr : if CFG_MCTRLFT = 1 generate
|
270 |
|
|
sramcb0 : sramft generic map (index => 7, abits => sramdepth, fname => sramfile)
|
271 |
|
|
port map (address(sramdepth+1 downto 2), cb(7 downto 0), ramsn(0), rwen(0), ramoen(0));
|
272 |
|
|
end generate;
|
273 |
|
|
|
274 |
|
|
-- phy0 : if (CFG_GRETH = 1) generate
|
275 |
|
|
-- p0: phy
|
276 |
|
|
-- port map(rst, led_cfg, open, etx_clk, erx_clk, erxd, erx_dv,
|
277 |
|
|
-- erx_er, erx_col, erx_crs, etxd, etx_en, etx_er, emdc);
|
278 |
|
|
-- end generate;
|
279 |
|
|
error <= 'H'; -- ERROR pull-up
|
280 |
|
|
|
281 |
|
|
iuerr : process
|
282 |
|
|
begin
|
283 |
|
|
wait for 2500 ns;
|
284 |
|
|
if to_x01(error) = '1' then wait on error; end if;
|
285 |
|
|
assert (to_x01(error) = '1')
|
286 |
|
|
report "*** IU in error mode, simulation halted ***"
|
287 |
|
|
severity failure ;
|
288 |
|
|
end process;
|
289 |
|
|
|
290 |
|
|
test0 : grtestmod
|
291 |
|
|
port map ( rst, clk, error, address(21 downto 2), data,
|
292 |
|
|
iosn, oen, writen, brdyn);
|
293 |
|
|
|
294 |
|
|
data <= buskeep(data), (others => 'H') after 250 ns;
|
295 |
|
|
sd <= buskeep(sd), (others => 'H') after 250 ns;
|
296 |
|
|
|
297 |
|
|
scb <= buskeep(scb), (others => 'H') after 250 ns;
|
298 |
|
|
cb <= buskeep(cb), (others => 'H') after 250 ns;
|
299 |
|
|
|
300 |
|
|
dsucom : process
|
301 |
|
|
procedure dsucfg(signal dsurx : in std_logic; signal dsutx : out std_logic) is
|
302 |
|
|
variable w32 : std_logic_vector(31 downto 0);
|
303 |
|
|
variable c8 : std_logic_vector(7 downto 0);
|
304 |
|
|
constant txp : time := 160 * 1 ns;
|
305 |
|
|
begin
|
306 |
|
|
dsutx <= '1';
|
307 |
|
|
dsurst <= '0';
|
308 |
|
|
wait for 500 ns;
|
309 |
|
|
dsurst <= '1';
|
310 |
|
|
wait;
|
311 |
|
|
wait for 5000 ns;
|
312 |
|
|
txc(dsutx, 16#55#, txp); -- sync uart
|
313 |
|
|
|
314 |
|
|
-- txc(dsutx, 16#c0#, txp);
|
315 |
|
|
-- txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp);
|
316 |
|
|
-- txa(dsutx, 16#00#, 16#00#, 16#02#, 16#ae#, txp);
|
317 |
|
|
-- txc(dsutx, 16#c0#, txp);
|
318 |
|
|
-- txa(dsutx, 16#91#, 16#00#, 16#00#, 16#00#, txp);
|
319 |
|
|
-- txa(dsutx, 16#00#, 16#00#, 16#06#, 16#ae#, txp);
|
320 |
|
|
-- txc(dsutx, 16#c0#, txp);
|
321 |
|
|
-- txa(dsutx, 16#90#, 16#00#, 16#00#, 16#24#, txp);
|
322 |
|
|
-- txa(dsutx, 16#00#, 16#00#, 16#06#, 16#03#, txp);
|
323 |
|
|
-- txc(dsutx, 16#c0#, txp);
|
324 |
|
|
-- txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
|
325 |
|
|
-- txa(dsutx, 16#00#, 16#00#, 16#06#, 16#fc#, txp);
|
326 |
|
|
|
327 |
|
|
txc(dsutx, 16#c0#, txp);
|
328 |
|
|
txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp);
|
329 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#2f#, txp);
|
330 |
|
|
txc(dsutx, 16#c0#, txp);
|
331 |
|
|
txa(dsutx, 16#91#, 16#00#, 16#00#, 16#00#, txp);
|
332 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#6f#, txp);
|
333 |
|
|
txc(dsutx, 16#c0#, txp);
|
334 |
|
|
txa(dsutx, 16#90#, 16#11#, 16#00#, 16#00#, txp);
|
335 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#00#, txp);
|
336 |
|
|
txc(dsutx, 16#c0#, txp);
|
337 |
|
|
txa(dsutx, 16#90#, 16#40#, 16#00#, 16#04#, txp);
|
338 |
|
|
txa(dsutx, 16#00#, 16#02#, 16#20#, 16#01#, txp);
|
339 |
|
|
txc(dsutx, 16#c0#, txp);
|
340 |
|
|
txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
|
341 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#02#, txp);
|
342 |
|
|
|
343 |
|
|
txc(dsutx, 16#c0#, txp);
|
344 |
|
|
txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
|
345 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0f#, txp);
|
346 |
|
|
|
347 |
|
|
txc(dsutx, 16#c0#, txp);
|
348 |
|
|
txa(dsutx, 16#40#, 16#00#, 16#43#, 16#10#, txp);
|
349 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0f#, txp);
|
350 |
|
|
|
351 |
|
|
txc(dsutx, 16#c0#, txp);
|
352 |
|
|
txa(dsutx, 16#91#, 16#40#, 16#00#, 16#24#, txp);
|
353 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#24#, txp);
|
354 |
|
|
txc(dsutx, 16#c0#, txp);
|
355 |
|
|
txa(dsutx, 16#91#, 16#70#, 16#00#, 16#00#, txp);
|
356 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#03#, txp);
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
|
362 |
|
|
txc(dsutx, 16#c0#, txp);
|
363 |
|
|
txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
|
364 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#ff#, 16#ff#, txp);
|
365 |
|
|
|
366 |
|
|
txc(dsutx, 16#c0#, txp);
|
367 |
|
|
txa(dsutx, 16#90#, 16#40#, 16#00#, 16#48#, txp);
|
368 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#00#, 16#12#, txp);
|
369 |
|
|
|
370 |
|
|
txc(dsutx, 16#c0#, txp);
|
371 |
|
|
txa(dsutx, 16#90#, 16#40#, 16#00#, 16#60#, txp);
|
372 |
|
|
txa(dsutx, 16#00#, 16#00#, 16#12#, 16#10#, txp);
|
373 |
|
|
|
374 |
|
|
txc(dsutx, 16#80#, txp);
|
375 |
|
|
txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp);
|
376 |
|
|
rxi(dsurx, w32, txp, lresp);
|
377 |
|
|
|
378 |
|
|
txc(dsutx, 16#a0#, txp);
|
379 |
|
|
txa(dsutx, 16#40#, 16#00#, 16#00#, 16#00#, txp);
|
380 |
|
|
rxi(dsurx, w32, txp, lresp);
|
381 |
|
|
|
382 |
|
|
end;
|
383 |
|
|
|
384 |
|
|
begin
|
385 |
|
|
|
386 |
|
|
dsucfg(dsutx, dsurx);
|
387 |
|
|
|
388 |
|
|
wait;
|
389 |
|
|
end process;
|
390 |
|
|
end ;
|
391 |
|
|
|