genlib/record: add eq
This commit is contained in:
parent
9d7c679b8c
commit
1897b74f97
|
@ -27,6 +27,10 @@ class Record:
|
|||
setattr(self, f, Signal(1, prefix + f))
|
||||
self.field_order.append((f, 1))
|
||||
|
||||
def eq(self, other):
|
||||
return [getattr(self, key).eq(getattr(other, key))
|
||||
for key, a in self.field_order]
|
||||
|
||||
def layout(self):
|
||||
l = []
|
||||
for key, alignment in self.field_order:
|
||||
|
|
Loading…
Reference in New Issue