generated from mattvenn/wokwi-verilog-gds-test
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
23 lines (21 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# HACK: We need a unique ID for the verilog files so they can exist harmoniously with the rest of the
# designs that are submitted. So, even if we're not using Wokwi, copy the template project and enter
# the ID below as the WOKWI_PROJECT_ID so we get a guaranteed unique ID:
WOKWI_PROJECT_ID=019235602376235615
fetch:
# HACK: we don't need to fetch this as we have our own verilog source, manually created: src/user_module_019235602376235615.v
# curl https://wokwi.com/api/projects/$(WOKWI_PROJECT_ID)/verilog > src/user_module_$(WOKWI_PROJECT_ID).v
sed -e 's/USER_MODULE_ID/$(WOKWI_PROJECT_ID)/g' template/scan_wrapper.v > src/scan_wrapper_$(WOKWI_PROJECT_ID).v
# HACK: instead of globbing the entire src directory, specify modules explicitly in custom config.tcl
# sed -e 's/USER_MODULE_ID/$(WOKWI_PROJECT_ID)/g' template/config.tcl > src/config.tcl
echo $(WOKWI_PROJECT_ID) > src/ID
# needs PDK_ROOT and OPENLANE_ROOT, OPENLANE_IMAGE_NAME set from your environment
harden:
docker run --rm \
-v $(OPENLANE_ROOT):/openlane \
-v $(PDK_ROOT):$(PDK_ROOT) \
-v $(CURDIR):/work \
-e PDK_ROOT=$(PDK_ROOT) \
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \
$(OPENLANE_IMAGE_NAME) \
/bin/bash -c "./flow.tcl -overwrite -design /work/src -run_path /work/runs -tag wokwi"