[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 14:09:31 BST 2021


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

--- Comment #40 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=ff49e2ca41d621532795f960c715d7b7e9c5379c

 332 * popcntw RA, RS
 333 
 334 Pseudo-code:
 335 
 336     do i = 0 to ((XLEN/32)-1)
 337        n <-  0
 338        do j = 0 to 31
 339           if (RS)[(i*32)+j] = 1 then
 340               n <- n+1
 341        RA[(i*32):(i*32)+31] <- n

this one doesn't look right.  my intuition is that it should be
redefined to be "counting halves of the input".

more like:

 336     do i = 0 to 1
 337        n <-  0
 338        do j = 0 to (XLEN/2)-1
 339           if (RS)[(i*(XLEN/2))+j] = 1 then

down at elwidth=8 it gets particularly hairy / interesting because
the counting (both of the src RS into RA) would go into nibbles.
but, actually, i think even that would work.

not cherry-picking this one over.

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


More information about the libre-soc-bugs mailing list