Re: [myhdl-list] Howto Lookup-Table
Brought to you by:
jandecaluwe
From: Marcel H. <1he...@in...> - 2016-01-21 15:34:53
|
On 21.01.2016 15:28, Christopher Felton wrote: [...] > Yes, as you discovered dictionaries are not directly > convertible. The convertible types are described > here: > http://docs.myhdl.org/en/stable/manual/conversion.html#supported-types > > This doesn't mean you can't use dicts to manage the > information in your design it just means you are limited > to using dicts in elaboration (outside the myhdl > generators). Thanks for the clarification. > >> Okay, I thought, then I will just outsource the tuples to variables and >> make a "big" if/elif switch-case. But that don't work either :/ >> > > I am not sure I am following but I think you need this > simple change > > offset = USER[rd] > regs[offset].next = din > I'm used to write everything as compact as possible (especially in python), so this seems a bit of weird to me, but okay. It works now. :) Thanks for the help Marcel |