31use ieee.std_logic_1164.
all;
32use ieee.numeric_std.
all;
33use ieee.std_logic_textio.
all;
45 constant clk_dsc : clock_dsc := (20 ns, 1 ns, 1 ns);
103 file fstim : text open read_mode is "tb_cdata2byte_stim";
104 variable iline : line;
105 variable oline : line;
106 variable ok : boolean;
107 variable dname : string(1 to 6) := (others=>' ');
108 variable idel : natural := 0;
109 variable ilen : natural := 0;
110 variable nbusy : integer := 0;
112 variable iesc : slbit := '0';
113 variable itxdata9 : slbit := '0';
114 variable itxdata : slv8 := (others=>'0');
115 variable irxdata9 : slbit := '0';
116 variable irxdata : slv8 := (others=>'0');
117 variable dat9 : slv9 := (others=>'0');
123 file_loop: while not endfile(fstim) loop
125 readline (fstim, iline);
127 readcomment(iline, ok);
128 next file_loop when ok;
130 readword(iline, dname, ok);
134 write(oline, string'(".reset"));
135 writeline(output, oline);
142 read_ea(iline, idel);
146 read_ea(iline, iesc);
150 read_ea(iline, iesc);
154 read_ea(iline, idel);
155 read_ea(iline, ilen);
157 '0' after (idel+ilen)*clk_dsc.period;
160 read_ea(iline, itxdata9);
161 readgen_ea(iline, itxdata);
162 read_ea(iline, irxdata9);
163 if irxdata9 = '0' then
166 readgen_ea(iline, irxdata);
170 dat9 := itxdata9 & itxdata;
179 writetimestamp(oline, CLK_CYCLE, ": stim ");
180 write(oline, itxdata9, right, 2);
181 write(oline, itxdata, right, 9);
182 writeoptint(oline, " nbusy=", nbusy);
183 writeline(output, oline);
189 write(oline, string'("?? unknown command: "));
191 writeline(output, oline);
192 report "aborting" severity failure;
196 report "failed to find command" severity failure;
203 writetimestamp(oline, CLK_CYCLE, ": DONE ");
204 writeline(output, oline);
213 end process proc_stim;
217 variable oline : line;
218 variable nhold : integer := 0;
228 writetimestamp(oline, CLK_CYCLE, ": monc ");
229 write(oline, string'(" "));
230 write(oline, C2B_DO, right, 9);
231 writeoptint(oline, " nhold=", nhold);
233 writeline(output, oline);
240 end process proc_monc;
244 variable oline : line;
245 variable nhold : integer := 0;
255 writetimestamp(oline, CLK_CYCLE, ": monb ");
256 write(oline, B2C_DO(8), right, 2);
257 write(oline, B2C_DO(7 downto 0), right, 9);
258 writeoptint(oline, " nhold=", nhold);
260 writeline(output, oline);
267 end process proc_monb;
OFFSET Delay_length := 200 ns
PERIOD Delay_length := 20 ns
std_logic_vector( 8 downto 0) slv9
std_logic_vector( 7 downto 0) slv8
Delay_length := 200 ns clk_offset
shared simfifo_type ( 0 to 7, 8 downto 0) sv_sff_monb_arr
slv8 :=( others => '0') C2B_DO
slv9 :=( others => '0') B2C_DO
slv9 :=( others => '0') C2B_DI
shared natural :=:= 0 sv_sff_monc_cnt
clock_dsc :=( 20 ns, 1 ns, 1 ns) clk_dsc
shared simfifo_type ( 0 to 7, 7 downto 0) sv_sff_monc_arr
shared natural :=:= 0 sv_sff_monb_cnt