You have a number of choices here:
- To use an inout-mode port, and read the value directly
- To use a buffer-mode port, and read the value directly
- To use an out-mode port, and read the value directly (VHDL-2008 only)
- To use an out-mode port, and read the value using the 'driving_value attribute
- To use an internal signal and copy its value to the output
- To model the internal state as a variable and copy its value to the output
The general advice is to use an internal signal, mostly because this is a highly portable solution. But I also like the methods of using the 'driving_value attribute, or reading directly from the out port (VHDL-2008 only). Keeping the state in a variable also looks nice because it prevents declaring unnecessary signals just to make the compiler happy; it is also as portable as using an internal signals, and variables are more efficient than signals from a simulation point of view.
Note that if you use an inout port, other entities connected to the port (and which have nothing to do with your FF model) could potentially change the value read inside your model. On the other hand, if you use buffer mode, you may have connectivity problems in older revisions of VHDL, which specify that buffer-mode ports can only be connected to other buffer-mode ports or internal signals (i.e., you cannot connect it directly to an out-mode port when you instantiate your FF).