You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this high priority? From my conversations with @rsetaluri it seems that the synthesis flows we're using at AHA handles these fine, so does the FB flow. From your other issue, it seems like the tool will support it if you use a flag or .sv extension.
Ideally we could have it be configurable as to whether we use packed or unpacked, but this is quite a lot of work. I think the code in the verilog backend originally used packed, so it's not so bad to add there, but for verification, handling packed arrays (e.g. in fault) is quite tedious (for verilator). We have to map multi-dimensional array interactions into packed C integers for verilator (so we need to generate masking code). For system-verilog, it's fine since you can use the same packed array syntax in the test bench, but we'd need to be aware at the magma level whether a multi-dimensional array will be generated using packed or unpacked.
Not high priority as the workaround is to just use System Verilog. But it would be nice if we could tag verilog code generation according to what version of verilog/systemverilog it supports in order to early-out with these types of compatibility errors.
Just noting this here in case it comes up (raj used the same workaround). If verilog compatability is required or unpacked arrays are to avoided for whatever reason (PD had some problems with this), one can use the disable_ndarray option in magma and disable-ndarray flag for flattentypes in coreir which will flatten ndarrays and generate verilog compatible code (no unpacked arrays)
Currently the verilog for commonlib.MuxN is generated like the following:
Some verilog tools cannot handle the unpacked
input [8:0] in_data [1:0]
for ports.We should default ND-arrays to use packed arrays:
Or set up some verilog generation flags to choose these options.
The text was updated successfully, but these errors were encountered: