[libre-riscv-dev] daily kan-ban update 04aug2020

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed Aug 5 19:39:20 BST 2020


On Wed, Aug 5, 2020 at 6:37 PM Tobias Platen
<libre-soc at platen-software.de> wrote:
>
> On Wed, 5 Aug 2020 18:08:04 +0100
> Luke Kenneth Casson Leighton <lkcl at lkcl.net> wrote:
>
> > > > > as best i can tell when i wrote the unit test for LDSTSplitter, the
> > > > > "logic" behind LDSTSplitter is correct, however the mask works on
> > > > > *bits* not bytes (sigh).
> > > That might be the reason why I get an error when running the unit tests:
> > > LenExpand 4 1 unsigned(16)
> > > LenExpand 4 1 unsigned(16)
>
> I found those two commits in the git history.

ok so the one you just changed, was this:

diff --git a/src/soc/scoreboard/addr_split.py b/src/soc/scoreboard/addr_split.py
index 0cd546ce..aa99f63c 100644
--- a/src/soc/scoreboard/addr_split.py
+++ b/src/soc/scoreboard/addr_split.py
@@ -100,7 +100,7 @@ class LDSTSplitter(Elaboratable):
         mzero = Const(0, mlen)
         m.submodules.ld1 = ld1 = LDLatch(self.dwidth, self.awidth-dlen, mlen)
         m.submodules.ld2 = ld2 = LDLatch(self.dwidth, self.awidth-dlen, mlen)
-        m.submodules.lenexp = lenexp = LenExpand(self.dlen, cover=8)
+        m.submodules.lenexp = lenexp = LenExpand(self.dlen)

and that got the unit test "working".... by *returning* LDSTSplitter
to do *bit* masking *not* byte masking.

this means that instead of having a 16 bit mask to cover 128 bits of
data,  a whopping *128* bit mask is needed and that's precisely what
we do not want.

l.



More information about the libre-riscv-dev mailing list