40use ieee.std_logic_1164.
all;
41use ieee.numeric_std.
all;
42use ieee.std_logic_textio.
all;
123 file fstim : text open read_mode is "tb_serport_autobaud_stim";
124 variable iline : line;
125 variable oline : line;
126 variable ok : boolean;
127 variable dname : string(1 to 6) := (others=>' ');
128 variable idelta : integer := 0;
129 variable irate : integer := 16;
130 variable ival : slbit;
131 variable itxdata : slv8 := (others=>'0');
139 file_loop: while not endfile(fstim) loop
141 readline (fstim, iline);
143 readcomment(iline, ok);
144 next file_loop when ok;
146 readword(iline, dname, ok);
150 write(oline, string'(".reset"));
151 writeline(output, oline);
158 read_ea(iline, idelta);
159 write(oline, string'(".break"));
160 writeline(output, oline);
166 read_ea(iline, idelta);
170 read_ea(iline, irate);
173 read_ea(iline, ival);
174 read_ea(iline, itxdata);
176 writetimestamp(oline, CLK_CYCLE, ": send ");
177 write(oline, itxdata, right, 10);
178 writeline(output, oline);
188 for i in itxdata'reverse_range loop
197 write(oline, string'("?? unknown command: "));
199 writeline(output, oline);
200 report "aborting" severity failure;
204 report "failed to find command" severity failure;
210 writetimestamp(oline, CLK_CYCLE, ": DONE ");
211 writeline(output, oline);
220 end process proc_stim;
224 variable oline : line;
225 variable iabact : slbit := '0';
229 wait until rising_edge(CLK);
233 writetimestamp(oline, CLK_CYCLE, ": moni ");
234 write(oline, string'(" FAIL MISSING DATA="));
236 writeline(output, oline);
245 if (ABACT xor iabact)='1' then
246 writetimestamp(oline, CLK_CYCLE, ": auto ABACT =");
247 write(oline, ABACT, right, 2);
249 writeline(output, oline);
253 writetimestamp(oline, CLK_CYCLE, ": auto CLKDIV =");
254 write(oline, to_integer(unsigned(CLKDIV)), right, 3);
255 writeline(output, oline);
259 writetimestamp(oline, CLK_CYCLE, ": moni ");
260 write(oline, RXDATA, right, 10);
262 write(oline, string'(" RXERR=1"));
266 write(oline, string'(" FAIL UNEXPECTED"));
268 write(oline, string'(" CHECK"));
273 write(oline, string'(" OK"));
275 write(oline, string'(" FAIL"));
280 writeline(output, oline);
285 end process proc_moni;
OFFSET Delay_length := 200 ns
PERIOD Delay_length := 20 ns
std_logic_vector( 12 downto 0) slv13
std_logic_vector( 7 downto 0) slv8
slv8 :=( others => '0') R_MON_DAT_2
slv8 :=( others => '0') RXDATA
Delay_length := 200 ns clock_offset
Delay_length := 5 ns setup_time
slv8 :=( others => '0') N_MON_DAT
slv8 :=( others => '0') R_MON_DAT_1
Delay_length := 10 ns c2out_time
slv13 :=( others => '0') CLKDIV
slv8 :=( others => '0') RXDATA3
Delay_length := 20 ns clock_period