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

Add Verilator #5

Closed
mithro opened this issue Dec 5, 2020 · 13 comments · Fixed by #115
Closed

Add Verilator #5

mithro opened this issue Dec 5, 2020 · 13 comments · Fixed by #115
Labels
Help wanted Extra attention is needed Simulation Tools for simulation

Comments

@mithro
Copy link
Member

mithro commented Dec 5, 2020

I think there is some stuff in https://github.com/google/xls/tree/main/xls/build_rules ?

@umarcor
Copy link
Member

umarcor commented Dec 6, 2020

@umarcor umarcor added the Simulation Tools for simulation label Dec 6, 2020
@umarcor umarcor changed the title Simulation: Get Verilator into Bazel for simulation Add Verilator Dec 6, 2020
@umarcor umarcor added the Help wanted Extra attention is needed label Dec 6, 2020
@kkiningh
Copy link
Collaborator

kkiningh commented Dec 6, 2020

I have some rules I would be happy to contribute. See https://github.com/kkiningh/rules_verilator

@umarcor
Copy link
Member

umarcor commented Dec 8, 2020

@kkiningh that's nice!

@mithro, any guidelines about the structure you want to use in this repo?

@QuantamHD
Copy link
Collaborator

QuantamHD commented Dec 8, 2020

I think the first thing we need to get going is a VerilogInfo provider. The benefit of that is all rules can target it for physical processing. That's how I've been formatting it within Google.

Possibly something based around https://github.com/alainmarcel/UHDM

@umarcor
Copy link
Member

umarcor commented Dec 8, 2020

@QuantamHD, was that comment meant to be posted here? It seems to be related to Verilog (#15) and/or SystemVerilog (#16) rather than Verilator...

@QuantamHD
Copy link
Collaborator

For example the verible rule set in question defines a VerilogInfo as https://github.com/kkiningh/rules_verilator/blob/master/verilator/defs.bzl#L12

I think what I'd like to see is an authoritative provider other rules can target or consume; Verilog or not within this repo. HDLInfo or something related. We can provide the transitive src resolution etc. so that other rules don't need to deal with it as much. I just want a solid foundation so that we can add useful tools such that we can get solid compatibility with all the tools.

@kkiningh
Copy link
Collaborator

kkiningh commented Dec 8, 2020

@agoessling has been doing some work in this direction in his rules_verilog repo. The corresponding provider is VerilogModuleInfo and it should be supported in rules_verilator already.

@QuantamHD
Copy link
Collaborator

Awesome! I'm glad there's something out there we can build around. Thanks for the tip @kkiningh.

@agoessling
Copy link

@QuantamHD VerilogModuleInfo is currently used in:

Currently it is quite basic and only provides sources and the top module name. The idea being this can be shared between many tools and users only need to define their module structure once.

@mithro
Copy link
Member Author

mithro commented Dec 8, 2020

@agoessling - Would love to have your help in building this out.

@agoessling
Copy link

What is "this"?

@QuantamHD
Copy link
Collaborator

QuantamHD commented Dec 9, 2020

"this" is a project that is supposed to be a one stop shop for doing hardware dev with bazel.

So that includes

Having rules that take can RTL and be chained to emit GDSII (Sky130/FOSS-PDKs), but that can also be used to target FPGAs and soft CPUs. We want to take advantage of RBE to accelerate verification with massively parallel clusters. Using the open source community's tools like Yosys, OpenROAD, Verilator, Surelog etc.

My vision of this is that we enable bazel test //mychip/... and bazel build //mychip:gds and in 10 minutes you have verified and emitted a fabricatable design even for the most complex designs.

@per-gron
Copy link
Contributor

@QuantamHD I think it could be inspiring and generally useful if you added basically what you wrote in that last comment to the top level README.md :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Extra attention is needed Simulation Tools for simulation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants