Mike Treseler wrote:
> Analog_Guy wrote:
>
> > I want to code a generic testbench procedure to automatically check any
> > n-input combinatorial function in my design.
>
> Functions are timeless and can be verified using assertions:
>
> assert my_function("10101010") = 170
> report "my_function: error in case 170.";
>
> > What I would like is if someone knows how to pass a variable number of
> > input signals to a generic procedure?
>
> I would leave time and signals out of it.
> Just loop through a constant array of
> stim and expected values.
>
>
> -- Mike Treseler
For a 9-input combinatorial gate, wouldn't I have to create a constant
array with 512 elements? I wanted to cycle through every combination
of inputs. I was just trying to implement a 9-bit counter in a
procedure, whereby ip_1 <= count(

, ip_2 <= count(7), etc.. I thought
that by passing an unconstrained array, I could make a generic width
counter to automatically adapt to the number of inputs. I just can't
figure how to send the variable number of inputs to the procedure.