Re: [myhdl-list] List Of Constants
Brought to you by:
jandecaluwe
From: Josy B. <jos...@gm...> - 2015-03-15 22:18:44
|
> Correct, if the list of constants doesn't > follow the ROM conversion examples [1] it > will not convert. > > A work around is to use local references to > the list-of-constants > > param1 = list_of_constants[0] > param2 = list_of_constants[1] > > or to use an interface, object with constants > instead of the list-of-constants. > > class Parameters: > const1 = 9 > const2 = 7 > const3 = 'go' > > Hope that helps (didn't have a look at the > example, commenting on the description), > Chris > > [1] > http://docs.myhdl.org/en/latest/manual/conversion_examples.html#rom- inference > Chris, Any workaround is a good as any other workaround, but still is a workaround. I just added the 4 (in my actual module, not the example) constants in the call. None of the workarounds can be classified as _pythonic_, I'd say. What if I come up with a 8 * 8 constant matrix (like in JPEG DCT)? And it is well supported in VHDL ... I checked the _toVHDL code and process (I built a lot of tracing in my local copy), and it is not evident how to add support for this. But we'll discuss this another time? (It's bedtime over here ...) Best regards, Josy |