mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 06:07:26 +02:00
Added $dffe cell type
This commit is contained in:
@@ -1216,6 +1216,25 @@ end
|
||||
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$dffe (CLK, EN, D, Q);
|
||||
|
||||
parameter WIDTH = 0;
|
||||
parameter CLK_POLARITY = 1'b1;
|
||||
parameter EN_POLARITY = 1'b1;
|
||||
|
||||
input CLK, EN;
|
||||
input [WIDTH-1:0] D;
|
||||
output reg [WIDTH-1:0] Q;
|
||||
wire pos_clk = CLK == CLK_POLARITY;
|
||||
|
||||
always @(posedge pos_clk) begin
|
||||
if (EN == EN_POLARITY) Q <= D;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
`ifndef SIMLIB_NOSR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user