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

Use Verilator binary from SiFive. #2370

Closed
wants to merge 2 commits into from

Conversation

richardxia
Copy link
Member

Related issue:

Type of change: other enhancement

Impact: no functional change

Development Phase: implementation

Release Notes

It has recently come to my attention that rocket-chip's Travis CI builds compiles Verilator from source, albeit with some caching logic. I think I can save us some time by using the prebuilt Verilator binaries (for Ubuntu 16.04) that I've been building on behalf of SiFive for the past couple of years.

Note that this specific change will bump Verilator from 4.008 to 4.028. I suppose I could build a 4.008 if we really wanted to, but hopefully this doesn't cause any issues.

.travis.yml Outdated
before_install:
- export CXX=g++-4.8 CC=gcc-4.8
# This installs into /usr/local/bin/verilator
- curl -L -O verilator.deb https://github.com/sifive/verilator/releases/download/4.028-0sifive1/verilator_4.028-0sifive1_amd64.deb
Copy link
Contributor

Choose a reason for hiding this comment

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

presumably the "make verilator" target was picking the version somehow? Should we make those two versions line up (the one this curl uses and the one you'd get if you decided to run "make verilator"?

Copy link
Member Author

Choose a reason for hiding this comment

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

That sounds reasonable, but I can't think of a good way of doing this besides just manually making sure that these version numbers are updated in both places. Do you have any suggestions?

Copy link
Contributor

@mwachs5 mwachs5 Mar 28, 2020

Choose a reason for hiding this comment

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

could we put the version number in a shared location (like "verilator-version.txt") and echo the contents of that file whenever we need it? Similar to https://github.com/chipsalliance/rocket-chip/blob/master/riscv-tools.hash?

Copy link
Member Author

Choose a reason for hiding this comment

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

That will rely on me/SiFive not changing the package naming convention for the SiFive hosted .deb package, which I guess will at least be true until we start building packages for other .deb-based distros, like Debian or other versions of Ubuntu. At least if it changes, it'll error out.

I'll make this change (if I can get the stupid build to work at all).

@richardxia richardxia force-pushed the use-verilator-binary-package branch from c3b9b33 to 312f1a2 Compare March 27, 2020 14:51
@richardxia
Copy link
Member Author

I apparently don't know how to run curl. Let me figure out why this isn't working... I swear I've been testing this locally.

@richardxia richardxia force-pushed the use-verilator-binary-package branch from 312f1a2 to 8af2fad Compare March 28, 2020 04:42
@richardxia
Copy link
Member Author

$ apt install -y verilator.deb
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
The command "apt install -y verilator.deb" exited with 100.

sudo make me a sandwich

.travis.yml Outdated
- export CXX=g++-4.8 CC=gcc-4.8
# This installs into /usr/local/bin/verilator
- curl -L -o verilator.deb https://github.com/sifive/verilator/releases/download/4.028-0sifive1/verilator_4.028-0sifive1_amd64.deb
- apt install -y verilator.deb
Copy link
Contributor

Choose a reason for hiding this comment

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

can you do this with the travis package thing above instead of doing it directly here?

Copy link
Contributor

Choose a reason for hiding this comment

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

by "package thing" i am referring to this list:

packages:

Copy link
Member Author

Choose a reason for hiding this comment

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

No, since this is an unofficial package. You can if you create your own apt repository, but I think that's kind of a lot of work.

I guess I could sign up for a Launchpad account, but that might be more trouble than necessary, since I'd have to learn how the Ubuntu package building actually works.

@richardxia richardxia force-pushed the use-verilator-binary-package branch from 8af2fad to 1af6914 Compare March 28, 2020 05:26
@richardxia richardxia force-pushed the use-verilator-binary-package branch from a5f0700 to 1cbec85 Compare March 28, 2020 07:11
@richardxia
Copy link
Member Author

I'm getting kind of frustrated with trying to make this work, and at this point I'm willing to give up, since I have no idea how these Makefiles actually work nor can I figure out how Travis CI actually handles package setup with multiple jobs and stages.

I think I'm going to just close this out as a wontfix, since it doesn't seem to be worth the effort.

@richardxia richardxia closed this Mar 30, 2020
@richardxia richardxia deleted the use-verilator-binary-package branch March 30, 2020 03:58
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