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

[Branch] attributes-on-parameters #41

Open
mithro opened this issue Sep 5, 2019 · 5 comments
Open

[Branch] attributes-on-parameters #41

mithro opened this issue Sep 5, 2019 · 5 comments

Comments

@mithro
Copy link
Member

mithro commented Sep 5, 2019

Why did we need this? (what does this change enable us to do)

Enables Verilog attributes to be used on parameters.

What did it change?

The Yosys RTIL to support attributes on parameters.

Should it be merged upstream - if not, when can we delete it?

Unknown.

More Info

See #27

@litghost
Copy link

litghost commented Sep 5, 2019

I believe this branch can be deleted, and I thought I had.

@mithro
Copy link
Member Author

mithro commented Sep 5, 2019

@litghost - Upstream Yosys only has the ability to ignore attributes on parameters? This is full attribute on parameters support with tests...

@litghost
Copy link

litghost commented Sep 5, 2019

@litghost - Upstream Yosys only has the ability to ignore attributes on parameters? This is full attribute on parameters support with tests...

I do not know, but I believe upstream yosys implemented another way to hold attributes on parameters?

@eddiehung
Copy link

read_verilog -pwires preserves parameter values as constant driven wires. I'm not sure if it moves param attributes onto those wires, if not, can be easily fixed.

Can you provide more justification about what this enables, and/or a use case? Perfect round trip with Verilog in and Verilog out is not, in general, something synthesis tools can be expected to be good at since their purpose in life is to perform transformations.

@mkurc-ant
Copy link

mkurc-ant commented Sep 17, 2019

I managed to modify the verilog backend to output all "parameters as wires" properly as verilog parameter statements. The option can be enabled in the verilog backend by specifying the -pwires2params switch. I've also added support for writing string parameter values as strings (not as integers) and real values as numbers.

There is also a test for verilog round trip which runs a verilog file twice through Yosys. Then it compares whether outputs after 1st and 2nd pass are equal.

I've created a new branch with this change: https://github.com/SymbiFlow/yosys/commits/attributes-on-parameters2

GitHub
SymbiFlow WIP changes for Yosys Open SYnthesis Suite - SymbiFlow/yosys

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

4 participants