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;
|
m_underProcedure = true;
|
||||||
// Workaround for killing `always` processes (doing that is pretty much UB)
|
// Workaround for killing `always` processes (doing that is pretty much UB)
|
||||||
// TODO: Disallow killing `always` at runtime (throw an error)
|
// TODO: Disallow killing `always` at runtime (throw an error)
|
||||||
// Combo blocks (always @*) must not become coroutines -- they have no
|
// Skip for combinational blocks; if the body has timing controls
|
||||||
// suspend points and would spin forever.
|
// iterateChildren will add T_SUSPENDEE, otherwise it would spin.
|
||||||
if (hasFlags(nodep, T_HAS_PROC)
|
if (hasFlags(nodep, T_HAS_PROC)
|
||||||
&& !(m_activep && m_activep->sentreep() && m_activep->sentreep()->hasCombo()))
|
&& !(m_activep && m_activep->sentreep() && m_activep->sentreep()->hasCombo()))
|
||||||
addFlags(nodep, T_SUSPENDEE);
|
addFlags(nodep, T_SUSPENDEE);
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,19 @@ endclass
|
||||||
module t;
|
module t;
|
||||||
my_if intf();
|
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
|
initial begin
|
||||||
automatic Driver d = new;
|
automatic Driver d = new;
|
||||||
d.vif = intf;
|
d.vif = intf;
|
||||||
d.run();
|
d.run();
|
||||||
repeat (4) @(posedge intf.clk);
|
repeat (4) @(posedge intf.clk);
|
||||||
|
if (combo_timing_count == 0) $stop;
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue