back.rtlil: lower maximum accepted wire size.
In practice wires of just 100000 bits sometimes have unacceptable performance with Yosys, so stick to Verilog's minimum limit of 65536 bits.
This commit is contained in:
parent
1321c4591d
commit
7aedb3e770
|
@ -132,10 +132,10 @@ class _ModuleBuilder(_Namer, _BufferedBuilder, _AttrBuilder):
|
||||||
|
|
||||||
def wire(self, width, port_id=None, port_kind=None, name=None, attrs={}, src=""):
|
def wire(self, width, port_id=None, port_kind=None, name=None, attrs={}, src=""):
|
||||||
# Very large wires are unlikely to work. Verilog 1364-2005 requires the limit on vectors
|
# Very large wires are unlikely to work. Verilog 1364-2005 requires the limit on vectors
|
||||||
# to be at least 2**16 bits, and Yosys 0.9 breaks on wires of more than 2**32 bits, so
|
# to be at least 2**16 bits, and Yosys 0.9 cannot read RTLIL with wires larger than 2**32
|
||||||
# those numbers are our hard bounds. Use 2**24 as the arbitrary boundary beyond which
|
# bits. In practice, wires larger than 2**16 bits, although accepted, cause performance
|
||||||
# downstream bugs are more likely than not.
|
# problems without an immediately visible cause, so conservatively limit wire size.
|
||||||
if width > 2 ** 24:
|
if width > 2 ** 16:
|
||||||
raise ImplementationLimit("Wire created at {} is {} bits wide, which is unlikely to "
|
raise ImplementationLimit("Wire created at {} is {} bits wide, which is unlikely to "
|
||||||
"synthesize correctly"
|
"synthesize correctly"
|
||||||
.format(src or "unknown location", width))
|
.format(src or "unknown location", width))
|
||||||
|
|
Loading…
Reference in a new issue