From d13375f31f4c298a379ac3c17e7f81ea12e4312c Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 23 Apr 2019 15:51:34 +0100 Subject: Fix some errors in the templates --- data/cells_xilinx_7.v | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'data') diff --git a/data/cells_xilinx_7.v b/data/cells_xilinx_7.v index 97ecac7..cfd7578 100644 --- a/data/cells_xilinx_7.v +++ b/data/cells_xilinx_7.v @@ -210,3 +210,55 @@ module FDSE (Q, C, CE, D, S); else if (CE) q_out <= D_in; endmodule + +module LD (Q, D, G); + + parameter INIT = 1'b0; + + output Q; + wire Q; + + input D, G; + + reg q_out; + + initial q_out = INIT; + + assign Q = q_out; + + always @(D or G) + if (G) + q_out <= D; + + specify + if (G) + (D +=> Q) = (100, 100); + (posedge G => (Q +: D)) = (100, 100); + endspecify + +endmodule + +module FD (Q, C, D); + + parameter INIT = 1'b0; + + output Q; + + input C, D; + + wire Q; + reg q_out; + tri0 GSR = glbl.GSR; + + initial q_out = INIT; + + always @(posedge C) + q_out <= D; + + assign Q = q_out; + + specify + (posedge C => (Q +: D)) = (100, 100); + endspecify + +endmodule -- cgit