mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Added $initstate cell type and vlog function
This commit is contained in:
parent
d7763634b6
commit
5c166e76e5
7 changed files with 54 additions and 4 deletions
|
@ -1313,6 +1313,23 @@ endmodule
|
|||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$initstate (Y);
|
||||
|
||||
output reg Y = 1;
|
||||
reg [3:0] cnt = 1;
|
||||
reg trig = 0;
|
||||
|
||||
initial trig <= 1;
|
||||
|
||||
always @(cnt, trig) begin
|
||||
Y <= |cnt;
|
||||
cnt <= cnt + |cnt;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$equiv (A, B, Y);
|
||||
|
||||
input A, B;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue