Altera_Forum
Honored Contributor
11 years agoerror 10559 VHDL
Hi,
I was wondering if anyone can shed some light on this error that I managed to obtain. Error (10559): VHDL Subprogram Call error at user_functions.vhd(100): actual for formal parameter "s" must be a "signal" This is the chunk of code where the error occurs it is a function designed to count the rising edges on a signal. and this is to be implemented in main body of the code 4 times, as I need a counter for four signals. FUNCTION COUNTER(Z:std_logic; Reset:std_logic) RETURN natural IS variable count: natural range 0 to 65535; variable Q: natural range 0 to 65535; begin (line 100) if (rising_edge(Z)) then if Reset = '0' then count := 0; else count := count + 1; end if; end if; Return count; end; END user_functions; Is it that I cannot use a subprogram within a new function description? Let me know if you require more information.