Closed alikates closed 3 months ago
Yes, let me address this right away. It's due to the frontend trying to construct the netlist even if the underlying slang elaboration (inside driver.createCompilation();
) raised errors. What we should do is error out early and let the user see the slang errors.
This and similar crashes should be fixed with 90241a2:
-- Running command `read_slang assign_struct.sv' --
1. Executing SLANG frontend.
Top level design units:
t01
assign_struct.sv:2:18: error: use of undeclared identifier 'WIDTH'
input logic [WIDTH-1:0] in0;
^~~~~
Build failed: 1 error, 0 warnings
ERROR: Compilation failed
Unfortunately we now have a hard dependency on a slang patch, let's see if it's taken up soon.
I was writing a test for struct assigment and indexing when i stumbled upon this error:
The relevant part of the test is this (notice WIDTH is undefined):
Looks like it doesn't notice that
WIDTH
is not defined, and instead of throwing an error it directly skips adding the wire to the netlist. Eventually the wire is looked up by ID and because it isn't found, the assertion fails.