Files
openlane2/Makefile
Mohamed Gaber 315e8a220f The Override Overhaul (#482)
## CLI
* Overhauled how the PDK commandline options work, using a decorator instead of doing everything in a callback
* `--smoke-test/--run-example` are now no longer callbacks, and `--run-example` now supports more options (e.g. another PDK, another flow, etc.)


## Steps
* Created `OpenROAD.DEFtoODB`
  * Useful for custom flows, where the DEF is modified but the ODB needs to be updated to reflect these modifications

## Flows
* `VHDLClassic` is now `Classic` with appropriate Substitutions, see Misc.

## Misc Enhancements/Updates
* `SequentialFlow`
  * Substitutions can now
    * be done at the class level by assigning to `Substitutions`
    * be done in `config.json` files using a dictionary in the field `.meta.substituting_steps`
    * emplace steps before or after existing steps, e.g. `+STEP`, `-STEP`
  * Step names for `from`, `to`, `skip` and `only` are now fuzzy-matched using `rapidfuzz` to give suggestions in error messages
    * If the environment variable `_i_want_openlane_to_fuzzy_match_steps_and_im_willing_to_accept_the_risks` is set to `1`, the suggestions are used automatically (not recommended)
  * Gating config vars are now simply removed if they do not target a valid step (so removed steps in a substituted flow do not cause a FlowException)

## Documentation
* Updated the architecture document to reflect changes and clarify some elements.
* Updated Usage/Writing Custom Flows to document step substitution
* Created a new document on writing plugins

## Tool Updates
* Upgrade `nix-eda`
  * `forAllSystems` now composes overlays for nixpkgs based on the `withInputs` field, allowing for easier overriding
  * `nixpkgs` -> 24.05
  * `klayout` -> `0.29.1`
  * `ioplace_parser` -> `0.3.0`
* Python build tool changed from `setuptools` to `poetry`, which properly verifies that all version ranges are within constraints
  * Updated wrong Python package version ranges that all happen to work

* Nix devshells now use [numtide/devshell](https://github.com/numtide/devshell), which creates an executable to enter the environment, allowing for easy repacking
2024-07-02 09:06:53 +00:00

93 lines
2.4 KiB
Makefile

all: dist
.PHONY: dist
dist: venv/manifest.txt
./venv/bin/poetry build
.PHONY: mount
mount:
@echo "make mount is not needed in OpenLane 2+. You may simply call 'openlane --dockerized'."
.PHONY: pdk pull-openlane
pdk pull-openlane:
@echo "OpenLane 2+ will automatically pull PDKs and/or Docker containers when it needs them."
.PHONY: openlane
openlane:
@echo "make openlane is deprecated. Please use make docker-image."
@echo "----"
@$(MAKE) docker-image
.PHONY: docker-image
docker-image:
cat $(shell nix build --no-link --print-out-paths .#openlane-docker -L --verbose) | docker load
.PHONY: docs
docs:
$(MAKE) -C docs html
.PHONY: host-docs
host-docs:
python3 -m http.server --directory ./docs/build/html
.PHONY: watch-docs
watch-docs:
nodemon\
-w .\
-e md,py,css\
-i "docs/build/**/*"\
-i "docs/build/*"\
-i "docs/source/reference/*_vars.md"\
-i "docs/source/reference/flows.md"\
-x "$(MAKE) docs && python3 -m http.server --directory docs/build/html"
.PHONY: lint
lint:
black --check .
flake8 .
mypy --check-untyped-defs .
.PHONY: coverage-infrastructure
coverage-infrastructure:
python3 -m pytest -n auto\
--cov=openlane --cov-config=.coveragerc --cov-report html:htmlcov_infra --cov-report term
.PHONY: coverage-steps
coverage-steps:
python3 -m pytest -n auto\
--cov=openlane.steps --cov-config=.coveragerc-steps --cov-report html:htmlcov_steps --cov-report term\
--step-rx "." -k test_all_steps
.PHONY: check-license
check-license: venv/manifest.txt
./venv/bin/python3 -m pip freeze > ./requirements.frz.txt
docker run -v `pwd`:/volume \
-it --rm pilosus/pip-license-checker \
java -jar app.jar \
--requirements '/volume/requirements.frz.txt'
venv: venv/manifest.txt
venv/manifest.txt: ./pyproject.toml
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 poetry poetry-plugin-export
PYTHONPATH= ./venv/bin/poetry export --with dev --without-hashes --format=requirements.txt --output=requirements_tmp.txt
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade -r requirements_tmp.txt
PYTHONPATH= ./venv/bin/python3 -m pip freeze > $@
@echo ">> Venv prepared."
.PHONY: veryclean
veryclean: clean
veryclean:
rm -rf venv/
.PHONY: clean
clean:
rm -rf build/
rm -rf logs/
rm -rf dist/
rm -rf *.egg-info
rm -rf designs/*/runs
rm -rf test_data/designs/*/runs
rm -rf test/designs/*/runs