<@U01819B63HP>: I found an error in xschem (and p...
# xschem
t
@User: I found an error in xschem (and please correct me if my version is just out of date): I have a symbol for the caravel project wrapper. It has vectors for some of the pins, like
io_out[26:0]
. Many of these pins don't require connections. But if I leave them unconnected on the wrapper symbol in my testbench schematic, then they are replaced in the nelist with a single wire
__UNCONNECTED_PIN__X
instead of an array. If I connect a wire to the pin going nowhere, it works just fine. So when there is no wire connected to a pin which is a bus, it should be generating as many
UNCONNECTED_PIN
nets in the call to the subcircuit as there are wires in the bus. Otherwise the simulation fails with a "not enough parameters in call" error. Clearly the workaround is to add a stub wire to the pin connection on the symbol, but that should be optional, and the behavior should be effectively the same in either case.
s
@Tim Edwards Normally unconnected pins should be terminated with the devices/noconn.sym symbol, to make it clear it's designer decision to leave these pins unconnected. If you generate a netlist with a symbol pin unterminated the symbol is colored in red, and the following message is issued in the ERC (View-> Show ERC window):
Warning: unconnected pin,  Inst idx: 20, Pin idx: 0  Inst:x1
However i can manage to generate an array of UNCONNECTED_PIN nets. Will make a commit asap.
t
@Stefan Schippers: Still, it seems to me that should be optional. The netlister should know that the pin name implies a bus, and it can generate N isolated nets where it is currently generating only one, and the netlist will just be correct. In other words, you're generating a
warning
message but creating an actual error in the output netlist.
s
Yes i can do that,
Thank you for pointing out this issue
t
Right, sorry, I was ignoring your last sentence up there. . . apologies.
s
@Tim Edwards i have committed the requested fix. Any (bussed or not) unconnected ports are now 'attached' to unique 'UNCONNECTED_PIN__#[m-1:0] (for bussed ports of width 'm') or UNCONNECTED_PIN__# (for non-bussed ports), where the '#' is a unique integer that differentiates all unconnected nets. An ERC warning is still generated (and symbols with unconnected ports are highlighted) but the generated netlist is formally correct.