[libre-riscv-dev] daily kan-ban update 23may2020
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Sat May 23 23:23:19 BST 2020
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
On Sat, May 23, 2020 at 10:39 PM Cole Poirier <colepoirier at gmail.com> wrote:
>
> On May 23 2020, at 1:59 pm, Luke Kenneth Casson Leighton <lkcl at lkcl.net> wrote:
> > soc.fu they are now common base classes. the code is exactly the
> > same, it
> > is just split.
>
> I tried fixing this the naive way, by just substituting CommonInput
> stageStage for LogicalInputStage
why?
look at the class:
class LogicalInputStage(CommonInputStage):
def __init__(self, pspec):
super().__init__(pspec, "input") <---- must be initialised
with an argument, "input"
def ispec(self):
return LogicalInputData(self.pspec) <--- CommonInputStage
does not have this
def ospec(self):
return LogicalInputData(self.pspec) <---- CommonInputStage
does not have this
def elaborate(self, platform):
m = super().elaborate(platform) # covers A-invert, carry, excludes SO
comb = m.d.comb
ctx = self.i.ctx
# operand b
comb += self.o.b.eq(self.i.b) <---- CommonInputStage does
not do this
return m
so what you are trying to do is guaranteed to fail, on four separate counts.
* no initialisation of CommonInputStage 1st parameter
* no ispec
* no ospec
* parameter B will not be copied over
so, don't do that.
l.
More information about the libre-riscv-dev
mailing list