29use ieee.std_logic_1164.
all;
30use ieee.numeric_std.
all;
31use ieee.std_logic_textio.
all;
126 file fstim : text open read_mode is "tb_c7_sram_memctl_stim";
127 variable iline : line;
128 variable oline : line;
129 variable ok : boolean;
130 variable dname : string(1 to 6) := (others=>' ');
131 variable idelta : integer := 0;
132 variable iaddr : slv17 := (others=>'0');
133 variable idata : slv32 := (others=>'0');
134 variable ibe : slv4 := (others=>'0');
135 variable ival : slbit := '0';
136 variable nbusy : integer := 0;
142 file_loop: while not endfile(fstim) loop
144 readline (fstim, iline);
146 readcomment(iline, ok);
147 next file_loop when ok;
149 readword(iline, dname, ok);
153 read_ea(iline, ival);
158 write(oline, string'(".reset"));
159 writeline(output, oline);
166 read_ea(iline, idelta);
170 readgen_ea(iline, iaddr, 16);
171 readgen_ea(iline, idata, 16);
176 writetimestamp(oline, CLK_CYCLE, ": stim read ");
177 writegen(oline, iaddr, right, 6, 16);
178 write(oline, string'(" "));
179 writegen(oline, idata, right, 9, 16);
189 while BUSY = '1' loop
194 write(oline, string'(" nbusy="));
195 write(oline, nbusy, right, 2);
196 writeline(output, oline);
199 readgen_ea(iline, iaddr, 16);
201 readgen_ea(iline, idata, 16);
208 writetimestamp(oline, CLK_CYCLE, ": stim write");
209 writegen(oline, iaddr, right, 6, 16);
210 writegen(oline, ibe , right, 5, 2);
211 writegen(oline, idata, right, 9, 16);
218 while BUSY = '1' loop
223 write(oline, string'(" nbusy="));
224 write(oline, nbusy, right, 2);
225 writeline(output, oline);
229 write(oline, string'("?? unknown directive: "));
231 writeline(output, oline);
232 report "aborting" severity failure;
235 report "failed to find command" severity failure;
245 writetimestamp(oline, CLK_CYCLE, ": DONE ");
246 writeline(output, oline);
253 end process proc_stim;
257 variable oline : line;
261 wait until rising_edge(CLK);
264 writetimestamp(oline, CLK_CYCLE, ": moni ");
265 writegen(oline, DO, right, 9, 16);
267 write(oline, string'(" CHECK"));
269 write(oline, string'(" OK"));
271 write(oline, string'(" FAIL, exp="));
273 write(oline, string'(" for a="));
278 writeline(output, oline);
295 end process proc_moni;
299 variable oline : line;
303 wait until rising_edge(CLK);
306 writetimestamp(oline, CLK_CYCLE, ": mem ");
307 write(oline, string'(" ce="));
309 write(oline, string'(" we="));
311 write(oline, string'(" oe="));
313 write(oline, string'(" a="));
315 write(oline, string'(" d="));
317 writeline(output, oline);
322 end process proc_memon;
OFFSET Delay_length := 200 ns
PERIOD Delay_length := 20 ns
std_logic_vector( 18 downto 0) slv19
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 16 downto 0) slv17
std_logic_vector( 31 downto 0) slv32
std_logic_vector( 7 downto 0) slv8
slv17 :=( others => '0') R_REF_ADDR_DL
slv32 :=( others => '0') R_REF_DATA_DL
slv4 :=( others => '0') BE
slv32 :=( others => '0') DO
slbit := '0' R_CHK_DATA_DL
slv17 :=( others => '0') N_REF_ADDR
slv19 :=( others => '0') O_MEM_ADDR
Delay_length := 200 ns clock_offset
Delay_length := 5 ns setup_time
slbit := '0' R_CHK_DATA_AL
Delay_length := 10 ns c2out_time
slv17 :=( others => '0') R_REF_ADDR_AL
slv32 :=( others => '0') DI
slv8 :=( others => '0') IO_MEM_DATA
slv17 :=( others => '0') ADDR
slv32 :=( others => '0') N_REF_DATA
slv32 :=( others => '0') R_REF_DATA_AL
Delay_length := 20 ns clock_period