Closed Jacajack closed 10 months ago
On a related note:
module X {}
impl X {
const ubus<(- -128s8)> data;
}
Produces the following output:
[2023-11-22T18:02:28Z ERROR hirn::elab::multi_pass_elab::signal_graph_pass::gen_signal] Signal data has width -128 which is out of range
[2023-11-22T18:02:28Z ERROR hirn::elab::multi_pass_elab::signal_graph_pass] Module ModuleId { id: 1 } contains errors (InvalidSignalWidth(-128))
module X;
wire unsigned[383:0] data;
endmodule
× Error: Invalid signal width
╭─[tests/input/ignore/jesus.hirl:74:1]
74 │ module X {}
75 │ impl X {
· ───┬──
· ╰── Other elaboration warning/error occured
76 │ const ubus<(- -128s8)> data;
╰────
Note that the signal width is 383. Perhaps it's not filtered out properly on the HIRN side as well.
module X {}
impl X {
const ubus<(128s8-1s1)> data;
}
Also panics. Not sure if related, needs investigation.
Input
Signal building fails in the API. Semantic analyzer should verify that this numeric constant is only valid if preceded by the unary minus operator.