mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-19 21:55:48 +00:00
dlatchlibmap: making a copy of test files dfflibmap* to dlatchlibmap*
This commit is contained in:
parent
6b1d5dedbf
commit
69df81756c
13 changed files with 843 additions and 0 deletions
31
tests/techmap/dlatchlibmap-sim.v
Normal file
31
tests/techmap/dlatchlibmap-sim.v
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
module dffn(input CLK, D, output reg Q, output QN);
|
||||
|
||||
always @(negedge CLK)
|
||||
Q <= D;
|
||||
|
||||
assign QN = ~Q;
|
||||
|
||||
endmodule
|
||||
|
||||
module dffsr(input CLK, D, CLEAR, PRESET, output reg Q, output QN);
|
||||
|
||||
always @(posedge CLK, posedge CLEAR, posedge PRESET)
|
||||
if (CLEAR)
|
||||
Q <= 0;
|
||||
else if (PRESET)
|
||||
Q <= 1;
|
||||
else
|
||||
Q <= D;
|
||||
|
||||
assign QN = ~Q;
|
||||
|
||||
endmodule
|
||||
|
||||
module dffe(input CLK, EN, D, output reg Q, output QN);
|
||||
|
||||
always @(negedge CLK)
|
||||
if (EN) Q <= D;
|
||||
|
||||
assign QN = ~Q;
|
||||
|
||||
endmodule
|
||||
Loading…
Add table
Add a link
Reference in a new issue