diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b0ce9f..53e70c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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\ @@ -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: diff --git a/Makefile b/Makefile index 0596a39..1ec8f7a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/dffram.py b/dffram.py index 5acd22f..a52a4f9 100755 --- a/dffram.py +++ b/dffram.py @@ -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( diff --git a/placeram/cli.py b/placeram/cli.py index 7793af1..b5cbd95 100644 --- a/placeram/cli.py +++ b/placeram/cli.py @@ -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) @@ -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) @@ -264,7 +264,6 @@ 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"] @@ -272,7 +271,7 @@ def cli( 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, diff --git a/platforms/sky130A/fill_cells.yml b/platforms/sky130A/fill_cells.yml deleted file mode 100644 index 0655728..0000000 --- a/platforms/sky130A/fill_cells.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Non-logical Cells -decap: sky130_\w+__decap_(\d+) -fill: sky130_\w+__fill_(\d+) -tap: sky130_\w+__tapvpwrvgnd_(\d+) -diode: sky130_\w+__diode_(\d+) diff --git a/platforms/sky130A/sky130_fd_sc_hd/tech.yml b/platforms/sky130A/sky130_fd_sc_hd/tech.yml index b65aa9a..7b0edf5 100644 --- a/platforms/sky130A/sky130_fd_sc_hd/tech.yml +++ b/platforms/sky130A/sky130_fd_sc_hd/tech.yml @@ -1,5 +1,5 @@ tap_distance: 15 -metal_layers: +metal_layers: hor-layer: met3 ver-layer: met2 rt-max-layer: met4 @@ -7,11 +7,11 @@ 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 @@ -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+) diff --git a/requirements.txt b/requirements.txt index cf76c00..6722f71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -openlane==2.0.0b3 +openlane==2.0.0b14 pyyaml cloup \ No newline at end of file diff --git a/shell.nix b/shell.nix index 63519f1..9cbe8fe 100644 --- a/shell.nix +++ b/shell.nix @@ -18,6 +18,8 @@ let openlane-src = pkgs.fetchFromGitHub { owner = "efabless"; repo = "openlane2"; - rev = "0b2cb7eb6681b644e65082701175044e6e97cc0f"; - sha256 = "sha256-qYMZJGRfqNhf0FFf2VdF2AOsAqVTlWLrYlc3krvKp0I="; -}; in import "${openlane-src}/shell.nix" {} \ No newline at end of file + rev = "0c05b7ea04eac74203a9a33f8a8b519f33220f2f"; + sha256 = "sha256-fjYz6HuIYrGbkb1oA6wPIlEjieYU5hu0aygYQFj2d2I="; +}; in import "${openlane-src}/shell.nix" { + inherit pkgs; +} \ No newline at end of file