-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4724 from YosysHQ/micko/blackbox_verific
verific: fix blackbox regression and add test case
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
verific -sv -lib <<EOF | ||
module TEST_CELL(input clk, input a, input b, output reg c); | ||
parameter PATH = "DEFAULT"; | ||
always @(posedge clk) begin | ||
if (PATH=="DEFAULT") | ||
c <= a; | ||
else | ||
c <= b; | ||
end | ||
|
||
endmodule | ||
EOF | ||
|
||
verific -sv <<EOF | ||
module top(input clk, input a, input b, output c, output d); | ||
TEST_CELL #(.PATH("TEST")) test1(.clk(clk),.a(a),.b(1'b1),.c(c)); | ||
TEST_CELL #(.PATH("DEFAULT")) test2(.clk(clk),.a(a),.b(1'bx),.c(d)); | ||
endmodule | ||
EOF | ||
|
||
verific -import top | ||
hierarchy -top top | ||
stat | ||
select -assert-count 2 t:TEST_CELL |