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

Fix PDN Config #188

Merged
merged 8 commits into from
Sep 21, 2023
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
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Setup Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: nixpkgs=channel:nixos-23.05
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
Expand All @@ -106,7 +106,7 @@ jobs:
building_blocks=rf
fi

nix-shell --run "\
nix-shell --pure --run "\
./dffram.py ${{ matrix.count }}x${{ matrix.width }}\
-p sky130A\
-s sky130_fd_sc_hd\
Expand All @@ -115,6 +115,12 @@ jobs:
"

echo "PRODUCTS_PATH=$(echo products/*)" >> $GITHUB_ENV
# - name: Upload Build Folder [TEMP]
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: BUILD_${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }}
# path: ./build
- name: Upload Final Views
uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ lint: venv/manifest.txt
./venv/bin/flake8 .

venv: venv/manifest.txt
venv/manifest.txt: ./requirements_dev.txt ./requirements.txt
venv/manifest.txt: ./requirements_dev.txt
rm -rf venv
python3 -m venv ./venv
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade pip
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade wheel
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade\
-r ./requirements_dev.txt\
-r ./requirements.txt
-r ./requirements_dev.txt
PYTHONPATH= ./venv/bin/python3 -m pip freeze > $@
touch venv/manifest.txt

Expand Down
5 changes: 3 additions & 2 deletions dffram.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,10 @@ def main(
"FP_IO_VEXTEND": Decimal(0),
"FP_IO_VLENGTH": 2,
"FP_IO_HLENGTH": 2,
"STA_CORNERS": ["nom_ss_100C_1v60"],
# PDN
"DESIGN_IS_CORE": False,
},
design_dir=build_dir,
design_dir=os.path.abspath(build_dir),
)

final_state = dffram_flow.start(
Expand Down
13 changes: 6 additions & 7 deletions placeram/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ def place(self):
utl.metric_float("dffram__suggested__core_width", self.core_width)
utl.metric_float("dffram__suggested__core_height", self.core_height)

die_area = self.block.getDieArea().area() / (
self.micron_in_units * self.micron_in_units
)
die_width = self.block.getDieArea().dx() / self.micron_in_units
die_height = self.block.getDieArea().dy() / self.micron_in_units
die_area = die_width * die_height

self.density = logical_area / die_area
utl.metric_float("dffram__logic__density", self.density)
Expand Down Expand Up @@ -239,8 +239,8 @@ def cli(
odb_in,
):
pdk, scl, blocks = building_blocks.split(":")
fill_cells_file = os.path.join(".", "platforms", pdk, "fill_cells.yml")
if not os.path.isfile(fill_cells_file):
platform_tech_file = os.path.join(".", "platforms", pdk, scl, "tech.yml")
if not os.path.isfile(platform_tech_file):
eprint("Platform %s not found." % pdk)
exit(os.EX_NOINPUT)

Expand All @@ -264,15 +264,14 @@ def cli(
"WARNING: Word length must be a non-zero multiple of 8. Results may be unexpected."
)

platform_tech_file = os.path.join(".", "platforms", pdk, scl, "tech.yml")
platform_tech_config = yaml.safe_load(open(platform_tech_file))

tap_distance = platform_tech_config["tap_distance"]

for input in [odb_in]:
check_readable(input)

fill_cell_data = yaml.load(open(fill_cells_file).read(), Loader=yaml.SafeLoader)
fill_cell_data = platform_tech_config["fills"]

placer = Placer(
odb_in,
Expand Down
5 changes: 0 additions & 5 deletions platforms/sky130A/fill_cells.yml

This file was deleted.

11 changes: 8 additions & 3 deletions platforms/sky130A/sky130_fd_sc_hd/tech.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
tap_distance: 15
metal_layers:
metal_layers:
hor-layer: met3
ver-layer: met2
rt-max-layer: met4
site:
width: 0.46
height: 2.72
name: unithd
tie:
tie:
tie_lo_cell: sky130_fd_sc_hd__conb_1
tie_lo_port: LO
tie_hi_cell: sky130_fd_sc_hd__conb_1
tie_hi_port: HI
tie_hi_port: HI
sta:
driving_cell:
name: sky130_fd_sc_hd__inv_8
Expand All @@ -30,3 +30,8 @@ sta:
"1024x*": 16.5
"2048x*": 16.5
rf: {}
fills:
decap: sky130_fd_sc_hd__decap_(\d+)
fill: sky130_fd_sc_hd__fill_(\d+)
tap: sky130_fd_sc_hd__tapvpwrvgnd_(\d+)
diode: sky130_fd_sc_hd__diode_(\d+)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
openlane==2.0.0b3
openlane==2.0.0b14
pyyaml
cloup
8 changes: 5 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
let openlane-src = pkgs.fetchFromGitHub {
owner = "efabless";
repo = "openlane2";
rev = "0b2cb7eb6681b644e65082701175044e6e97cc0f";
sha256 = "sha256-qYMZJGRfqNhf0FFf2VdF2AOsAqVTlWLrYlc3krvKp0I=";
}; in import "${openlane-src}/shell.nix" {}
rev = "0c05b7ea04eac74203a9a33f8a8b519f33220f2f";
sha256 = "sha256-fjYz6HuIYrGbkb1oA6wPIlEjieYU5hu0aygYQFj2d2I=";
}; in import "${openlane-src}/shell.nix" {
inherit pkgs;
}
Loading