From 512486dcf37f779e6271e299eb186ab2559eb344 Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Sat, 23 Apr 2016 22:33:36 -0700 Subject: [PATCH 1/3] Added GP_ACMP cell --- techlibs/greenpak4/cells_sim.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/techlibs/greenpak4/cells_sim.v b/techlibs/greenpak4/cells_sim.v index 706e955b..e6b5db75 100644 --- a/techlibs/greenpak4/cells_sim.v +++ b/techlibs/greenpak4/cells_sim.v @@ -13,6 +13,18 @@ module GP_4LUT(input IN0, IN1, IN2, IN3, output OUT); assign OUT = INIT[{IN3, IN2, IN1, IN0}]; endmodule +module GP_ACMP(input wire PWREN, input wire VIN, input wire VREF, output reg VOUT = 0); + + parameter BANDWIDTH = "HIGH"; + parameter VIN_BUF_EN = 0; + parameter VIN_ATTEN = 1; + parameter VIN_ISRC_EN = 0; + parameter HYSTERESIS = 0; + + //cannot simulate mixed signal IP + +endmodule + module GP_BANDGAP(output reg OK, output reg VOUT); parameter AUTO_PWRDN = 1; parameter CHOPPER_EN = 1; From 6e215f374dcd92e2c1bff8ad6114f3d3dc9b06f5 Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Sat, 23 Apr 2016 22:53:49 -0700 Subject: [PATCH 2/3] Renamed VOUT to OUT on GP_ACMP cell --- techlibs/greenpak4/cells_sim.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/techlibs/greenpak4/cells_sim.v b/techlibs/greenpak4/cells_sim.v index e6b5db75..586b7a9b 100644 --- a/techlibs/greenpak4/cells_sim.v +++ b/techlibs/greenpak4/cells_sim.v @@ -13,7 +13,7 @@ module GP_4LUT(input IN0, IN1, IN2, IN3, output OUT); assign OUT = INIT[{IN3, IN2, IN1, IN0}]; endmodule -module GP_ACMP(input wire PWREN, input wire VIN, input wire VREF, output reg VOUT = 0); +module GP_ACMP(input wire PWREN, input wire VIN, input wire VREF, output reg OUT); parameter BANDWIDTH = "HIGH"; parameter VIN_BUF_EN = 0; @@ -21,6 +21,8 @@ module GP_ACMP(input wire PWREN, input wire VIN, input wire VREF, output reg VOU parameter VIN_ISRC_EN = 0; parameter HYSTERESIS = 0; + initial OUT = 0; + //cannot simulate mixed signal IP endmodule From 349d7172023e9ee38b8e25e3bd04e2dfd0af1e62 Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Sun, 24 Apr 2016 17:01:21 -0700 Subject: [PATCH 3/3] Removed VIN_BUF_EN --- techlibs/greenpak4/cells_sim.v | 1 - 1 file changed, 1 deletion(-) diff --git a/techlibs/greenpak4/cells_sim.v b/techlibs/greenpak4/cells_sim.v index 586b7a9b..1152ffe6 100644 --- a/techlibs/greenpak4/cells_sim.v +++ b/techlibs/greenpak4/cells_sim.v @@ -16,7 +16,6 @@ endmodule module GP_ACMP(input wire PWREN, input wire VIN, input wire VREF, output reg OUT); parameter BANDWIDTH = "HIGH"; - parameter VIN_BUF_EN = 0; parameter VIN_ATTEN = 1; parameter VIN_ISRC_EN = 0; parameter HYSTERESIS = 0;