Project 3, Part 1: Integrating a Hardened Macro
In Projects 1 and 2, all physical geometry originated from homogeneous standard cells placed and routed automatically. Project 3 introduces heterogeneous physical design: integrating a pre-hardened memory macro alongside synthesizable logic. Hardened macros represent pre-designed, pre-verified intellectual property (IP) blocks. The automated synthesis flow does not modify internal macro devices. Physical implementation focuses on boundary interfaces, placement orientation, halos, and power grid connections.
Macro Architecture: 2 KB OpenRAM Macro
This project integrates the OpenRAM memory block sky130_sram_2kbyte_1rw1r_32x512_8: a 2 KB SRAM organized as 512 words of 32 bits. The macro includes one read/write port (port 0) and one read-only port (port 1). The foundry provides four distinct interface views:
| View Format | Verification and Implementation Purpose |
|---|---|
| LEF | Boundary dimensions, interface pin coordinates, and internal routing obstructions |
| GDSII | Exact mask geometry merged into the final database during streamout |
Liberty (.lib) |
Black-box timing models and pin setup/hold arcs for static timing analysis |
| Verilog Stub | Black-box module declaration specifying port names and bus widths for synthesis |
Logic synthesis processes only the black-box port definitions. The controller module sram_ctrl instantiates the macro:
module sram_ctrl (
input clk, rst_n,
input [8:0] addr,
input [31:0] wdata,
input we, re,
output [31:0] rdata,
output ready
);
wire csb0 = ~(we | re); // Active-low chip select
wire web0 = ~we; // Active-low write enable
sky130_sram_2kbyte_1rw1r_32x512_8 u_sram (
.clk0(clk), .csb0(csb0), .web0(web0), .wmask0(4'hF),
.addr0(addr), .din0(wdata), .dout0(rdata),
.clk1(clk), .csb1(1'b1), .addr1(9'd0), .dout1() // Port 1 disabled
);
// Synchronous handshake controller logic omitted for brevity
endmodule
Control inputs follow active-low OpenRAM conventions. The unused second port is disabled by driving its chip select (csb1) high.
OpenLane Macro Configuration
{
"DESIGN_NAME": "sram_ctrl",
"VERILOG_FILES": "dir::src/sram_ctrl.v",
"VERILOG_FILES_BLACKBOX": "dir::macro/sky130_sram_2kbyte_1rw1r_32x512_8.v",
"EXTRA_LEFS": "dir::macro/sky130_sram_2kbyte_1rw1r_32x512_8.lef",
"EXTRA_GDS_FILES": "dir::macro/sky130_sram_2kbyte_1rw1r_32x512_8.gds",
"EXTRA_LIBS": "dir::macro/sky130_sram_2kbyte_1rw1r_32x512_8_TT_1p8V_25C.lib",
"MACRO_PLACEMENT_CFG": "dir::macro_placement.cfg",
"PL_MACRO_HALO": "10 10",
"FP_PDN_MACRO_HOOKS": "u_sram vccd1 vssd1 vccd1 vssd1",
"CLOCK_PORT": "clk",
"CLOCK_PERIOD": 20,
"FP_SIZING": "absolute",
"DIE_AREA": "0 0 1000 700"
}
The EXTRA_* variables supply the macro views directly. We use absolute die sizing (DIE_AREA: 0 0 1000 700) because the macro spans hundreds of microns, making standard cell density calculations inapplicable.
Floorplanning Around the Macro
Define macro placement coordinates in macro_placement.cfg:
# Format: instance_name lower_left_x lower_left_y orientation
u_sram 180 60 N
This configuration fixes the lower-left origin of instance u_sram at coordinates (180 µm, 60 µm) with orientation North (N), as illustrated in Figure 1.
Three physical parameters govern macro floorplanning:
- Orientation: The macro’s pins reside along its right perimeter. Orientation North (
N) directs interface pins toward the core region where controller standard cells reside, minimizing interconnect wire lengths. - Placement Halo: The setting
PL_MACRO_HALO: 10 10enforces a 10 µm exclusion zone around the macro perimeter. This halo reserves routing tracks for pin access and power straps, preventing standard cells from crowding interface boundaries. - Power Grid Hooks: Parameter
FP_PDN_MACRO_HOOKSconnects top-level power nets to macro supply pins (vccd1,vssd1).
Never configure a placement halo of zero microns. A zero-micron halo allows standard cells to abut the macro edge directly, obstructing routing tracks and causing DRC violations at macro pins.
Executing Macro Floorplanning
openlane --flow Classic --run-tag sram_run1 --to OpenROAD.Floorplan designs/sram_ctrl/config.json
Inspect the floorplan DEF in KLayout. The macro is fixed at coordinates (180, 60). Standard cell rows surround the macro boundary without intersecting its internal footprint.
Practice Exercise
If macro orientation is changed from N to FN (flipped horizontally along the Y-axis) while keeping coordinates fixed, what physical layout characteristic must you verify immediately?
Solution
Verify the physical location of the macro interface pins relative to standard cell placement areas.
Flipping the macro horizontally moves its right-side pin perimeter to the left-hand edge of the bounding box. The interface pins then face outward toward the die boundary rather than toward the controller standard cells. Signal nets would have to traverse the entire macro perimeter, increasing routing congestion, parasitic capacitance, and latency. Physical legality does not guarantee optimal pin accessibility.
In the next article, we execute standard cell placement and routing around the fixed SRAM macro.