[libre-riscv-dev] daily kan-ban update 14may2020

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu May 14 23:52:31 BST 2020


On Thu, May 14, 2020 at 11:29 PM Cole Poirier <colepoirier at gmail.com> wrote:

> In that regard, Luke, after I am done with the scripts and the
> modifications to the docs on the wiki, is there some testing
> infrastructure that needs to be worked on, or should I try to start
> learning to make nmigen HDL contributions to the project?

that would be a really good challenge to try anyway.  apart from anything
you'd be able to read / recognise the code as it evolves.

> Essentially, what do you reccomend I do next that would be most helpful to the project?

i have nooo idea :)  oh wait - i have an idea.  could you raise a
bugreport "bperm TODO",
look at the pseudo-code here:
    perm <- [0] * 8
    for i = 0 to 7
       index <- (RS)[8*i:8*i+7]
       if index < 64 then
            perm[i] <- (RB)[index]
       else
            perm[i] <- 0
    RA <- [0]*56 || perm[0:7]

and see if you can write that in nmigen?  this is the simulation
version (translated
from the above pseudo-code), it may be easier to understand:

    @inject()
    def op_bpermd(self, RS, RB):
        perm = concat(0, repeat=8)
        for i in range(0, 7 + 1):
            index = RS[8 * i:8 * i + 7 + 1]
            if lt(index, 64):
                perm[i] = RB[index]
            else:
                perm[i] = 0
        RA = concat(concat(0, repeat=56), perm[0:8])

notes:

* repeat=8 you use Repl
* concat you use Cat
* index you will have to actually store that in a temporary Signal (8
bits in length)

l.



More information about the libre-riscv-dev mailing list