Skip to content

Commit

Permalink
added open-gui command
Browse files Browse the repository at this point in the history
  • Loading branch information
marwaneltoukhy committed Dec 17, 2023
1 parent 17614d7 commit ce8f884
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ blocks=$(shell cd openlane && find * -maxdepth 0 -type d)
$(blocks): % : check_versions
$(MAKE) -C openlane $*

# Openlane open last step gui using klayout
blocks=$(shell cd openlane && find * -maxdepth 0 -type d)
.PHONY: open-gui-%
open-gui-% :
$(MAKE) -C openlane open-gui-$*

# Openlane open last step gui using openroad
blocks=$(shell cd openlane && find * -maxdepth 0 -type d)
.PHONY: open-odb-gui-%
open-odb-gui-% :
$(MAKE) -C openlane open-odb-gui-$*

.PHONY: clean_log
clean_log:
@rm -f setup.log
Expand Down
16 changes: 16 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ Starting your project
..
For an example of hardening a project please refer to `Hardening the User Project using OpenLane`_. .

* In case a failure happens, view the last generated layout before failure:
- Last generated def file using klayout:

.. code:: bash
make open-gui-<module_name>
..
- Last generated odb file using openroad-gui:

.. code:: bash
make open-odb-gui-<module_name>
..

#. Integrate modules into the user_project_wrapper

Expand Down
21 changes: 21 additions & 0 deletions openlane/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ openlane_cmd = \
-ignore_mismatches"
openlane_cmd_interactive = "flow.tcl -it -file $$(realpath ./$*/interactive.tcl)"

openlane_gui_klayout_cmd = "python3 $(OPENLANE_ROOT)/gui.py --viewer klayout --format def $$(realpath ./$*/runs/$*)"
openlane_gui_openroad_cmd = "python3 $(OPENLANE_ROOT)/gui.py --viewer openroad --format odb $$(realpath ./$*/runs/$*)"

docker_mounts = \
-v $$(realpath $(PWD)/..):$$(realpath $(PWD)/..) \
-v $(PDK_ROOT):$(PDK_ROOT) \
Expand All @@ -50,6 +53,13 @@ docker_env = \
-e CARAVEL_ROOT=$(CARAVEL_ROOT) \
-e OPENLANE_RUN_TAG=$(OPENLANE_RUN_TAG)

docker_extra_args = \
-e DISPLAY=$(DISPLAY) \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(HOME)/.Xauthority:/.Xauthority \
--network host \
--security-opt seccomp=unconfined

ifneq ($(MCW_ROOT),)
docker_env += -e MCW_ROOT=$(MCW_ROOT)
docker_mounts += -v $(MCW_ROOT):$(MCW_ROOT)
Expand Down Expand Up @@ -102,3 +112,14 @@ ifeq ($(OPENLANE_ROOT),)
@echo "Please export OPENLANE_ROOT"
@exit 1
endif

.PHONY: open-gui-%
open-gui-%:
$(docker_run) $(docker_extra_args) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_gui_klayout_cmd)

.PHONY: open-odb-gui-%
open-odb-gui-%:
$(docker_run) $(docker_extra_args) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_gui_openroad_cmd)

0 comments on commit ce8f884

Please sign in to comment.