diff options
Diffstat (limited to 'techlibs/common/simlib.v')
-rw-r--r-- | techlibs/common/simlib.v | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/techlibs/common/simlib.v b/techlibs/common/simlib.v index db818269b..b10c858f2 100644 --- a/techlibs/common/simlib.v +++ b/techlibs/common/simlib.v @@ -1382,18 +1382,22 @@ endmodule `endif // -------------------------------------------------------- +`ifdef SIMLIB_FF module \$ff (D, Q); parameter WIDTH = 0; input [WIDTH-1:0] D; -output [WIDTH-1:0] Q; +output reg [WIDTH-1:0] Q; -assign D = Q; +always @($global_clk) begin + Q <= D; +end endmodule +`endif // -------------------------------------------------------- module \$dff (CLK, D, Q); |