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

Restore Verilator compile/simulation #2585

Open
wants to merge 2 commits into
base: cv32e40p/dev
Choose a base branch
from

Conversation

MikeOpenHWGroup
Copy link
Member

Resolves #2584, and cleans up DSim compiles as well.

tb_top_verilator $(TBSRC_VERI) \
-f $(CV_CORE_MANIFEST) \
$(CV_CORE_PKG)/bhv/$(CV_CORE_LC)_core_log.sv \
$(TBSRC_CORE)/tb_top_verilator.cpp --Mdir $(VERI_OBJ_DIR) \
-CFLAGS "-std=gnu++11 $(VERI_CFLAGS)" \
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose here "-std=gnu++11" was removed for it is no necessary on Verilator supported (or recent) versions.

I imagine this modification should also be done to the same targets for core-v-verif/cv32e40s/sim/core/Makefile:468 and core-v-verif/cv32e40x/sim/core/Makefile

Copy link
Member Author

Choose a reason for hiding this comment

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

This was done as per the discussion of Verilator Issue #4898 which recommends removing -std=c++11.

You are right that we should do the same for cv32e40s and cv32e40x - those should be done on their respective cv32e40[s|x]/dev branches.

@@ -15,7 +15,7 @@
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-0.51

module cv32e40p_tb_wrapper
module cv32e40p_core_tb_wrapper
Copy link
Contributor

Choose a reason for hiding this comment

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

Was there a particular reason for the renaming? I agree that adding _core looks better, but now the name of the file should also follow it :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! You are right, the filename should have been updated to match the module name. That also means updating the file-list in the Makefile. I have pushed in these changes on this pull-request.

Copy link
Contributor

@cairo-caplan cairo-caplan left a comment

Choose a reason for hiding this comment

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

The modifications do allow Verilator to work again, solving #2585 - I tested it locally on Verilator 5.033.

I advise to change the filename of the cv32e40p/tb/core/cv32e40p_tb_wrapper.sv to cv32e40p/tb/core/cv32e40p_core_tb_wrapper.sv, and to check if the -std=gnu++11 CFLAG can be removed on Verilator targers for other cores too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants