DesyRDL crashes when multiple cascaded registers are used
I'm trying to generalize my registers for m
channels and n
PLLs per channel.
Currently, I'm testing with 8 channels with each 2 PLLs and desyrdl crashes as soon as I try to include any form of PLL
from CHANNEL_CTRL
.
With the simplified RDL file
regfile PLL_CTRL {
reg gain {
field {
name = "gain";
sw = rw;
hw = r;
reset = 0;
} GAIN[32];
};
gain P_GAIN;
gain I1_GAIN;
gain I2_GAIN;
};
regfile CHANNEL_CTRL {
PLL_CTRL PLL[2];
};
addrmap pms_wrapper {
name = "PMS Wrapper";
desyrdl_interface = "AXI4L";
desyrdl_access_channel = 0;
default regwidth = 32;
default accesswidth = 32;
default sw = rw;
default hw = r;
CHANNEL_CTRL CHANNEL_CTRL[8];
};
I get the output:
chris@gravi22 ~/g/L/f/d/p/l/s/h/i/p/hdl $ desyrdl -o desyrdl -i ../rdl/pm_wrapper.rdl -f vhdl
info: Generating output for formats: ['vhdl']
info: Using default templates directory: /home/chris/.local/lib/python3.10/site-packages/desyrdl/templates
info: Taking common libraries from /home/chris/.local/lib/python3.10/site-packages/desyrdl/libraries
info: SystemRdl compiler done.
Traceback (most recent call last):
File "/home/chris/.local/bin/desyrdl", line 8, in <module>
sys.exit(main())
File "/home/chris/.local/lib/python3.10/site-packages/desyrdl/desyrdl.py", line 148, in main
walker.walk(top_node, listener)
File "/home/chris/.local/lib/python3.10/site-packages/systemrdl/walker.py", line 165, in walk
self.current_action = self.do_exit(node, listener)
File "/home/chris/.local/lib/python3.10/site-packages/systemrdl/walker.py", line 219, in do_exit
action = listener.exit_Addrmap(node) or WalkerAction.Continue
File "/home/chris/.local/lib/python3.10/site-packages/desyrdl/DesyListener.py", line 563, in exit_Addrmap
super().exit_Addrmap(node)
File "/home/chris/.local/lib/python3.10/site-packages/desyrdl/DesyListener.py", line 138, in exit_Addrmap
self.gen_items(node, self.context)
File "/home/chris/.local/lib/python3.10/site-packages/desyrdl/DesyListener.py", line 265, in gen_items
self.gen_rfitem(item, context=item_context)
File "/home/chris/.local/lib/python3.10/site-packages/desyrdl/DesyListener.py", line 431, in gen_rfitem
self.gen_items(regf, context)
File "/home/chris/.local/lib/python3.10/site-packages/desyrdl/DesyListener.py", line 266, in gen_items
context['rgf_insts'].append(item_context)
KeyError: 'rgf_insts'
I tested with the version 1.3.0 from Pip and the most recent version from Master
branch.
Should I use the compiler differently?