[Libre-soc-bugs] [Bug 671] convert spec pseudocode to use XLEN width

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Aug 30 13:22:36 BST 2021


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

--- Comment #37 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
reviewing this one:

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=6bc1419dbcd0ee84cd28c8867eaf7dae7954c4e5

-    n <- 32
-    do while n < 64
+    n <- (XLEN/2)
+    do while n < XLEN
        if (RS)[n] = 1 then
            leave
        n <- n + 1
-    RA <- n - 32
+    RA <- n - (XLEN/2)

 258 Pseudo-code:
 259 
 260     n <- (XLEN/2)
 261     do while n < XLEN
 262        if (RS)[n] = 1 then
 263            leave
 264        n <- n + 1
 265     RA <- n - (XLEN/2)
 266 

i *think* that's ok.  the concept of a "word" is effectively
redefined to "half-of-the-XLEN-width" which is something that's
being done for FP "single" numbers.

(any operation fmuls for example we are DEFINING as
"actually the "s" means "do the FP op at half of the elwidth"")

it does however get very weird for 8-bit.  plus, we need to
actually add *full* width cntlzd

noted in bug #678

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


More information about the libre-soc-bugs mailing list