V
vipin lal
Hi guys,
I want to do function overloading in one of my designs.I googled for
some examples and I learned that for function overloading to work, you
need either different number of parameters or different type of
parameters.
But I want something like this in my code:
function f(a : in std_logic_vector(1 downto 0)) return std_logic is
.....
end f;
function f(b : in std_logic_vector(2 downto 0)) return std_logic is
.....
end f;
The only change is that a is 2 bit in size and b is 3 bit in size. How
do I do something like this. Is there any hack to get this kind of
thing working?
Thanks
vipin
I want to do function overloading in one of my designs.I googled for
some examples and I learned that for function overloading to work, you
need either different number of parameters or different type of
parameters.
But I want something like this in my code:
function f(a : in std_logic_vector(1 downto 0)) return std_logic is
.....
end f;
function f(b : in std_logic_vector(2 downto 0)) return std_logic is
.....
end f;
The only change is that a is 2 bit in size and b is 3 bit in size. How
do I do something like this. Is there any hack to get this kind of
thing working?
Thanks
vipin