27use ieee.std_logic_1164.
all;
28use ieee.numeric_std.
all;
29use ieee.std_logic_textio.
all;
97 file fstim : text open read_mode is "tb_mt45w8mw16b_stim";
98 variable iline : line;
99 variable oline : line;
100 variable ok : boolean;
101 variable dname : string(1 to 6) := (others=>' ');
102 variable idtime : Delay_length := 0 ns;
103 variable imatch : boolean := false;
104 variable ival : slbit := '0';
105 variable ival2 : slv2 := (others=>'0');
106 variable ival16 : slv16 := (others=>'0');
107 variable ival23 : slv23 := (others=>'0');
108 variable ice : slbit := '0';
109 variable ioe : slbit := '0';
110 variable iwe : slbit := '0';
111 variable ibe : slv2 := "00";
112 variable icre : slbit := '0';
113 variable iaddr : slv23 := (others=>'0');
114 variable idata : slv16 := (others=>'0');
115 variable ide : slbit := '0';
116 variable idchk : slv16 := (others=>'0');
130 file_loop: while not endfile(fstim) loop
132 readline (fstim, iline);
134 readcomment(iline, ok);
135 next file_loop when ok;
137 readword(iline, dname, ok);
141 read_ea(iline, idtime);
144 readtagval_ea(iline, "ce", imatch, ival);
145 if imatch then ice := ival;
end if;
146 readtagval_ea(iline, "cre", imatch, ival);
147 if imatch then icre := ival;
end if;
148 readtagval_ea(iline, "oe", imatch, ival);
149 if imatch then ioe := ival;
end if;
150 readtagval_ea(iline, "we", imatch, ival);
151 if imatch then iwe := ival;
end if;
152 readtagval_ea(iline, "be", imatch, ival2, 2);
153 if imatch then ibe := ival2;
end if;
154 readtagval_ea(iline, "a", imatch, ival23, 16);
155 if imatch then iaddr := ival23;
end if;
156 readtagval_ea(iline, "de", imatch, ival);
157 if imatch then ide := ival;
end if;
158 readtagval_ea(iline, "d", imatch, ival16, 16);
159 if imatch then idata := ival16;
end if;
174 write(oline, now, right, 12);
175 write(oline, string'(": wdo "));
176 write(oline, string'(" ce="));
178 write(oline, string'(" oe="));
180 write(oline, string'(" we="));
183 write(oline, string'(" be="));
184 write(oline, ibe, right, 2);
186 write(oline, string'(" cre=1"));
188 write(oline, string'(" a="));
189 writegen(oline, iaddr, right, 6, 16);
190 write(oline, string'(" de="));
193 write(oline, string'(" d="));
194 writegen(oline, idata, right, 4, 16);
197 readtagval_ea(iline, "D", imatch, idchk, 16);
199 write(oline, string'(" D="));
200 writegen(oline, TB_DATA, right, 4, 16);
201 write(oline, string'(" CHECK"));
203 write(oline, string'(" OK"));
205 write(oline, string'(" FAIL exp="));
206 writegen(oline, idchk, right, 4, 16);
210 writeline(output, oline);
213 write(oline, string'("?? unknown command: "));
215 writeline(output, oline);
216 report "aborting" severity failure;
220 report "failed to find command" severity failure;
228 write(oline, now, right, 12);
229 write(oline, string'(": DONE"));
230 writeline(output, oline);
235 end process proc_stim;
inout B slv( DWIDTH- 1 downto 0)
inout A slv( DWIDTH- 1 downto 0)
std_logic_vector( 22 downto 0) slv23
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 1 downto 0) slv2
slv16 :=( others => 'Z') MM_DATA
slv16 :=( others => 'Z') TB_DATA
Delay_length := 1 ns pcb_delay
slv23 :=( others => '0') TB_ADDR
slv23 :=( others => '0') MM_ADDR