Compare commits
3 Commits
52a6760ad1
...
190d64c3cf
| Author | SHA1 | Date |
|---|---|---|
|
|
190d64c3cf | |
|
|
ebbc54409c | |
|
|
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);
|
||||
|
|
|
|||
|
|
@ -4464,12 +4464,6 @@ class WidthVisitor final : public VNVisitor {
|
|||
if (AstNodeFTask* const ftaskp
|
||||
= VN_CAST(m_memberMap.findMember(ifacep, nodep->name()), NodeFTask)) {
|
||||
UINFO(5, __FUNCTION__ << "AstNodeFTask" << nodep);
|
||||
// VIF function may write any member; prevent constant-folding.
|
||||
if (adtypep->isVirtual()) {
|
||||
for (AstNode* itemp = ifacep->stmtsp(); itemp; itemp = itemp->nextp()) {
|
||||
if (AstVar* const mvarp = VN_CAST(itemp, Var)) { mvarp->sensIfacep(ifacep); }
|
||||
}
|
||||
}
|
||||
userIterate(ftaskp, nullptr);
|
||||
if (ftaskp->isStatic()) {
|
||||
AstArg* const argsp = nodep->argsp();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=['--binary', '--timing', '--timescale 1ns/1ps'])
|
||||
test.compile(verilator_flags2=['--binary'])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class Driver;
|
|||
virtual my_if vif;
|
||||
|
||||
task run();
|
||||
vif.set_period(5ns);
|
||||
vif.set_period(5);
|
||||
#10;
|
||||
vif.start_clk();
|
||||
endtask
|
||||
|
|
@ -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