23use ieee.std_logic_1164.
all;
24use ieee.numeric_std.
all;
25use ieee.std_logic_textio.
all;
54 file fstim : text open read_mode is "tb_is61wv5128bll_stim";
55 variable iline : line;
56 variable oline : line;
57 variable ok : boolean;
58 variable dname : string(1 to 6) := (others=>' ');
59 variable idtime : Delay_length := 0 ns;
60 variable imatch : boolean := false;
61 variable ival : slbit := '0';
62 variable ival8 : slv8 := (others=>'0');
63 variable ival19 : slv19 := (others=>'0');
64 variable ice : slbit := '0';
65 variable ioe : slbit := '0';
66 variable iwe : slbit := '0';
67 variable iaddr : slv19 := (others=>'0');
68 variable idata : slv8 := (others=>'0');
69 variable ide : slbit := '0';
70 variable idchk : slv8 := (others=>'0');
74 file_loop: while not endfile(fstim) loop
76 readline (fstim, iline);
78 readcomment(iline, ok);
79 next file_loop when ok;
81 readword(iline, dname, ok);
85 read_ea(iline, idtime);
88 readtagval_ea(iline, "ce", imatch, ival);
89 if imatch then ice := ival;
end if;
90 readtagval_ea(iline, "oe", imatch, ival);
91 if imatch then ioe := ival;
end if;
92 readtagval_ea(iline, "we", imatch, ival);
93 if imatch then iwe := ival;
end if;
94 readtagval_ea(iline, "a", imatch, ival19, 16);
95 if imatch then iaddr := ival19;
end if;
96 readtagval_ea(iline, "de", imatch, ival);
97 if imatch then ide := ival;
end if;
98 readtagval_ea(iline, "d", imatch, ival8, 16);
99 if imatch then idata := ival8;
end if;
108 DATA <= (others=>'Z');
111 write(oline, now, right, 12);
112 write(oline, string'(": wdo "));
113 write(oline, string'(" ce="));
115 write(oline, string'(" oe="));
117 write(oline, string'(" we="));
119 write(oline, string'(" a="));
120 writegen(oline, iaddr, right, 5, 16);
121 write(oline, string'(" de="));
124 write(oline, string'(" d="));
125 writegen(oline, idata, right, 4, 16);
128 readtagval_ea(iline, "D", imatch, idchk, 16);
130 write(oline, string'(" D="));
131 writegen(oline, DATA, right, 4, 16);
132 write(oline, string'(" CHECK"));
134 write(oline, string'(" OK"));
136 write(oline, string'(" FAIL exp="));
137 writegen(oline, idchk, right, 4, 16);
141 writeline(output, oline);
144 write(oline, string'("?? unknown command: "));
146 writeline(output, oline);
147 report "aborting" severity failure;
151 report "failed to find command" severity failure;
159 write(oline, now, right, 12);
160 write(oline, string'(": DONE"));
161 writeline(output, oline);
166 end process proc_stim;
std_logic_vector( 18 downto 0) slv19
std_logic_vector( 7 downto 0) slv8
slv19 :=( others => '0') ADDR
slv8 :=( others => '0') DATA