Merge pull request #795 from larsclausen/gh793-add-driver

Insert drivers for undriven nets
This commit is contained in:
Stephen Williams 2022-12-02 18:03:32 -08:00 committed by GitHub
commit 3438078c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View File

@ -185,7 +185,7 @@ void PGAssign::elaborate(Design*des, NetScope*scope) const
// expression. In this case, we will need to create a driver
// (later) to carry strengths.
bool need_driver_flag = false;
if (dynamic_cast<NetESignal*>(rval_expr))
if (dynamic_cast<NetESignal*>(rval_expr) ||!rval->is_linked())
need_driver_flag = true;
// expression elaboration should have caused the rval width to

View File

@ -0,0 +1,17 @@
// Check that $signed/$unsigned works when being combinatorially assigned with a
// delay and the target of the function is a net without any drivers.
module top ();
wire [7:0] a;
wire signed [7:0] b;
assign #1 b = $signed(a);
initial begin
#10
if (b === 8'hzz) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule

View File

@ -349,6 +349,7 @@ br_gh632b normal,-S ivltests
br_gh632c normal ivltests
br_gh674 normal ivltests
br_gh732 normal ivltests gold=br_gh732.gold
br_gh793 normal ivltests
br_ml20150315 normal ivltests gold=br_ml_20150315.gold
br_ml20150321 CE ivltests
br_mw20171108 normal ivltests