Skip to content

feat(build): Prepare for XiangShan docker support#615

Merged
poemonsense merged 3 commits intomasterfrom
prep_xs_docker
Apr 28, 2025
Merged

feat(build): Prepare for XiangShan docker support#615
poemonsense merged 3 commits intomasterfrom
prep_xs_docker

Conversation

@forever043
Copy link
Copy Markdown
Contributor

No description provided.

@forever043 forever043 changed the title Prepare for XiangShan docker support feat(build): Prepare for XiangShan docker support Apr 27, 2025
@forever043 forever043 force-pushed the prep_xs_docker branch 2 times, most recently from 59728a5 to 6be4838 Compare April 27, 2025 16:28
@forever043 forever043 requested a review from poemonsense April 27, 2025 16:29
@date -R | tee -a $(TIMELOG)
$(TIME_CMD) verilator $(VERILATOR_FLAGS) -Mdir $(@D) $^ $(EMU_DEPS)
$(TIME_CMD) $(VERILATOR) $(VERILATOR_FLAGS) --Mdir $(@D) $^ $(EMU_DEPS)
@sed -i -e 's/$(subst /,\/,$(NOOP_HOME))/$$(NOOP_HOME)/g' \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this

Copy link
Copy Markdown
Contributor Author

@forever043 forever043 Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. fix wrong -Mdir to --Mdir (although it work now)
  2. use VERILATOR variable instead of verilator to support override outside
  3. change abs-path in generated VSimTop.mk to $(NOOP_HOME)/xxx, then we can move the build directory to other place by reset NOOP_HOME env

all these changes are pre-requirements of docker build support OpenXiangShan/PR#4538

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. change abs-path in generated VSimTop.mk to $(NOOP_HOME)/xxx, then we can move the build directory to other place by reset NOOP_HOME env

I see. But this would require that NOOP_HOME is always specified, even after verilator exits. I'm not sure if this is OK?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. change abs-path in generated VSimTop.mk to $(NOOP_HOME)/xxx, then we can move the build directory to other place by reset NOOP_HOME env

I see. But this would require that NOOP_HOME is always specified, even after verilator exits. I'm not sure if this is OK?

NOOP_HOME was not required, the abs-path was set as default in VSimTop.mk
e.g.:

NOOP_HOME ?= /xxx/yyy
default: $(NOOP_HOME)/emu
...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

@poemonsense poemonsense merged commit 7522de4 into master Apr 28, 2025
5 checks passed
@poemonsense poemonsense deleted the prep_xs_docker branch April 28, 2025 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants