Old style VHDL : Buffer
ports must be connected to Buffer
ports (not Out
ports) all the way up the hierarchy. The reason behind this made sense in the early days of VHDL but ASIC and FPGA technology has moved on, so has synthesis technology.
Old style solution : So make the out
port in entity (you haven't posted enough code so I can't name it, but it's the next level up in the hierarchy) a buffer
port too.
Workaround : If you're not allowed to change the port type in the higher level, you can connect the Buffer port to a signal, and assign that signal to the out
port.
Newer VHDL : in VHDL-2002 this restriction was eliminated, so this should work if you select --std=vhdl2002
or equivalent option when compiling.
Newest VHDL : Because Buffer
has been so poorly taught it's created so much confusion, that if you select --std=vhdl2008
, out
ports now allow reading the driving value just like buffer
ports, so you can simply replace your buffer
ports with out
ports.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…