Bug with SRAM bus inside address-space
With the following cheby file:
memory-map:
bus: wb-16-be
name: example
children:
- address-space:
name: bar0
children:
- block:
name: block0
children:
- submap:
name: submap0
size: 128
interface: sram
I get the error:
$ cheby --gen-hdl --input example.cheby --address-space bar0
Traceback (most recent call last):
File "/home/tlevens/venv/bin/cheby", line 33, in <module>
sys.exit(load_entry_point('cheby', 'console_scripts', 'cheby')())
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/main.py", line 380, in main
handle_file(args, f)
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/main.py", line 335, in handle_file
h = gen_hdl.generate_hdl(top)
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/gen_hdl.py", line 325, in generate_hdl
root.h_gen.gen_processes(ibus)
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/hdl/genblock.py", line 64, in gen_processes
n.h_gen.gen_processes(ibus)
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/hdl/genblock.py", line 64, in gen_processes
n.h_gen.gen_processes(ibus)
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/hdl/geninterface.py", line 18, in gen_processes
n.h_busgen.wire_bus_slave(self.root, self.module, n, ibus)
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/hdl/srambus.py", line 49, in wire_bus_slave
stmts.append(HDLAssign(n.h_bus['dato'], self.gen_slice(root, ibus.wr_dat, n.c_width)))
File "/afs/cern.ch/work/t/tlevens/repos/python/cheby/proto/cheby/hdl/srambus.py", line 36, in gen_slice
if wd < root.c_word_size * tree.BYTE_SIZE:
AttributeError: 'AddressSpace' object has no attribute 'c_word_size'