Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: bugzilla-daemon@libre-soc.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 351] create a "block" (mass) regfile port (read and write) onto an array-based regfile
Date: Mon, 25 May 2020 23:55:07 +0000
Message-ID: <bug-351-13-JxMBcNw4sX@https.bugs.libre-soc.org/> (raw)
In-Reply-To: <bug-351-13@https.bugs.libre-soc.org/>

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

--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ok so first derive from RegFileArray.

use the two parameters as follows:

* bitwidth: the TOTAL number of bits
* n_regs: the number of subdivisions of those bits.

therefore RegfileArray n_regs = nregs

however RegfileArray regwidth is bitwidth DIVIDED by n_regs.

then, in the constructor, add n_regs read ports and n_regs write ports to a
pair of lists.

you can see this being done in soc.regfile.regfiles here

https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/regfile/regfiles.py;h=d6f3a8dd79930d1286c72a42328363d9b9b8e9f3;hb=HEAD#l42

except, that should be a for loop


next, we want an EXTRA read port and an extra write port.

this should, for data, instead of being only bitwidth/nregs wide, should
instead be the FULL bitwidth wide. 

however the enable lines should be nregs wide.

39         port = RecordObject([("ren", nregs),
  40                              ("data_o", bitwidth)],
  41                             name=name)

like that.


then, in the elaborate:

* if any of the "extra" port ren bits are set, the data is sent through the
corresponding *lower* indexed ports.

you see how that works?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
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: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 14:07 [libre-riscv-dev] [Bug 351] New: " bugzilla-daemon
2020-05-25 23:55 ` bugzilla-daemon [this message]
2020-05-26  1:18 ` [libre-riscv-dev] [Bug 351] " bugzilla-daemon
2020-05-26  1:34 ` bugzilla-daemon
2020-05-26  1:45 ` bugzilla-daemon
2020-05-26  2:03 ` bugzilla-daemon
2020-05-26  2:08 ` bugzilla-daemon
2020-05-26  2:09 ` bugzilla-daemon
2020-05-26  4:07 ` bugzilla-daemon
2020-05-26 12:54 ` bugzilla-daemon
2020-05-26 16:01 ` bugzilla-daemon
2020-05-26 16:41 ` bugzilla-daemon
2020-05-26 22:20 ` bugzilla-daemon
2020-05-26 23:17 ` bugzilla-daemon
2020-05-26 23:20 ` bugzilla-daemon

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=bug-351-13-JxMBcNw4sX@https.bugs.libre-soc.org/ \
    --to=bugzilla-daemon@libre-soc.org \
    --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