Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sky130hd #274

Merged
merged 4 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@bazel-orfs-pip//:requirements.bzl", "requirement")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("//:eqy.bzl", "eqy_test")
load("//:openroad.bzl", "get_stage_args", "orfs_floorplan", "orfs_flow", "orfs_run")
load("//:ppa.bzl", "orfs_ppa")
load("//:sweep.bzl", "orfs_sweep")

exports_files(["mock_area.tcl"])
Expand Down Expand Up @@ -326,6 +327,7 @@ exports_files(
[
"sweep-wns.tcl",
"wns_report.py",
"power.tcl",
],
)

Expand Down Expand Up @@ -389,3 +391,38 @@ genrule(
],
cmd = "wc -l $(locations :gatelist) $(locations :spef) > $@",
)

py_binary(
name = "plot_clock_period_tool",
srcs = [
"plot_clock_period.py",
],
main = "plot_clock_period.py",
visibility = ["//visibility:public"],
deps = [
requirement("PyYAML"),
requirement("matplotlib"),
],
)

orfs_ppa(
name = "plot",
plot = ["lb_32x128_{}_cts".format(i + 1) for i in range(4)],
title = "lb_32x128 variants",
)

orfs_flow(
name = "lb_32x128_sky130hd",
arguments = {
"CORE_UTILIZATION": "10",
"CORE_ASPECT_RATIO": "2",
"SKIP_REPORT_METRICS": "1",
"SDC_FILE": "$(location :constraints-sram-sky130hd.sdc)",
},
pdk = "@docker_orfs//:sky130hd",
sources = {
"SDC_FILE": [":constraints-sram-sky130hd.sdc"],
},
top = "lb_32x128",
verilog_files = LB_VERILOG_FILES,
)
59 changes: 57 additions & 2 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions constraints-sram-sky130hd.sdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set sdc_version 2.0

#
# SDC file used during SRAM abstract generation
#

set clk_period 10

# Covers all clock naming types in SRAMs and reg files
set clock_ports [concat [get_ports -quiet *clk] [get_ports -quiet *clock]]

if {[llength $clock_ports] == 0} {
error "No clock ports found"
}

foreach clk_port $clock_ports {
set clk_name [get_name $clk_port]
create_clock -period $clk_period -name $clk_name $clk_port
}

set non_clk_inputs {}
foreach input [all_inputs] {
if {[lsearch -exact $clock_ports $input] == -1} {
lappend non_clk_inputs $input
}
}

set_max_delay [expr {[info exists in2out_max] ? $in2out_max : 80}] -from $non_clk_inputs -to [all_outputs]
group_path -name in2out -from $non_clk_inputs -to [all_outputs]

if {[llength [all_registers]] > 0} {
set all_register_outputs [get_pins -of_objects [all_registers] -filter {direction == output}]
set_max_delay [expr {[info exists in2reg_max] ? $in2reg_max : 80}] -from $non_clk_inputs -to [all_registers]
set_max_delay [expr {[info exists reg2out_max] ? $reg2out_max : 80}] -from $all_register_outputs -to [all_outputs]

group_path -name in2reg -from $non_clk_inputs -to [all_registers]
group_path -name reg2out -from [all_registers] -to [all_outputs]
group_path -name reg2reg -from [all_registers] -to [all_registers]
}
48 changes: 28 additions & 20 deletions docker.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ filegroup(
)

MAKEFILE_SHARED = [
"OpenROAD-flow-scripts/flow/util/utils.mk",
"OpenROAD-flow-scripts/flow/scripts/*.py",
"OpenROAD-flow-scripts/flow/scripts/*.sh",
"OpenROAD-flow-scripts/flow/scripts/*.yaml",

"OpenROAD-flow-scripts/flow/util/utils.mk",
"OpenROAD-flow-scripts/flow/scripts/*.py",
"OpenROAD-flow-scripts/flow/scripts/*.sh",
"OpenROAD-flow-scripts/flow/scripts/*.yaml",
]

# Narrowly define yosys dependencies to avoid hours of resynthesis
Expand Down Expand Up @@ -133,20 +132,29 @@ filegroup(
visibility = ["//visibility:public"],
)

orfs_pdk(
name = "asap7",
#print(["OpenROAD-flow-scripts/flow/platforms/{pdk}/**/*.{ext}".format(pdk = "asap7", ext = ext) for ext in ["gds", "lib.gz", "lef", "lib", "lyt", "mk", "rules", "sdc", "tcl", "v", "tlef"]]] + +["OpenROAD-flow-scripts/flow/platforms/common/**/*.v"])

[orfs_pdk(
name = pdk,
srcs = glob([
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.gds",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.lib.gz",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.lef",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.lib",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.lyt",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.mk",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.rules",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.sdc",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.tcl",
"OpenROAD-flow-scripts/flow/platforms/asap7/**/*.v",
"OpenROAD-flow-scripts/flow/platforms/common/**/*.v",
]),
"OpenROAD-flow-scripts/flow/platforms/{pdk}/**/*.{ext}".format(pdk = pdk, ext = ext)
for ext in [
"gds",
"lib.gz",
"lef",
"lib",
"lyt",
"mk",
"rules",
"sdc",
"tcl",
"v",
"tlef",
]
] +
["OpenROAD-flow-scripts/flow/platforms/common/**/*.v"]),
visibility = ["//visibility:public"],
)
) for pdk in [
"asap7",
"sky130hd",
]]
2 changes: 2 additions & 0 deletions open_plots.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
xdg-open $1
Loading