Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] lots of stuff broken
@ 2020-07-18 22:18 Luke Kenneth Casson Leighton
  2020-07-19  6:55 ` Jacob Lifshay
  0 siblings, 1 reply; 12+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-07-18 22:18 UTC (permalink / raw)
  To: Libre-RISCV General Development

hiya jacob,

um, the div unit changes is breaking a lot of things that terminates
any possibility of doing work.

i can't run any of the compunit tests, or test_issuer.py (the main
test i use for verifying the core is operational).  could you make
sure in future to run some of the unit tests, and also rather than
make major adjustments to code that's in use in ways that cause
significant failures (only partially changing names of classes from
DIVXXX to DivXXX without doing a global search/replace throughout the
code), put in place migration plans?

for example: if you make major name changes without a global
search/replace, put a temporary variable (commented), "DIVXXX=DivXXX"
with a "TODO: complete transition to new name".

the better strategy would have been to start a new subdirectory with
the new code - or just new filenames
pipe_data_to_be_replaced_once_working.py

regarding DivPipeSpec:

class DivPipeSpec(CommonPipeSpec):
    def __init__(self, id_wid, div_pipe_kind):
        super().__init__(id_wid=id_wid)
        self.div_pipe_kind = div_pipe_kind
        self.core_config = div_pipe_kind.config.core_config

it's not designed for having extra parameters.  if you need two
different kinds, then that means having two differerent DivPipeSpec
classes: one for the Comb work, one for the Sync work.

then in compunits.py, different Function Units are declared as follows:

class DivFunctionUnitWhateverType(FunctionUnitBaseSingle):
    fnunit = Function.DIV
    def __init__(self, idx):
        super().__init__(DivPipeSpecWhateverType, DivBasePipe, idx)

class DivFunctionUnitCombType(FunctionUnitBaseSingle):
    fnunit = Function.DIV
    def __init__(self, idx):
        super().__init__(DivPipeSpecCombType, DivBasePipe, idx)

anyway.  i worked out that this is "fixable" by giving DivPipeSpec a
default argument.

l.


compunits/compunits.py:221: UnusedElaboratable:
<soc.fu.compunits.compunits.DivFunctionUnit object at 0x7f0a131a57f0>
created but never used
  self.fus["%s%d" % (name, i)] = kls(i)
UnusedElaboratable: Enable tracemalloc to get the object allocation traceback
E
======================================================================
ERROR: run_all (__main__.TestRunner)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "simple/test/test_issuer.py", line 87, in run_all
    m.submodules.issuer = issuer = TestIssuer(pspec)
  File "/home/lkcl/src/libresoc/soc/src/soc/simple/issuer.py", line
39, in __init__
    self.core = core = NonProductionCore(pspec)
  File "/home/lkcl/src/libresoc/soc/src/soc/simple/core.py", line 67,
in __init__
    self.fus = AllFunctionUnits(pspec, pilist=[pi])
  File "/home/lkcl/src/libresoc/soc/src/soc/fu/compunits/compunits.py",
line 221, in __init__
    self.fus["%s%d" % (name, i)] = kls(i)
  File "/home/lkcl/src/libresoc/soc/src/soc/fu/compunits/compunits.py",
line 153, in __init__
    super().__init__(DivPipeSpec, DivBasePipe, idx)
  File "/home/lkcl/src/libresoc/soc/src/soc/fu/compunits/compunits.py",
line 108, in __init__
    pspec = speckls(id_wid=2)                # spec (NNNPipeSpec instance)
TypeError: __init__() missing 1 required positional argument: 'div_pipe_kind'


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-18 22:18 [libre-riscv-dev] lots of stuff broken Luke Kenneth Casson Leighton
2020-07-19  6:55 ` Jacob Lifshay
2020-07-19 10:46   ` Luke Kenneth Casson Leighton
2020-07-19 21:11     ` Luke Kenneth Casson Leighton
2020-07-19 21:27       ` [libre-riscv-dev] div pipe Jacob Lifshay
2020-07-19 22:07         ` Luke Kenneth Casson Leighton
2020-07-20  0:32           ` Jacob Lifshay
2020-07-20  1:38             ` Luke Kenneth Casson Leighton
2020-07-20  2:06               ` Jacob Lifshay
2020-07-20  2:13                 ` Luke Kenneth Casson Leighton
2020-07-20  3:21                   ` Jacob Lifshay
2020-07-20 10:31                     ` Luke Kenneth Casson Leighton

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git