Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: [libre-riscv-dev] regfile-to-function-unit connection taking shape
Date: Wed, 3 Jun 2020 20:21:58 +0100
Message-ID: <CAPweEDw05YKts=gNTFKrdi86ek7PT8QXqfzHEHRACAniuTUZhg@mail.gmail.com> (raw)

i put together a "non-production core" which is starting to take shape:
the first priority being to get the register file ports connected.
this involves first enumerating them, and just thinking about the data
structures involved was hampering me from making progress.

i therefore decided a while ago to drop that (after first creating the
MultiCompUnit Record system, to make it easier to come back to), and
now, after testing each MCU and being happy that they can handle
and look after their respective pipelines, it's time to connect them
to actual regfiles.

this is being done here:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/simple/core.py;hb=HEAD

the output from that (which is for read ports only at the moment)
shows exactly what needs to be connected up.  the "lanes" designation
is purely arbitrary convenience, however the important thing is that
they are all the same "register".  lane 0 for INT is *always* RA.
lane 1 for the INT regfile is *always* RB, and so on.

the next stage will be to introduce a series of PriorityPickers,
which allow one and *only* one of the candidates (RA INT Lane 0)
access to that dedicate Regfile port.

this straight one-to-one relationship means that there is no need
for that cyclic buffer previously described.

also the plan is to very simply only allow one instruction to be
"active" at any one time (issue, wait for read, wait for busy,
wait for write, then back to issue).  this avoids the need for
any kind of Dependency Tracking, thus allowing us to actually have
"something working".

l.


-----

regfile read ports: INT
  regfile read port INT lane: 0
     alu0 ra 0:63 (<< (const 1'd1) (sig reg1)) (sig reg1_ok)
     <soc.fu.compunits.compunits.ALUFunctionUnit object at 0x7f6abac0ea58>

     cr0 ra 0:63 (<< (const 1'd1) (sig reg1)) (sig reg1_ok)
     <soc.fu.compunits.compunits.CRFunctionUnit object at 0x7f6abaa9a2b0>

     logical0 ra 0:63 (<< (const 1'd1) (sig reg1)) (sig reg1_ok)
     <soc.fu.compunits.compunits.LogicalFunctionUnit object at
0x7f6aba9984e0>

     shiftrot0 ra 0:63 (<< (const 1'd1) (sig reg1)) (sig reg1_ok)
     <soc.fu.compunits.compunits.ShiftRotFunctionUnit object at
0x7f6aba8c7ef0>

  regfile read port INT lane: 1
     alu0 rb 0:63 (<< (const 1'd1) (sig reg2)) (sig reg2_ok)
     <soc.fu.compunits.compunits.ALUFunctionUnit object at 0x7f6abac0ea58>

     cr0 rb 0:63 (<< (const 1'd1) (sig reg2)) (sig reg2_ok)
     <soc.fu.compunits.compunits.CRFunctionUnit object at 0x7f6abaa9a2b0>

     logical0 rb 0:63 (<< (const 1'd1) (sig reg2)) (sig reg2_ok)
     <soc.fu.compunits.compunits.LogicalFunctionUnit object at
0x7f6aba9984e0>

     shiftrot0 rb 0:63 (<< (const 1'd1) (sig reg2)) (sig reg2_ok)
     <soc.fu.compunits.compunits.ShiftRotFunctionUnit object at
0x7f6aba8c7ef0>

  regfile read port INT lane: 2
     shiftrot0 rc 0:63 (<< (const 1'd1) (sig reg3)) (sig reg3_ok)
     <soc.fu.compunits.compunits.ShiftRotFunctionUnit object at
0x7f6aba8c7ef0>

regfile read ports: XER
  regfile read port XER lane: 2
     alu0 xer_so 32 1 (& (slice (sig oe) 0:1) (sig oe_ok))
     <soc.fu.compunits.compunits.ALUFunctionUnit object at 0x7f6abac0ea58>

  regfile read port XER lane: 3
     alu0 xer_ca 34,45 2 (== (sig input_carry) (const 2'd2))
     <soc.fu.compunits.compunits.ALUFunctionUnit object at 0x7f6abac0ea58>

     shiftrot0 xer_ca 34,45 2 (== (sig input_carry) (const 2'd2))
     <soc.fu.compunits.compunits.ShiftRotFunctionUnit object at
0x7f6aba8c7ef0>

regfile read ports: CR
  regfile read port CR lane: 2
     cr0 full_cr 0:31 255 (sig read_cr_whole)
     <soc.fu.compunits.compunits.CRFunctionUnit object at 0x7f6abaa9a2b0>

     branch0 cr_a 0:3 (<< (const 1'd1) (sig cr_in1)) (sig cr_in1_ok)
     <soc.fu.compunits.compunits.BranchFunctionUnit object at
0x7f6abaa185c0>

  regfile read port CR lane: 3
     cr0 cr_a 0:3 (<< (const 1'd1) (sig cr_in1)) (sig cr_in1_ok)
     <soc.fu.compunits.compunits.CRFunctionUnit object at 0x7f6abaa9a2b0>

  regfile read port CR lane: 4
     cr0 cr_b 0:3 (<< (const 1'd1) (sig cr_in2)) (sig cr_in2_ok)
     <soc.fu.compunits.compunits.CRFunctionUnit object at 0x7f6abaa9a2b0>

  regfile read port CR lane: 5
     cr0 cr_c 0:3 (<< (const 1'd1) (sig cr_in2)) (sig cr_in2_ok)
     <soc.fu.compunits.compunits.CRFunctionUnit object at 0x7f6abaa9a2b0>

regfile read ports: FAST
  regfile read port FAST lane: 0
     branch0 spr1 0:63 (<< (const 1'd1) (sig fast1)) (sig fast1_ok)
     <soc.fu.compunits.compunits.BranchFunctionUnit object at
0x7f6abaa185c0>

  regfile read port FAST lane: 1
     branch0 spr2 0:63 (<< (const 1'd1) (sig fast2)) (sig fast2_ok)
     <soc.fu.compunits.compunits.BranchFunctionUnit object at
0x7f6abaa185c0>

  regfile read port FAST lane: 3
     branch0 cia 0:63 1 (const 1'd1)
     <soc.fu.compunits.compunits.BranchFunctionUnit object at
0x7f6abaa185c0>
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPweEDw05YKts=gNTFKrdi86ek7PT8QXqfzHEHRACAniuTUZhg@mail.gmail.com' \
    --to=lkcl@lkcl.net \
    --cc=libre-riscv-dev@lists.libre-riscv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git