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

verilog file bloc doesn't handle parameter correctly #1020

Open
Patarimi opened this issue Nov 30, 2020 · 13 comments
Open

verilog file bloc doesn't handle parameter correctly #1020

Patarimi opened this issue Nov 30, 2020 · 13 comments

Comments

@Patarimi
Copy link

I write the code below in verilog:
spi.txt
Then I imported it in qucs using the verilog file bloc, I was expecting the left bloc and I get the bloc on the right, is it the expected behaviour ?
verilog_import_qucs

PS: I use qucs 0.0.19 on windows 10.

@felix-salfelder
Copy link
Member

felix-salfelder commented Nov 30, 2020 via email

@Patarimi
Copy link
Author

Patarimi commented Dec 1, 2020

I use this tutorial. It is probably something added with verilog 2001.

how do parameters look like in files that work?

Do you mean, how I get the left symbol in the picture ? I simply remove the parameter section (the parameter WORD_WIDTH is undefined).

@felix-salfelder
Copy link
Member

felix-salfelder commented Dec 1, 2020 via email

@Patarimi
Copy link
Author

Patarimi commented Dec 2, 2020

No, but it change to blue in the text editor. I though it was handled.

@felix-salfelder
Copy link
Member

felix-salfelder commented Dec 2, 2020 via email

@Patarimi
Copy link
Author

Patarimi commented Dec 2, 2020

which other tool supports this syntax (in any)?

Vivado 2020 (from Xilinx) supports it.

@felix-salfelder
Copy link
Member

felix-salfelder commented Dec 2, 2020 via email

@Patarimi
Copy link
Author

Patarimi commented Dec 2, 2020

Yes, the synthesis and implementation is successful using Vivado. I use this syntax to be able to parametrize the buses width.
In the document you linked, I think the syntax can be seen in the part A.1.3.

I am new to QUCS and I may have also miss something.
Thanks for your time.

@felix-salfelder
Copy link
Member

felix-salfelder commented Dec 2, 2020 via email

@Patarimi
Copy link
Author

Patarimi commented Dec 2, 2020

I'd be happy to learn if it does (not) do what you need. Or what the
difference is, to begin with.

The way I use it is to parametrize the port output reg [WORD_WIDTH-1:0] rword,. If you declare the parameter after the port part, the parameter is not yet declared (I think this is expected).

PS: Theres refactoring work to do in the verilog area, maybe this would
not be hard to add and should be considered eventually. looking for
volunteers...

I would help with great pleasure. I never develop something like that before, is there a guide on how to get started ?

@felix-salfelder
Copy link
Member

felix-salfelder commented Dec 2, 2020 via email

@Patarimi
Copy link
Author

Glad to have help, even if it was by luck :-)
I have started to look into this. Should this issue be transferred to qucs/ADMS ?

@felix-salfelder
Copy link
Member

felix-salfelder commented Dec 11, 2020 via email

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