--- Quote Start ---
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.
--- Quote End ---
--------------------------------------------------------------------
Hi ,
I dont where "s" is defined as a signal for variable :
actual for formal parameter "s" must be a "signal"
Also this should be put in a process , functions are mostly used for mathematical or data conversion tasks .
Would help if i could see how is it called within the main architecture .
Regards ,
Ahmed Asim Ghouri
Embedded Strings inc
Website :
www.emstrings.com Email :
support@emstrings.com