You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NBA inside a subroutine an edge process calls still clobbers other processes' writes before the NBA region #1885
Follow-up to #1864 / #1884. #1884 publishes exactly the bits an edge process's nonblocking assignments wrote when a process kernel may write the same variable before the NBA region. It does this only for nonblocking assignments written in the process body. A nonblocking assignment inside a task or function the edge process calls still goes through the whole-range seed and commit. A write by another process between the evaluation and the NBA region is lost, even when no nonblocking assignment executed.
An NBA update changes only the bits its lvalue names (IEEE 1800-2023 10.4.2), and the NBA region follows the active and inactive regions (4.4.2.4).
`timescale1ns/1nsmodulewin_j_al;
bit clk =0;
bit en =0;
bit [31:0] q =0;
always#1 clk =~clk;
task automaticupdate;
if (en) q <=32'h11;
endtaskalways@(posedge clk) update();
initialbegin@(posedge clk); #0;
q =32'h22;
#1;
$display("q=%h", q);
$finish;
endendmodule
The staging in Ff::lower_process (stage_nonblocking) rewrites only the assignments of the process body. Ff::subroutine_assignments excludes variables a called subroutine assigns from it. The fix needs the staging (value shadow plus written-bit mask) to reach nonblocking assignments in called subroutine bodies as well, for example by staging within inlined subroutine bodies.
Activity