From 6ee37efeb6ba8d1f6f49feb447c8b3ebba723fb8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 7 Sep 2020 22:01:01 +0100 Subject: [PATCH] create eq_from function based on eq_from_execute1 --- src/soc/fu/base_input_record.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/soc/fu/base_input_record.py b/src/soc/fu/base_input_record.py index 50c5958b..e39daef8 100644 --- a/src/soc/fu/base_input_record.py +++ b/src/soc/fu/base_input_record.py @@ -21,17 +21,22 @@ class CompOpSubsetBase(Record): for fname, sig in self.fields.items(): sig.reset_less = True - def eq_from_execute1(self, other): - """ use this to copy in from Decode2Execute1Type + def eq_from(self, other): + """ use this to copy in from another CompRecord """ res = [] - print ("eq_from_execute self", self, self.fields) - print (" other", other, other.fields) + print ("eq_from self", self, self.fields) + print (" other", other, other.fields) for fname, sig in self.fields.items(): - eqfrom = other.do.fields[fname] + eqfrom = other.fields[fname] res.append(sig.eq(eqfrom)) return res + def eq_from_execute1(self, other): + """ use this to copy in from Decode2Execute1Type + """ + return self.eq_from(other.do) + def ports(self): res = [] for fname, sig in self.fields.items(): -- 2.30.2