Issues detected in sample_test.luc:
Error at line 9 offset 22: The value assigned to a constant must be constant!
Error at line 9 offset 32: $reverse() can only be used on constant expressions or signals.
Does this have something to do with the lack of an upper bound for the module parameter width? It seems like the last reference should work at least, since I explicitly pull 8 bits.
@alchitry Is there something I am not understanding in terms of the syntax, or might this be a bug or emhancement, at least in the [7:0] case? Thanks for any guidance you can provide, when you get a chance.
Sorry for the delay and thanks for the tag to get me notified.
This looks like a bug to me. I’ll dig into it today and see what’s going on.
You’d need to explicitly size the parameter like you did with bit indexing or by using $resize(). Obviously, that isn’t working still.
I’m sure it has to do with how parameters are “known” values and not “constant” values in the backend. (Known values are constant but their value isn’t known until build time).
It was also illegal to use $reverse() before on anything that wasn’t a constant or signal. I extended the functionality to allow for concatenations and array builders to be passed in.