Re: [myhdl-list] how to make list of unequal-sized signals
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2016-02-25 13:24:35
|
> this does not seem to be convertible, as the signals in the array > have different lengths > > multout = [Signal(intbv(0, min=de.min*coeff, max=de.max*coeff)) for > coeff in coeffs] You can't do this, in hardware if they are all different types they would need to be mapped to some non-homogeneous structure (i.e. not memory). What I would do if first find the min and max in your coefficients and create the coefficient array (list-of-signals) from the overall collection's min and max. Then you have a structure that can be mapped to to a memory if needed. If that is not desired, you don't have much choice but to individually select the different size `coeff`. Note, if you use the ROM [1] structure (tuple-of-ints) it will use the minimal hardware you desire. Regards, Chris [1] http://docs.myhdl.org/en/stable/manual/conversion_examples.html#rom-inference |