mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Added $assert cell
This commit is contained in:
parent
9a1eb45c75
commit
1e67099b77
7 changed files with 120 additions and 1 deletions
|
@ -733,6 +733,21 @@ endmodule
|
|||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$assert (A, EN);
|
||||
|
||||
input A, EN;
|
||||
|
||||
always @* begin
|
||||
if (A !== 1'b1 && EN === 1'b1) begin
|
||||
$display("Assertation failed!");
|
||||
$finish;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$sr (SET, CLR, Q);
|
||||
|
||||
parameter WIDTH = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue