37use ieee.std_logic_1164.
all;
38use ieee.numeric_std.
all;
39use ieee.std_logic_textio.
all;
109 file fstim : text open read_mode is "tb_serport_uart_rxtx_stim";
110 variable iline : line;
111 variable oline : line;
112 variable idelta : integer := 0;
113 variable itxdata : slv8 := (others=>'0');
114 variable ok : boolean;
115 variable dname : string(1 to 6) := (others=>' ');
116 variable irate : integer := 16;
122 file_loop: while not endfile(fstim) loop
124 readline (fstim, iline);
126 readcomment(iline, ok);
127 next file_loop when ok;
129 readword(iline, dname, ok);
133 write(oline, string'(".reset"));
134 writeline(output, oline);
141 read_ea(iline, idelta);
145 read_ea(iline, irate);
149 read_ea(iline, idelta);
150 read_ea(iline, itxdata);
158 writetimestamp(oline, CLK_CYCLE, ": send ");
159 write(oline, itxdata, right, 10);
160 writeline(output, oline);
172 write(oline, string'("?? unknown command: "));
174 writeline(output, oline);
175 report "aborting" severity failure;
179 report "failed to find command" severity failure;
189 idelta := idelta + 1;
190 exit when idelta>3000;
193 writetimestamp(oline, CLK_CYCLE, ": DONE ");
194 writeline(output, oline);
203 end process proc_stim;
207 variable oline : line;
211 wait until rising_edge(CLK);
215 writetimestamp(oline, CLK_CYCLE, ": moni ");
216 write(oline, string'(" FAIL MISSING DATA="));
218 writeline(output, oline);
228 writetimestamp(oline, CLK_CYCLE, ": moni ");
229 write(oline, RXDATA, right, 10);
231 write(oline, string'(" RXERR=1"));
235 write(oline, string'(" FAIL UNEXPECTED"));
237 write(oline, string'(" CHECK"));
242 write(oline, string'(" OK"));
244 write(oline, string'(" FAIL"));
249 writeline(output, oline);
254 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 := slv( to_unsigned( 15, 13) ) CLKDIV
slv8 :=( others => '0') TXDATA
Delay_length := 20 ns clock_period