-
Notifications
You must be signed in to change notification settings - Fork 91
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
Port Coercion Issue on AUTOINPUT #1859
Comments
"logic" is a data type. "wire" is not a data type, so there is no way presently to do this. What is the ultimate problem with the code as is currently generated (e.g. what breaks)? |
Verification Test Bench is trying to instantiate DUT where they are trying to drive stimulus through input. When input is expanded as "input logic" it cannot be driven and this requires input to always be default to wire nettype. This is called port coercion . |
Send me an edaplayground.com example showing the problem please. |
Section 2.7 explains the problem that I am facing with port coercion. https://www.sutherland-hdl.com/papers/2007-SNUG-SanJose_gotcha_again_paper.pdf When input is declared as "input logic" instead of "input"(default wire nettype), input port cannot be used to drive any values from Test Bench because net types allow, and resolve, multi-driver functionality. If AUTOINPUT nettype could be inidvidually controlled apart from AUTOOUTPUT/AUTOLOGIC, that would solve the issue. If its still unclear, I will send you an example in edaplayground.com |
The paper describes why you don't want to allow port coercion (and should have the types), which I'm agreeing with, what I don't understand is why you DO want to allow coercion, and how you expect that to work with non-trivially typed ports (e.g. a "real"). |
https://edaplayground.com/x/76cH Here is an example where input a cannot be driven or assigned from test bench since AUTO input expands to input logic and and not just input. |
That example works fine on all the simulators I tried once I changed "design" to "designn". Perhaps you aren't setting the SystemVerilog switch on the simulator? |
Hi All,
I want to be able to declare something as below
Module with AUTO insertion would like
This expands to
How do I make input default to wire type while retaing output/logic for others? It seems like verilog-auto-wire-type: "wire"
, verilog-auto-declare-nettype: "wire" make all AUTOINOUT/OUTPUT/LOGIC wire type.
Thanks
The text was updated successfully, but these errors were encountered: