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

compile to verilog, convert function to function, but not to modules. #712

Open
Yuecheng-CAM opened this issue Jul 9, 2024 · 1 comment

Comments

@Yuecheng-CAM
Copy link

Hi,

I find when I compile bluespec to Verilog, I find the functions in bluespec got compiled to verilog modules, but not verilog functions. I'm wondering is there a flag/option to specify compile bluespec functions to verilog functions. Thanks

@rsnikhil
Copy link
Collaborator

rsnikhil commented Jul 9, 2024

No, there is no way to preserve a BSV function as a Verilog function.

All BSV functions are normally inlined, and disappear in the generated Verilog.

But see also "Section 14.1.1 noinline" in the BSV Language Reference Guide. This does not do exactly what you're asking, but it does create a single Verilog module with the function as its only method. The function is not inlined at the invocation sites; instead the Verilog module is instantiated and the method is invoked.

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

No branches or pull requests

2 participants