Procedure is unable to find function since it is defined after the procedure, how to fix this?
In my VHDL entity, I have declared some procedures in the header of the architecture i.e before the keyword
begin. Some procedures are calling functions. The functions are actually defined in a block after the block that define the procedures. When I compile the code, I get
"Unknown identifier" error.
I could just move the function definitions above the procedure definitions i.e cut paste the block of code or just shift it up in the source file. However, there must be a better way around this.
How do I write the code so the procedure knows that the function it is trying to call is actually defined after the procedure definition?