From 67f5b43dd7d3362b12febdfcef3d8a889e723be8 Mon Sep 17 00:00:00 2001 From: Maciej Dudek Date: Wed, 20 Dec 2023 15:06:06 +0100 Subject: [PATCH] ASAP7: Add fa/ha mapping This commit adds fa_ha_mapping files to the ASAP7 R/L/SL PDKs. Signed-off-by: Maciej Dudek --- .../BUILD | 3 + .../cell_adders_L.v | 56 +++++++++++++++++++ .../cell_adders_R.v | 56 +++++++++++++++++++ .../cell_adders_SL.v | 56 +++++++++++++++++++ .../bundled.BUILD.bazel | 4 ++ .../cells-lvt.bzl | 1 + .../cells-rvt.bzl | 1 + .../cells-rvt_4x.bzl | 1 + .../cells-slvt.bzl | 1 + .../bundled.BUILD.bazel | 3 + .../cells-lvt.bzl | 1 + .../cells-rvt.bzl | 1 + .../cells-slvt.bzl | 1 + 13 files changed, 185 insertions(+) create mode 100644 dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_L.v create mode 100644 dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_R.v create mode 100644 dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_SL.v diff --git a/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/BUILD b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/BUILD index 31c94bec..db0f09a6 100644 --- a/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/BUILD +++ b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/BUILD @@ -25,4 +25,7 @@ exports_files([ "pdn_config_1x.pdn", # FIXME: Where did this come from? "pdn_config_4x.pdn", # FIXME: Where did this come from? "asap7.lyt", # Imported from OpenROAD-flow-scripts on 24.07.2023 at 6ec980e1d49a1a8dcdd1e25ed81255b4bb8285c8 from: https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/6ec980e1d49a1a8dcdd1e25ed81255b4bb8285c8/flow/platforms/asap7/KLayout/asap7.lyt + "cell_adders_R.v", + "cell_adders_L.v", + "cell_adders_SL.v", ]) diff --git a/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_L.v b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_L.v new file mode 100644 index 00000000..a2d55d59 --- /dev/null +++ b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_L.v @@ -0,0 +1,56 @@ +// File copy form +// OpenRAOD-flow-scripts@dd552435616bcc18fb2dba0b221f682d9e873fb1 +// Only works with asap7 L cell library +(* techmap_celltype = "$fa" *) +module _tech_fa (A, B, C, X, Y); + parameter WIDTH = 1; + (* force_downto *) + input [WIDTH-1 : 0] A, B, C; + (* force_downto *) + output [WIDTH-1 : 0] X, Y; + + wire [WIDTH-1 : 0] NX, NY; + + parameter _TECHMAP_CONSTVAL_A_ = WIDTH'bx; + parameter _TECHMAP_CONSTVAL_B_ = WIDTH'bx; + parameter _TECHMAP_CONSTVAL_C_ = WIDTH'bx; + + genvar i; + generate for (i = 0; i < WIDTH; i = i + 1) begin + if (_TECHMAP_CONSTVAL_A_[i] === 1'b0 || _TECHMAP_CONSTVAL_B_[i] === 1'b0 || _TECHMAP_CONSTVAL_C_[i] === 1'b0) begin + if (_TECHMAP_CONSTVAL_C_[i] === 1'b0) begin + HAxp5_ASAP7_75t_L halfadder_Cconst ( + .A(A[i]), + .B(B[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + else begin + if (_TECHMAP_CONSTVAL_B_[i] === 1'b0) begin + HAxp5_ASAP7_75t_L halfadder_Bconst ( + .A(A[i]), + .B(C[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + else begin + HAxp5_ASAP7_75t_L halfadder_Aconst ( + .A(B[i]), + .B(C[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + end + end + else begin + FAx1_ASAP7_75t_L fulladder ( + .A(A[i]), .B(B[i]), .CI(C[i]), .CON(NX[i]), .SN(NY[i]) + ); + end + + assign X[i] = ~NX[i]; + assign Y[i] = ~NY[i]; + + end endgenerate + +endmodule diff --git a/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_R.v b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_R.v new file mode 100644 index 00000000..0f38f764 --- /dev/null +++ b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_R.v @@ -0,0 +1,56 @@ +// File copy form +// OpenRAOD-flow-scripts@dd552435616bcc18fb2dba0b221f682d9e873fb1 +// Only works with asap7 R cell library +(* techmap_celltype = "$fa" *) +module _tech_fa (A, B, C, X, Y); + parameter WIDTH = 1; + (* force_downto *) + input [WIDTH-1 : 0] A, B, C; + (* force_downto *) + output [WIDTH-1 : 0] X, Y; + + wire [WIDTH-1 : 0] NX, NY; + + parameter _TECHMAP_CONSTVAL_A_ = WIDTH'bx; + parameter _TECHMAP_CONSTVAL_B_ = WIDTH'bx; + parameter _TECHMAP_CONSTVAL_C_ = WIDTH'bx; + + genvar i; + generate for (i = 0; i < WIDTH; i = i + 1) begin + if (_TECHMAP_CONSTVAL_A_[i] === 1'b0 || _TECHMAP_CONSTVAL_B_[i] === 1'b0 || _TECHMAP_CONSTVAL_C_[i] === 1'b0) begin + if (_TECHMAP_CONSTVAL_C_[i] === 1'b0) begin + HAxp5_ASAP7_75t_R halfadder_Cconst ( + .A(A[i]), + .B(B[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + else begin + if (_TECHMAP_CONSTVAL_B_[i] === 1'b0) begin + HAxp5_ASAP7_75t_R halfadder_Bconst ( + .A(A[i]), + .B(C[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + else begin + HAxp5_ASAP7_75t_R halfadder_Aconst ( + .A(B[i]), + .B(C[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + end + end + else begin + FAx1_ASAP7_75t_R fulladder ( + .A(A[i]), .B(B[i]), .CI(C[i]), .CON(NX[i]), .SN(NY[i]) + ); + end + + assign X[i] = ~NX[i]; + assign Y[i] = ~NY[i]; + + end endgenerate + +endmodule diff --git a/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_SL.v b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_SL.v new file mode 100644 index 00000000..9c340bd3 --- /dev/null +++ b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cell_adders_SL.v @@ -0,0 +1,56 @@ +// File copy form +// OpenRAOD-flow-scripts@dd552435616bcc18fb2dba0b221f682d9e873fb1 +// Only works with asap7 R cell library +(* techmap_celltype = "$fa" *) +module _tech_fa (A, B, C, X, Y); + parameter WIDTH = 1; + (* force_downto *) + input [WIDTH-1 : 0] A, B, C; + (* force_downto *) + output [WIDTH-1 : 0] X, Y; + + wire [WIDTH-1 : 0] NX, NY; + + parameter _TECHMAP_CONSTVAL_A_ = WIDTH'bx; + parameter _TECHMAP_CONSTVAL_B_ = WIDTH'bx; + parameter _TECHMAP_CONSTVAL_C_ = WIDTH'bx; + + genvar i; + generate for (i = 0; i < WIDTH; i = i + 1) begin + if (_TECHMAP_CONSTVAL_A_[i] === 1'b0 || _TECHMAP_CONSTVAL_B_[i] === 1'b0 || _TECHMAP_CONSTVAL_C_[i] === 1'b0) begin + if (_TECHMAP_CONSTVAL_C_[i] === 1'b0) begin + HAxp5_ASAP7_75t_SL halfadder_Cconst ( + .A(A[i]), + .B(B[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + else begin + if (_TECHMAP_CONSTVAL_B_[i] === 1'b0) begin + HAxp5_ASAP7_75t_SL halfadder_Bconst ( + .A(A[i]), + .B(C[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + else begin + HAxp5_ASAP7_75t_SL halfadder_Aconst ( + .A(B[i]), + .B(C[i]), + .CON(NX[i]), .SN(NY[i]) + ); + end + end + end + else begin + FAx1_ASAP7_75t_SL fulladder ( + .A(A[i]), .B(B[i]), .CI(C[i]), .CON(NX[i]), .SN(NY[i]) + ); + end + + assign X[i] = ~NX[i]; + assign Y[i] = ~NY[i]; + + end endgenerate + +endmodule diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/bundled.BUILD.bazel b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/bundled.BUILD.bazel index 12414162..bd563c50 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/bundled.BUILD.bazel +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/bundled.BUILD.bazel @@ -103,6 +103,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_L.v", ) # From org_theopenroadproject_asap7sc7p5t_27/cells-rvt.bzl @@ -162,6 +163,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_R.v", ) # From org_theopenroadproject_asap7sc7p5t_27/cells-rvt_4x.bzl @@ -287,6 +289,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_4x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_R.v", ) ########################################################################## @@ -349,6 +352,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_SL.v", ) # From org_theopenroadproject_asap7sc7p5t_27/common.bzl diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-lvt.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-lvt.bzl index 3afa1f1b..918405a9 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-lvt.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-lvt.bzl @@ -68,4 +68,5 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_L.v", ) diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt.bzl index 9b90eb3b..46260807 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt.bzl @@ -68,4 +68,5 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_R.v", ) diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt_4x.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt_4x.bzl index 6b31d614..b98c2ff5 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt_4x.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-rvt_4x.bzl @@ -134,6 +134,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_4x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_R.v", ) ########################################################################## diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-slvt.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-slvt.bzl index ab220883..c59d5cde 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-slvt.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_27/cells-slvt.bzl @@ -68,4 +68,5 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_SL.v", ) diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/bundled.BUILD.bazel b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/bundled.BUILD.bazel index d55e051c..76c81829 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/bundled.BUILD.bazel +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/bundled.BUILD.bazel @@ -102,6 +102,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_L.v", ) # From org_theopenroadproject_asap7sc7p5t_28/cells-rvt.bzl @@ -160,6 +161,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_R.v", ) # From org_theopenroadproject_asap7sc7p5t_28/cells-slvt.bzl @@ -218,6 +220,7 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_SL.v", ) # From org_theopenroadproject_asap7sc7p5t_28/common.bzl diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-lvt.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-lvt.bzl index fb15ca25..b97bc556 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-lvt.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-lvt.bzl @@ -67,4 +67,5 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_L.v", ) diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-rvt.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-rvt.bzl index 5d756478..ec10602a 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-rvt.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-rvt.bzl @@ -67,4 +67,5 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_R.v", ) diff --git a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-slvt.bzl b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-slvt.bzl index b7f5270b..8b5a042a 100644 --- a/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-slvt.bzl +++ b/dependency_support/org_theopenroadproject_asap7sc7p5t_28/cells-slvt.bzl @@ -67,4 +67,5 @@ open_road_pdk_configuration( tracks_file = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:tracks_1x.tcl", wire_rc_clock_metal_layer = "M5", wire_rc_signal_metal_layer = "M2", + ha_fa_mapping = "@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:cell_adders_SL.v", )