[libre-riscv-dev] [Bug 353] formal proof of soc.regfile classes RegFile and RegFileArray needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed May 27 18:42:40 BST 2020


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

--- Comment #5 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #4)
> then you know what to do there: inspect line 22 of that file, and check
> it against the latest version of nmigen, online.  have a look:
> https://github.com/nmigen/nmigen/blob/master/nmigen/compat/sim/__init__.py
> 
> 
>     if not isinstance(generators, dict):
>         generators = {"sync": generators}
>         if "sync" not in fragment.domains:
>             fragment.add_domains(ClockDomain("sync"))
> 
> 
> does that match with what you have?

Aha, my mistake, I forgot to checkout nmigen/nmigen master after I made a PR to
nmigen the other week... Oof silly me. fixed now, thanks.

> > Indeed, it seems to be a very productive strategy. Looking forward to
> > working with you on the proof today. Just reviewing my notes now, should
> > have some code for some of the basic assumptions committed in the next hour.
> 
> cool.

Are class attributes (self.x) declared within __init__ public and those
declared within elaborate() private? I though all python class attributes were
public, and in order to get 'private' variables in a class you have to do as
you did in virtual_port.py by simply declaring it a variable and not an
attribute of the class object. I ask because I'm having an issue where I'm
trying to access self.reg of class Register(), which is declared inside
elaborate(), and I get an error, but accessing any of the self.xyz attributes
like self.width declared in __init__ works fine.

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


More information about the libre-riscv-dev mailing list