[libre-riscv-dev] [Bug 316] bperm TODO

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu May 21 23:00:45 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=316

--- Comment #88 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #87)
> (In reply to Cole Poirier from comment #86)
> > Is there a way to access the values of the Signals instead of just their
> > type and name? It would be really useful if I could print the values of
> > signals while trying to get the test to pass.
> 
> x = yield val
> 
> then print (x)

I have tried doing the following:
```
def elaborate(self, platform):
    m = Module()
    width = yield self.width
    rs = yield self.rs
    ra = yield self.ra
    rb = yield self.rb
    print("width: ", width, "rs: ", rs, "rb: ", rb, "ra: ", ra)
```

Which unfortunately does not print the values, but gives me the following
error:
```
File "/home/colepoirier/src/nmigen/nmigen/hdl/ir.py", line 50, in get
    raise AttributeError("Object {!r} cannot be elaborated".format(obj))
AttributeError: Object <generator object Bpermd.elaborate at 0x7f1f4ca00750>
cannot be elaborated
```

What am I doing wrong?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list