This document explains how an SRAM hard macro is integrated into an
OpenLane2 Classic flow.
The SRAM is treated strictly as an external, fixed hard macro.
The focus is on physical integration, specifically:
OpenLane2 does not have a first-class βmacroβ abstraction.
Instead:
This document reflects what actually works in practice,
not an idealized abstraction.
The following policies are enforced throughout this project:
This mirrors real-world SoC physical design methodology.
The following files must be provided externally by the user:
| File | Purpose |
|---|---|
sram.gds |
Final physical layout |
sram.lef |
Abstract layout for P&R |
sram_blackbox.v |
Verilog blackbox |
sram.lib |
(Optional) timing model |
β οΈ These files are not included in this repository.
Recommended (but not mandatory) directory structure:
macro/
ββ sram/
ββ README.md
ββ sram.lef (external or symlink)
ββ sram.gds (external or symlink)
ββ sram.lib (optional)
ββ sram_blackbox.v
Only the integration methodology is documented here.
design/src/sram_blackbox.v
module sram (
input wire clk,
input wire csb,
input wire web,
input wire [7:0] addr,
input wire [31:0] din,
output wire [31:0] dout
);
endmodule
design/src/top.v
module top (
input wire clk,
input wire rst_n,
input wire csb,
input wire web,
input wire [7:0] addr,
input wire [31:0] din,
output wire [31:0] dout
);
sram u_sram (
.clk (clk),
.csb (csb),
.web (web),
.addr (addr),
.din (din),
.dout (dout)
);
endmodule
No SRAM logic is inferred or synthesized.
OpenLane2 Classic flow is driven by JSON configuration files.
Conceptual example:
{
"verilog_files": [
"design/src/top.v",
"design/src/sram_blackbox.v"
],
"lef_files": [
"macro/sram/sram.lef"
],
"gds_files": [
"macro/sram/sram.gds"
]
}
β οΈ Exact filenames and paths depend on the design directory structure.
Macro placement is enforced using OpenROAD TCL commands,
not JSON configuration keys.
Typical operations:
Conceptual example:
place_macro u_sram 100 100 N
set_macro_fixed u_sram
set_macro_halo u_sram 10 10 10 10
These commands are executed before standard-cell placement.
Key principles:
β οΈ Poor macro placement cannot be corrected later in the flow.
Typical mitigations:
This is an explicit and intentional trade-off.
At the end of this step:
β οΈ A final GDS is not required at this stage.
| Issue | Cause | Mitigation |
|---|---|---|
| Macro overlaps cells | Missing halo | Increase halo |
| Congestion | Poor placement | Move macro / resize die |
| PDN errors | Pin mismatch | Inspect LEF |
| CTS issues | Clock routed near macro | Reroute clock |
This step proves that:
Only after this is validated should final routing and sign-off-style runs be attempted.
Proceed to:
β‘ docs/40_results.md
Final GDS generation, warnings, and lessons learned
Last updated: SRAM macro integration validated in OpenLane2 Classic flow β