Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: [libre-riscv-dev] lots of stuff broken
Date: Sat, 18 Jul 2020 23:18:32 +0100
Message-ID: <CAPweEDy_OqUdMEbXJ4TSuYunCTYVyd7pboNuDzNBwt7TzW1Rdg@mail.gmail.com> (raw)

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

             reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 22:18 Luke Kenneth Casson Leighton [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPweEDy_OqUdMEbXJ4TSuYunCTYVyd7pboNuDzNBwt7TzW1Rdg@mail.gmail.com \
    --to=lkcl@lkcl.net \
    --cc=libre-riscv-dev@lists.libre-riscv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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