//- 1 1 | y
//-
module \$_SR_NN_ (S, R, Q);
-parameter INIT = 1'bx;
input S, R;
-output reg Q = INIT;
+output reg Q;
always @(negedge S, negedge R) begin
if (R == 0)
Q <= 0;
//- 1 0 | y
//-
module \$_SR_NP_ (S, R, Q);
-parameter INIT = 1'bx;
input S, R;
-output reg Q = INIT;
+output reg Q;
always @(negedge S, posedge R) begin
if (R == 1)
Q <= 0;
//- 0 1 | y
//-
module \$_SR_PN_ (S, R, Q);
-parameter INIT = 1'bx;
input S, R;
-output reg Q = INIT;
+output reg Q;
always @(posedge S, negedge R) begin
if (R == 0)
Q <= 0;
//- 0 0 | y
//-
module \$_SR_PP_ (S, R, Q);
-parameter INIT = 1'bx;
input S, R;
-output reg Q = INIT;
+output reg Q;
always @(posedge S, posedge R) begin
if (R == 1)
Q <= 0;
//- type is usually only used in netlists for formal verification.)
//-
module \$_FF_ (D, Q);
-parameter INIT = 1'bx;
input D;
-output reg Q = INIT;
+output reg Q;
always @($global_clock) begin
Q <= D;
end
//- - - | q
//-
module \$_DFF_N_ (D, C, Q);
-parameter INIT = 1'bx;
input D, C;
-output reg Q = INIT;
+output reg Q;
always @(negedge C) begin
Q <= D;
end
//- - - | q
//-
module \$_DFF_P_ (D, C, Q);
-parameter INIT = 1'bx;
input D, C;
-output reg Q = INIT;
+output reg Q;
always @(posedge C) begin
Q <= D;
end
//- - - - | q
//-
module \$_DFFE_NN_ (D, C, E, Q);
-parameter INIT = 1'bx;
input D, C, E;
-output reg Q = INIT;
+output reg Q;
always @(negedge C) begin
if (!E) Q <= D;
end
//- - - - | q
//-
module \$_DFFE_NP_ (D, C, E, Q);
-parameter INIT = 1'bx;
input D, C, E;
-output reg Q = INIT;
+output reg Q;
always @(negedge C) begin
if (E) Q <= D;
end
//- - - - | q
//-
module \$_DFFE_PN_ (D, C, E, Q);
-parameter INIT = 1'bx;
input D, C, E;
-output reg Q = INIT;
+output reg Q;
always @(posedge C) begin
if (!E) Q <= D;
end
//- - - - | q
//-
module \$_DFFE_PP_ (D, C, E, Q);
-parameter INIT = 1'bx;
input D, C, E;
-output reg Q = INIT;
+output reg Q;
always @(posedge C) begin
if (E) Q <= D;
end
//- - - - | q
//-
module \$_DFF_NN0_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(negedge C or negedge R) begin
if (R == 0)
Q <= 0;
//- - - - | q
//-
module \$_DFF_NN1_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(negedge C or negedge R) begin
if (R == 0)
Q <= 1;
//- - - - | q
//-
module \$_DFF_NP0_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(negedge C or posedge R) begin
if (R == 1)
Q <= 0;
//- - - - | q
//-
module \$_DFF_NP1_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(negedge C or posedge R) begin
if (R == 1)
Q <= 1;
//- - - - | q
//-
module \$_DFF_PN0_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(posedge C or negedge R) begin
if (R == 0)
Q <= 0;
//- - - - | q
//-
module \$_DFF_PN1_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(posedge C or negedge R) begin
if (R == 0)
Q <= 1;
//- - - - | q
//-
module \$_DFF_PP0_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(posedge C or posedge R) begin
if (R == 1)
Q <= 0;
//- - - - | q
//-
module \$_DFF_PP1_ (D, C, R, Q);
-parameter INIT = 1'bx;
input D, C, R;
-output reg Q = INIT;
+output reg Q;
always @(posedge C or posedge R) begin
if (R == 1)
Q <= 1;
//- - - - - | q
//-
module \$_DFFSR_NNN_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(negedge C, negedge S, negedge R) begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_NNP_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(negedge C, negedge S, posedge R) begin
if (R == 1)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_NPN_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(negedge C, posedge S, negedge R) begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_NPP_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(negedge C, posedge S, posedge R) begin
if (R == 1)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_PNN_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(posedge C, negedge S, negedge R) begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_PNP_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(posedge C, negedge S, posedge R) begin
if (R == 1)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_PPN_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(posedge C, posedge S, negedge R) begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DFFSR_PPP_ (C, S, R, D, Q);
-parameter INIT = 1'bx;
input C, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @(posedge C, posedge S, posedge R) begin
if (R == 1)
Q <= 0;
//- - - | q
//-
module \$_DLATCH_N_ (E, D, Q);
-parameter INIT = 1'bx;
input E, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (E == 0)
Q <= D;
//- - - | q
//-
module \$_DLATCH_P_ (E, D, Q);
-parameter INIT = 1'bx;
input E, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (E == 1)
Q <= D;
//- - - - - | q
//-
module \$_DLATCHSR_NNN_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_NNP_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 1)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_NPN_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_NPP_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 1)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_PNN_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_PNP_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 1)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_PPN_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 0)
Q <= 0;
//- - - - - | q
//-
module \$_DLATCHSR_PPP_ (E, S, R, D, Q);
-parameter INIT = 1'bx;
input E, S, R, D;
-output reg Q = INIT;
+output reg Q;
always @* begin
if (R == 1)
Q <= 0;
parameter WIDTH = 0;
parameter CLK_POLARITY = 1'b1;
-parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}};
input CLK;
input [WIDTH-1:0] D;
-output reg [WIDTH-1:0] Q = INIT;
+output reg [WIDTH-1:0] Q;
wire pos_clk = CLK == CLK_POLARITY;
always @(posedge pos_clk) begin
parameter WIDTH = 0;
parameter CLK_POLARITY = 1'b1;
parameter EN_POLARITY = 1'b1;
-parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}};
input CLK, EN;
input [WIDTH-1:0] D;
-output reg [WIDTH-1:0] Q = INIT;
+output reg [WIDTH-1:0] Q;
wire pos_clk = CLK == CLK_POLARITY;
always @(posedge pos_clk) begin
parameter CLK_POLARITY = 1'b1;
parameter SET_POLARITY = 1'b1;
parameter CLR_POLARITY = 1'b1;
-parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}};
input CLK;
input [WIDTH-1:0] SET, CLR, D;
-output reg [WIDTH-1:0] Q = INIT;
+output reg [WIDTH-1:0] Q;
wire pos_clk = CLK == CLK_POLARITY;
wire [WIDTH-1:0] pos_set = SET_POLARITY ? SET : ~SET;
parameter CLK_POLARITY = 1'b1;
parameter ARST_POLARITY = 1'b1;
parameter ARST_VALUE = 0;
-parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}};
input CLK, ARST;
input [WIDTH-1:0] D;
-output reg [WIDTH-1:0] Q = INIT;
+output reg [WIDTH-1:0] Q;
wire pos_clk = CLK == CLK_POLARITY;
wire pos_arst = ARST == ARST_POLARITY;
parameter WIDTH = 0;
parameter EN_POLARITY = 1'b1;
-parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}};
input EN;
input [WIDTH-1:0] D;
-output reg [WIDTH-1:0] Q = INIT;
+output reg [WIDTH-1:0] Q;
always @* begin
if (EN == EN_POLARITY)
parameter EN_POLARITY = 1'b1;
parameter SET_POLARITY = 1'b1;
parameter CLR_POLARITY = 1'b1;
-parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}};
input EN;
input [WIDTH-1:0] SET, CLR, D;
-output reg [WIDTH-1:0] Q = INIT;
+output reg [WIDTH-1:0] Q;
wire pos_en = EN == EN_POLARITY;
wire [WIDTH-1:0] pos_set = SET_POLARITY ? SET : ~SET;