Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fork..join_none inside automatic task fails assertion #1103

Open
abradd opened this issue Feb 22, 2024 · 0 comments
Open

fork..join_none inside automatic task fails assertion #1103

abradd opened this issue Feb 22, 2024 · 0 comments
Labels

Comments

@abradd
Copy link

abradd commented Feb 22, 2024

I tested this on 61943c8. The following code snippet:

module top;
    task automatic test_task;
        fork
            $display("inside fork");
            $display("inside fork2");
        // join;
        // join_any;
        join_none;
        $display("Test task completes");
    endtask

    initial test_task();
    
endmodule

Throws:

vvp: vthread.cc:3796: bool of_JOIN_DETACH(vthread_t, vvp_code_t): Assertion `child->wt_context==0 || thr->wt_context!=child->wt_context' failed.
[1]    213958 IOT instruction (core dumped)  ./test_bench

when run with:

iverilog -g2012 -o test_bench test_fork.sv

The issue seems to be specific to join_none and the task being declared automatic. An automatic task works as expected with join/join_any and a static task works with any fork..join structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants