35use ieee.std_logic_1164.
all;
36use ieee.numeric_std.
all;
37use ieee.std_logic_textio.
all;
64 variable oline : line;
65 variable nhold : integer := 0;
66 variable nburst : integer := 0;
67 variable data : slv16 := (others=>'0');
68 variable tag : string(1 to 8) := (others=>' ');
69 variable err : slbit := '0';
70 variable r_sel : slbit := '0';
75 pnhold:
in integer :=
0;
76 pnburst:
in integer :=
0;
77 pcond:
in boolean := false;
78 pctxt:
in string := )
is
81 writehex(L, RB_MREQ.addr, right, 4);
82 write(L, string'(" "));
83 writegen(L, pdata, right, 0, DBASE);
84 write(L, string'(" "));
86 writeoptint(L, " hold=", pnhold, 2);
87 writeoptint(L, " b=", pnburst, 2);
92 end procedure write_data;
102 wait until rising_edge(CLK);
104 if RB_MREQ.aval='1' and r_sel='0' then
115 data := (others=>'0');
127 write_data(oline, tag, data, nhold, nburst, err='1', " ERR='1'");
129 write_data(oline, tag, data, nhold, nburst, true, " ACK='0'");
131 nburst := nburst + 1;
137 write_data(oline, tag, data, nhold, nburst, true, " TIMEOUT");
144 write_data(oline, ": rbini ", RB_MREQ.din);
147 if unsigned(RB_LAM) /= 0 then
148 write_data(oline, ": rblam ", RB_LAM, 0, 0, true, " RB_LAM active");
154 end process proc_moni;
157 variable r_sel : slbit := '0';
158 variable r_addr : slv16 := (others=>'0');
159 variable idump : boolean := false;
160 variable oline : line;
163 if rising_edge(CLK) then
167 if r_sel='1' and RB_MREQ.addr /= r_addr then
169 ": FAIL rb_mon: addr changed after aval; initial addr=");
170 writehex(oline, r_addr, right, 4);
171 writeline(output, oline);
177 if RB_MREQ.aval='1' and r_sel='1' then
180 ": FAIL rb_mon: we and re both active");
181 writeline(output, oline);
186 ": FAIL rb_mon: init seen inside select");
187 writeline(output, oline);
193 ": FAIL rb_mon: no select and we,re seen");
194 writeline(output, oline);
200 if RB_MREQ.aval='1' or r_sel='1' then
203 ": FAIL rb_mon: init seen inside aval or select");
204 writeline(output, oline);
210 if RB_MREQ.aval='0' and r_sel='0' then
214 ": FAIL rb_mon: SRES driven outside aval or select");
215 writeline(output, oline);
222 write(oline, string'(" FAIL: MREQ aval="));
223 write(oline, RB_MREQ.aval, right, 1);
224 write(oline, string'(" re="));
225 write(oline, RB_MREQ.re , right, 1);
226 write(oline, string'(" we="));
227 write(oline, RB_MREQ.we , right, 1);
228 write(oline, string'(" init="));
229 write(oline, RB_MREQ.init, right, 1);
230 write(oline, string'(" sel="));
231 write(oline, r_sel , right, 1);
232 write(oline, string'(" addr="));
233 writehex(oline, RB_MREQ.addr, right, 4);
234 write(oline, string'(" din="));
235 writehex(oline, RB_MREQ.din, right, 4);
236 writeline(output, oline);
238 write(oline, string'(" FAIL: SRES ack="));
239 write(oline, RB_SRES.ack , right, 1);
240 write(oline, string'(" busy="));
241 write(oline, RB_SRES.busy, right, 1);
242 write(oline, string'(" err="));
243 write(oline, RB_SRES.err , right, 1);
244 write(oline, string'(" dout="));
245 writehex(oline, RB_SRES.dout, right, 4);
246 writeline(output, oline);
250 if RB_MREQ.aval='1' and r_sel='0' then
257 end process proc_check;
write_dataL,ptag,pdata,pnhold,pnburst,pcond,pctxt,
in CLK_CYCLE integer := 0
in RB_LAM slv16 :=( others => '0')
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 15 downto 0) slv16