29use ieee.std_logic_1164.
all;
30use ieee.numeric_std.
all;
31use ieee.std_logic_textio.
all;
61 report "assert(DWIDTH=8 or DWIDTH=9)" severity failure;
64 variable oline : line;
65 variable nbusy : integer := 0;
66 variable nhold : integer := 0;
67 variable edatarx : boolean := false;
68 variable edatatx : boolean := false;
71 data:
in slv(DWIDTH1
downto 0);
73 txt1:
in string(
1 to 2);
76 variable data9 : slv9 := (others=>'0');
77 variable optxt : string(1 to 8) := ": ??rx ";
81 optxt(3 to 4) := "rl";
83 optxt(3 to 4) := "r8";
85 optxt(5 to 6) := txt1;
89 write(L, data(data'left), right, 1);
91 write(L, string'(" "));
94 write(L, data(7 downto 0), right, 9);
95 writeoptint(L, txt2, nwait);
97 if DWIDTH=9 and data(data'left)='1' then
100 data9 := (others=>'0');
101 data9(data'range) := data;
102 write(L, string'(" comma"));
104 when c_rlink_dat_sop => write(L, string'(" sop"));
105 when c_rlink_dat_eop => write(L, string'(" eop"));
106 when c_rlink_dat_nak => write(L, string'(" nak"));
107 when c_rlink_dat_attn => write(L, string'(" attn"));
108 when others => write(L, string'(" clobber|oob"));
115 write(L, string'(" edata"));
116 if data(c_cdata_edf_pref) /= c_cdata_ed_pref or
117 (not data(c_cdata_edf_eci)) /= data(c_cdata_edf_ec) then
118 write(L, string'(" FAIL: bad format"));
120 write(L, string'(" ec="));
121 write(L, data(c_cdata_edf_ec));
122 data9 := (others=>'0');
124 data9(c_cdata_edf_ec) := data(c_cdata_edf_ec);
126 when c_rlink_dat_sop => write(L, string'(" (sop)"));
127 when c_rlink_dat_eop => write(L, string'(" (eop)"));
128 when c_rlink_dat_nak => write(L, string'(" (nak)"));
129 when c_rlink_dat_attn => write(L, string'(" (attn)"));
130 when "100000" & c_cdata_ec_xon => write(L, string'(" (xon)"));
131 when "100000" & c_cdata_ec_xoff => write(L, string'(" (xoff)"));
132 when "100000" & c_cdata_ec_fill => write(L, string'(" (fill)"));
133 when "100000" & c_cdata_ec_esc => write(L, string'(" (esc)"));
135 write(L, string'(" FAIL: bad ec"));
140 if data = c_cdata_escape then
141 write(L, string'(" escape"));
145 writeline(output, L);
146 end procedure write_val;
156 wait until rising_edge(CLK);
162 write_val(oline, RL_DI, nbusy, "rx", " nbusy=", edatarx);
163 edatarx := RL_DI=c_cdata_escape;
174 write_val(oline, RL_DO, nhold, "tx", " nhold=", edatatx);
175 edatatx := RL_DO=c_cdata_escape;
183 end process proc_moni;
write_valL,data,nwait,txt1,txt2,edata,
in RL_DI slv( DWIDTH- 1 downto 0)
in RL_DO slv( DWIDTH- 1 downto 0)
in CLK_CYCLE integer := 0
std_logic_vector( 8 downto 0) slv9