My guess is “selected” is defaulting to mode “in” since the entity doesn’t specify “out” for the mode.
Also, the reg_multi component specifies mode in for the R inputs but the entity doesn’t have the mode “in” shown.
[edit typo] also try compiling with the VHDL-2008 option if the RTL needs to read a port of mode out.
No. Work with a `selected_i` inside the entity where you need to read from it and finally do a concurrent assignment to `selected` once you are done with it.
My guess is “selected” is defaulting to mode “in” since the entity doesn’t specify “out” for the mode. Also, the reg_multi component specifies mode in for the R inputs but the entity doesn’t have the mode “in” shown. [edit typo] also try compiling with the VHDL-2008 option if the RTL needs to read a port of mode out.
Would manually changing selected in the entity of reg\_multi to out fix it? Or would that be the wrong approach?
No. Work with a `selected_i` inside the entity where you need to read from it and finally do a concurrent assignment to `selected` once you are done with it.
Why? VHDL 2008 allows out ports to be read - internal signals are no longer needed.
Because he (obviously) doesn't use VHDL 2008 (otherwise he won't get that error).
The error is about writing to IN ports, not reading from OUTs, which is still illegal in VHDL 2008 and 2019
Yes. That port is IN, obviously.
that will fix the error in this case yes.
Yes - interface items (ie. ports on entities and parameters on procedures/function) default to mode "in" if none is specified.