-
Notifications
You must be signed in to change notification settings - Fork 31
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
High impedance assignment translates to 1'x #170
Comments
Yes, but you can the same with a verilog input:
module m (output v);
assign v = 1'bz;
endmodule
autoidx 1
attribute \cells_not_processed 1
attribute \src "t.v:1.1-3.10"
module \m
attribute \src "t.v:1.18-1.19"
wire output 1 \v
connect \v 1'x
end
So it is probably a limitation of yosys.
|
I managed to work around this using |
Looks like there's an open yosys bug for this: YosysHQ/yosys#511 |
Here's a gdb session log for the yosys reproducer above. Looks like internally the constant does have the Sz value but the rtlil backend dumps it as 'x' in this code because is_fully_undef returns true:
|
Indeed the write_verilog output looks correct. I'm pretty sure something in the toolchain is miscompiling this as I can observe the bus conflicts on my Oscilloscope :) |
Ok, so that's just a bug with write_rtlil.
Do not hesitate to report the issue once you have figured out it.
|
When trying to assign a pin to HiZ I get a hard low drive instead. Reproducer below. I dub this bug "resisting high impedance" :)
ent.vhdl:
GHDL synth keeps the 'Z':
but ghdl-yosys-plugin seems to translate it to
1'x
:Versions (all using my Debian packaging):
ghdl-yosys-plugin
0.0~git20211127.09a32cd-2~bpo11+1
ghdl
2.0.0+dfsg-1~bpo11+1
yosys
0.12-1~bpo11+1
The text was updated successfully, but these errors were encountered: