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

Update dev #12

Merged
merged 7 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Try different approach to escape #
magnmaeh committed Jan 27, 2024
commit 30c95d35d900d55979d6a1ae7771f14465e9f3bf
5 changes: 4 additions & 1 deletion verilator.mk
Original file line number Diff line number Diff line change
@@ -3,11 +3,14 @@ PROJECT_ROOT ?= ${VERILATOR_ROOT}

SHELL := /bin/bash

# Hashtag is a comment in make, but we want to use it in shell commands
HASHTAG := \#

# Find the path between the top level folder and the source code folder
# Just doing ${MODULE_FOLDER}/${PROJECT_NAME} is not sufficient, because there
# might be folders between the module folder and project folder. Like in the
# Hierachy example.
PATH_FROM_ROOT_TO_SRC = $(shell p=$(shell pwd); g=$${p\#\#*/${MODULE_FOLDER}}; echo $$g)
PATH_FROM_ROOT_TO_SRC = $(shell p=$(shell pwd); g=$${p${HASHTAG}${HASHTAG}*/${MODULE_FOLDER}}; echo $$g)

VERILATOR := $(VERILATOR_ROOT)/verilator-docker.sh
VERILATOR_ARGS := 4.038 ${MODULE_FOLDER}${PATH_FROM_ROOT_TO_SRC} ${PROJECT_ROOT}