refine comments and update test
This commit is contained in:
parent
52a6760ad1
commit
78b7679fd4
|
|
@ -892,8 +892,8 @@ class TimingControlVisitor final : public VNVisitor {
|
|||
m_underProcedure = true;
|
||||
// Workaround for killing `always` processes (doing that is pretty much UB)
|
||||
// TODO: Disallow killing `always` at runtime (throw an error)
|
||||
// Combo blocks (always @*) must not become coroutines -- they have no
|
||||
// suspend points and would spin forever.
|
||||
// Skip for combinational blocks; if the body has timing controls
|
||||
// iterateChildren will add T_SUSPENDEE, otherwise it would spin.
|
||||
if (hasFlags(nodep, T_HAS_PROC)
|
||||
&& !(m_activep && m_activep->sentreep() && m_activep->sentreep()->hasCombo()))
|
||||
addFlags(nodep, T_SUSPENDEE);
|
||||
|
|
|
|||
|
|
@ -54,11 +54,19 @@ endclass
|
|||
module t;
|
||||
my_if intf();
|
||||
|
||||
// Verify combinational always with timing controls still works as coroutine
|
||||
int combo_timing_count = 0;
|
||||
always @* begin
|
||||
combo_timing_count = combo_timing_count + 1;
|
||||
#1;
|
||||
end
|
||||
|
||||
initial begin
|
||||
automatic Driver d = new;
|
||||
d.vif = intf;
|
||||
d.run();
|
||||
repeat (4) @(posedge intf.clk);
|
||||
if (combo_timing_count == 0) $stop;
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue