@@ -110,6 +110,8 @@ module prim_esc_tb;
110
110
// Drive random length of esc_req and check `esc_req_out` and `integ_fail` outputs.
111
111
main_clk.wait_clks ($urandom_range (1 , 20 ));
112
112
if (integ_fail) test_error (" Esc_req unexpected signal integrity error!" );
113
+ // Wait for the escalation request to pass through the output register.
114
+ main_clk.wait_clks (1 );
113
115
if (! esc_req_out) test_error (" Esc_req did not set esc_req!" );
114
116
esc_req = 0 ;
115
117
@@ -148,6 +150,8 @@ module prim_esc_tb;
148
150
`DV_SPINWAIT (wait (integ_fail == 1 );, , , " Wait for esc_tx.esc_n integ_fail timeout" );
149
151
main_clk.wait_clks (1 );
150
152
release esc_tx.esc_n;
153
+ // Wait for the escalation request to pass through the output register.
154
+ main_clk.wait_clks (1 );
151
155
// Wait #1ps to avoid a race condition on clock edge.
152
156
# 1ps ;
153
157
if (! esc_req_out) test_error (" Signal integrity error should set esc_req!" );
@@ -161,6 +165,8 @@ module prim_esc_tb;
161
165
`DV_SPINWAIT (wait (integ_fail == 1 );, , , " Wait for esc_rx.resp_n integ_fail timeout" );
162
166
main_clk.wait_clks (1 );
163
167
release esc_rx.resp_n;
168
+ // Wait for the escalation request to pass through the output register.
169
+ main_clk.wait_clks (1 );
164
170
// Wait #1ps to avoid a race condition on clock edge.
165
171
# 1ps ;
166
172
if (! esc_req_out) test_error (" Signal integrity error should set esc_req!" );
@@ -176,8 +182,12 @@ module prim_esc_tb;
176
182
release esc_tx.esc_n;
177
183
// Wait #1ps to avoid a race condition on clock edge.
178
184
# 1ps ;
179
- if (! esc_req_out) test_error (" Signal integrity error should set esc_req!" );
180
185
if (ping_ok) test_error (" Ping error!" );
186
+ // Wait for the escalation request to pass through the output register.
187
+ main_clk.wait_clks (1 );
188
+ // Wait #1ps to avoid a race condition on clock edge.
189
+ # 1ps ;
190
+ if (! esc_req_out) test_error (" Signal integrity error should set esc_req!" );
181
191
ping_req = 0 ;
182
192
183
193
$display (" [prim_esc_seq] Escalation esc_p/n integrity sequence during ping request finished!" );
@@ -191,7 +201,7 @@ module prim_esc_tb;
191
201
// After one ping_req, esc_receiver will start a counter to expect next ping_req. If the
192
202
// counter reaches its max value but no ping_req has been received, design will set
193
203
// `esc_req_out` signal.
194
- main_clk.wait_clks (TIMEOUT_CYCLES + 1 );
204
+ main_clk.wait_clks (TIMEOUT_CYCLES + 2 );
195
205
if (! esc_req_out) test_error (" Design failed to detect ping request timeout!" );
196
206
end
197
207
begin
@@ -200,6 +210,8 @@ module prim_esc_tb;
200
210
main_clk.wait_clks (2 );
201
211
ping_req = 0 ;
202
212
if (integ_fail) test_error (" Ping_req unexpected signal integrity error!" );
213
+ // Wait for the escalation request to pass through the output register.
214
+ main_clk.wait_clks (1 );
203
215
if (esc_req_out) test_error (" Ping request should not set esc_req_out!" );
204
216
end
205
217
join
0 commit comments