26use ieee.std_logic_1164.
all;
27use ieee.numeric_std.
all;
28use ieee.std_logic_textio.
all;
61 file fstim : text open read_mode is "tb_is61lv25616al_stim";
62 variable iline : line;
63 variable oline : line;
64 variable ok : boolean;
65 variable dname : string(1 to 6) := (others=>' ');
66 variable idtime : Delay_length := 0 ns;
67 variable imatch : boolean := false;
68 variable ival : slbit := '0';
69 variable ival2 : slv2 := (others=>'0');
70 variable ival16 : slv16 := (others=>'0');
71 variable ival18 : slv18 := (others=>'0');
72 variable ice : slbit := '0';
73 variable ioe : slbit := '0';
74 variable iwe : slbit := '0';
75 variable ibe : slv2 := "00";
76 variable iaddr : slv18 := (others=>'0');
77 variable idata : slv16 := (others=>'0');
78 variable ide : slbit := '0';
79 variable idchk : slv16 := (others=>'0');
83 file_loop: while not endfile(fstim) loop
85 readline (fstim, iline);
87 readcomment(iline, ok);
88 next file_loop when ok;
90 readword(iline, dname, ok);
94 read_ea(iline, idtime);
97 readtagval_ea(iline, "ce", imatch, ival);
98 if imatch then ice := ival;
end if;
99 readtagval_ea(iline, "oe", imatch, ival);
100 if imatch then ioe := ival;
end if;
101 readtagval_ea(iline, "we", imatch, ival);
102 if imatch then iwe := ival;
end if;
103 readtagval_ea(iline, "be", imatch, ival2, 2);
104 if imatch then ibe := ival2;
end if;
105 readtagval_ea(iline, "a", imatch, ival18, 16);
106 if imatch then iaddr := ival18;
end if;
107 readtagval_ea(iline, "de", imatch, ival);
108 if imatch then ide := ival;
end if;
109 readtagval_ea(iline, "d", imatch, ival16, 16);
110 if imatch then idata := ival16;
end if;
121 DATA <= (others=>'Z');
124 write(oline, now, right, 12);
125 write(oline, string'(": wdo "));
126 write(oline, string'(" ce="));
128 write(oline, string'(" oe="));
130 write(oline, string'(" we="));
132 write(oline, string'(" be="));
133 write(oline, ibe, right, 2);
134 write(oline, string'(" a="));
135 writegen(oline, iaddr, right, 5, 16);
136 write(oline, string'(" de="));
139 write(oline, string'(" d="));
140 writegen(oline, idata, right, 4, 16);
143 readtagval_ea(iline, "D", imatch, idchk, 16);
145 write(oline, string'(" D="));
146 writegen(oline, DATA, right, 4, 16);
147 write(oline, string'(" CHECK"));
149 write(oline, string'(" OK"));
151 write(oline, string'(" FAIL exp="));
152 writegen(oline, idchk, right, 4, 16);
156 writeline(output, oline);
159 write(oline, string'("?? unknown command: "));
161 writeline(output, oline);
162 report "aborting" severity failure;
166 report "failed to find command" severity failure;
174 write(oline, now, right, 12);
175 write(oline, string'(": DONE"));
176 writeline(output, oline);
181 end process proc_stim;
std_logic_vector( 17 downto 0) slv18
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 1 downto 0) slv2
slv16 :=( others => '0') DATA
slv18 :=( others => '0') ADDR