Closed Adivinedude closed 4 months ago
A couple comments:
wire [0:0] is a one element vector so a part select of any kind is perfectly valid.
Wires can have multiple drives and have defined resolution functions regarding how to resolve any driver mismatches. A uwire
can only have a single driver and will complain when multiple drivers are used. In SystemVerilog you can also assign to a variable using a single driver so if you goal is to create a warning when you have multiple drivers than you should use either a uwire
or a variable.
Given all this is there still something you expect to give different results?
I was completely unaware of a uwire in verilog. Thank you
yall are doing great work. sorry to keep popping up with strange and unusual issues. I found two possible warning/errors that are not being generated.
Im trying to create a module that will scale to a latency parameter. For all but .LATENCY('d0), the vectors will have a width greater than 1. So I declare the vectors with [MSB:LSB]. Latency zero is a valid option, so the vector declaration becomes [0:0]. This is causing some very strange issues when simulating with IVerilog.
Using the module
math_combinational
directly. "wire result" returns the correct value. but when I pass a wire vector tomath_combinational
through module math_lfmr, strange things happen. If the == operation results in FALSE0 then theresults_two
is set to false, but if the operation results in TRUE1, then 'results_two' is set to unknown1'bx
.the following test bench is stripped down code that will reproduce the behavior so it looks a little weird. I think its call
indexed part select
, that I am using to select the piece of the vector I want to operate on. But the vector is being defined as a scaler(size of 1)wire [0:0] vector
, which should generate an error message when being accessed asvector[idx]
syntaxIts was the strangest thing. I get the `1'bx' result, but why isn't it always 1'bx, and the part about piping it through another module, to me shouldn't have an effect. anyone see what Im doing wrong?
yep!! just needed a good nights sleep and some fresh eyes. Glad I waited to post this, found my error, so line 49 is my problem. I assign the wire vector, then use it as an output port in a module. so basically it gets assigned twice. in one instance it is assign to zero, in another, it could be 0 or 1, but the conflicting assign statements result in 1'bx. a warning message would be appropriate. again, thank yall for all the hard work, this is a great program yall have made.