Closed eyck closed 1 year ago
I cannot reproduce this. The following complete code snippet does not result in any errors:
InstructionSet Test {
architectural_state {
unsigned int XLEN = 32;
unsigned int RFS = 32;
register unsigned<XLEN> X[RFS];
unsigned<XLEN>& ZERO = X[0];
}
}
Could you post a minimal example and the error it produces?
Okay, I see what's going on here. The errors occur if XLEN
is declared, but not assigned, because the type of X
is now unknown.
Fixing this will require a slight rework of how incomplete type information is represented and how the elaborator handles it.
It will be included in my next PR.
THX. Actually the snippet is cut from https://github.com/Minres/RISCV_ISA_CoreDSL/blob/master/RISCVBase.core_desc and you are right, XLEN does not have a value at the point of alias declaration
Having the following architectural state declaration:
the alias declaration is flagged as invalid. This does not happen when using an older commit (b065385)...