[Libre-soc-bugs] [Bug 1163] New: add unit tests for PowerDecoder2 that check that it decodes all the stuff the same way insndb encodes it

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Sep 18 20:52:35 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1163

            Bug ID: 1163
           Summary: add unit tests for PowerDecoder2 that check that it
                    decodes all the stuff the same way insndb encodes it
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: programmerjake at gmail.com
          Reporter: programmerjake at gmail.com
                CC: libre-soc-bugs at lists.libre-soc.org, lkcl at lkcl.net,
                    programmerjake at gmail.com
   NLnet milestone: ---

https://lists.libre-soc.org/pipermail/libre-soc-dev/2023-September/005647.html

>> maybe we should add a test that just creates a PowerDecoder2 by itself
>> and just attempts to decode insns assembled by insndb? that way we can
>> test decoding CR fields above 8 without needing to modify the whole
>> simulator.
>
> it's a really great idea that is much more complex than that:
> PowerDecoder2 is augmented by SVP64DecodeExtra (something
> like that), you'll have to dig into the source code of
> TestIssuer to find the way the mappings actually work
> and are stitched together.

my plan is basically to copy caller.py and just keep removing stuff until we're
left with only the decode stuff, I expect that won't be as hard as trying to
find all the right PowerDecoder2-related classes and mushing them together...

>
> basically the prefix goes into one HDL-class-instance
> (SVP64RMDecode i think),
> the suffix into PowerDecoder-with-Regfield-filters which
> then gathers information to provide to PowerDecoder2,
> *and* then the SVP64 RM-Decode "EXTRA" information, which
> can only be decoded when the PowerDecoder tells you
> the SVP64 Mode Type (NORMAL, CROPS, BRANCH, LDSTIMM, LDSTIDX),
> can finally be *also* pushed into PowerDecoder2 and
> *only then* can you get the full 7-bit register numbers out.
> 
> it is... seriously involved and extracting it into a single
> "easy to test" unit would indeed be a quite important
> (and quite big) task all on its own.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list