`timescale 1ps / 1ps
-`define SB_DFF_REG reg Q = 0
-// `define SB_DFF_REG reg Q
+`define SB_DFF_INIT initial Q = 0;
+// `define SB_DFF_INIT
`ifndef NO_ICE40_DEFAULT_ASSIGNMENTS
`define ICE40_DEFAULT_ASSIGNMENT_V(v) = v
(* abc9_flop, lib_whitebox *)
module SB_DFF (
- output `SB_DFF_REG,
+ output reg Q,
input C, D
);
+ `SB_DFF_INIT
+
always @(posedge C)
Q <= D;
`ifdef ICE40_HX
(* abc9_flop, lib_whitebox *)
module SB_DFFE (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, D
);
+ `SB_DFF_INIT
+
always @(posedge C)
if (E)
Q <= D;
(* abc9_flop, lib_whitebox *)
module SB_DFFSR (
- output `SB_DFF_REG,
+ output reg Q,
input C, R, D
);
+ `SB_DFF_INIT
+
always @(posedge C)
if (R)
Q <= 0;
(* abc9_box, lib_whitebox *)
module SB_DFFR (
- output `SB_DFF_REG,
+ output reg Q,
input C, R, D
);
+ `SB_DFF_INIT
+
always @(posedge C, posedge R)
if (R)
Q <= 0;
(* abc9_flop, lib_whitebox *)
module SB_DFFSS (
- output `SB_DFF_REG,
+ output reg Q,
input C, S, D
);
+ `SB_DFF_INIT
+
always @(posedge C)
if (S)
Q <= 1;
(* abc9_box, lib_whitebox *)
module SB_DFFS (
- output `SB_DFF_REG,
+ output reg Q,
input C, S, D
);
+ `SB_DFF_INIT
+
always @(posedge C, posedge S)
if (S)
Q <= 1;
(* abc9_flop, lib_whitebox *)
module SB_DFFESR (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, R, D
);
+ `SB_DFF_INIT
+
always @(posedge C)
if (E) begin
if (R)
(* abc9_box, lib_whitebox *)
module SB_DFFER (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, R, D
);
+ `SB_DFF_INIT
+
always @(posedge C, posedge R)
if (R)
Q <= 0;
(* abc9_flop, lib_whitebox *)
module SB_DFFESS (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, S, D
);
+ `SB_DFF_INIT
+
always @(posedge C)
if (E) begin
if (S)
(* abc9_box, lib_whitebox *)
module SB_DFFES (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, S, D
);
+ `SB_DFF_INIT
+
always @(posedge C, posedge S)
if (S)
Q <= 1;
(* abc9_flop, lib_whitebox *)
module SB_DFFN (
- output `SB_DFF_REG,
+ output reg Q,
input C, D
);
+ `SB_DFF_INIT
+
always @(negedge C)
Q <= D;
`ifdef ICE40_HX
(* abc9_flop, lib_whitebox *)
module SB_DFFNE (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, D
);
+ `SB_DFF_INIT
+
always @(negedge C)
if (E)
Q <= D;
(* abc9_flop, lib_whitebox *)
module SB_DFFNSR (
- output `SB_DFF_REG,
+ output reg Q,
input C, R, D
);
+ `SB_DFF_INIT
+
always @(negedge C)
if (R)
Q <= 0;
(* abc9_flop, lib_whitebox *)
module SB_DFFNR (
- output `SB_DFF_REG,
+ output reg Q,
input C, R, D
);
+ `SB_DFF_INIT
+
always @(negedge C, posedge R)
if (R)
Q <= 0;
(* abc9_flop, lib_whitebox *)
module SB_DFFNSS (
- output `SB_DFF_REG,
+ output reg Q,
input C, S, D
);
+ `SB_DFF_INIT
+
always @(negedge C)
if (S)
Q <= 1;
(* abc9_box, lib_whitebox *)
module SB_DFFNS (
- output `SB_DFF_REG,
+ output reg Q,
input C, S, D
);
+ `SB_DFF_INIT
+
always @(negedge C, posedge S)
if (S)
Q <= 1;
(* abc9_flop, lib_whitebox *)
module SB_DFFNESR (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, R, D
);
+ `SB_DFF_INIT
+
always @(negedge C)
if (E) begin
if (R)
(* abc9_box, lib_whitebox *)
module SB_DFFNER (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, R, D
);
+ `SB_DFF_INIT
+
always @(negedge C, posedge R)
if (R)
Q <= 0;
(* abc9_flop, lib_whitebox *)
module SB_DFFNESS (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, S, D
);
+ `SB_DFF_INIT
+
always @(negedge C)
if (E) begin
if (S)
(* abc9_box, lib_whitebox *)
module SB_DFFNES (
- output `SB_DFF_REG,
+ output reg Q,
input C, E `ICE40_DEFAULT_ASSIGNMENT_1, S, D
);
+ `SB_DFF_INIT
+
always @(negedge C, posedge S)
if (S)
Q <= 1;