ID:12013 Possible port direction mismatch for entity "<name>" at port "<name>". Upper entity is expecting "<name>" pin while lower entity is using "<name>" pin.

CAUSE: You used an output pin of a lower entity as an input or vice versa. For example, you tried to feed an output pin of a lower entity with some combinational logic or upper entity's input pin. Or you used an input pin of a lower entity to feed combinational logic or an output pin of upper entity. As a result, the Quartus Prime software cannot compile the design.

ACTION: Remove the illegal connection or connect the lower entity in the same direction as surrounding logic implies.