Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: bugzilla-daemon@libre-riscv.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 276] SR NAND Latch needed in nmigen
Date: Fri, 03 Apr 2020 11:00:13 +0000
Message-ID: <bug-276-13-e9BbWsSrHS@http.bugs.libre-riscv.org/> (raw)
In-Reply-To: <bug-276-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=276

whitequark@whitequark.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |whitequark@whitequark.org

--- Comment #1 from whitequark@whitequark.org ---
(The following comment is copied from the email I sent earlier, so that it is
accessible publicly.)

Of the things you mentioned, this includes only the SR latch issue.

This issue is unfortunately quite involved. (n)Migen is designed to
connect large islands of purely synchronous logic with a few async
bridges. It does not, very deliberately, directly support arbitrary
asynchronous primitives like the SR latch. So you can't just drop one
into your design and have it work the same way normal logic works.
However, you're in luck because better support for asynchronous
signals was something I took into account when designing nMigen and
both of the new simulators, pysim and cxxsim.

To solve this issue, we'll need to work together to determine your
specific use case. Do you want to use the exact same netlist for
nMigen simulation and synthesis? If not, it means you can model
whatever it is that contains the SR latches (I'm not sure what
matrices you're referring to, here) using synchronous code, and
replace them with true SR latches for synthesis. Of course, you will
need to convince yourself these two designs are equivalent.

If you *do* want to use the exact same netlist, there are a few
options. Both the new nMigen simulator and cxxrtl use an architecture
that, in principle, supports logic feedback loops. So you can model
the SR latch using two ordinary NAND gates. If you have an instance
of a SRNAND cell, you can provide a simulation model for this instance
that uses two NAND gates, and it'll work. However, I must warn you
that both for nMigen pysim and cxxrtl, this will come with a severe
performance penalty of at least ~10x, possibly worse depending on your
exact design. If you are planning to use fine SRNAND cells (one per
bit rather than one per word), expect a further slowdown of the word
size factor. Another issue is that neither pysim nor cxxsim provide
any way to control the possible race conditions. That is, the SRNAND
latch that is simulated in pysim or cxxsim will initialize to
an indeterminate value, and chaining them together will lead to
unpredictable results.

-- 
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: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 10:00 [libre-riscv-dev] [Bug 276] New: SR NAND Latch needed in nmigrn bugzilla-daemon
2020-04-03 11:00 ` bugzilla-daemon [this message]
2020-04-03 12:05 ` [libre-riscv-dev] [Bug 276] SR NAND Latch needed in nmigen bugzilla-daemon
2020-04-03 12:11 ` bugzilla-daemon
2020-04-03 12:52 ` bugzilla-daemon
2020-04-03 13:24 ` bugzilla-daemon
2020-04-03 13:42 ` bugzilla-daemon
2020-04-03 13:58 ` bugzilla-daemon
2020-04-03 14:02 ` bugzilla-daemon
2020-04-03 18:51 ` bugzilla-daemon
2020-04-03 19:21 ` bugzilla-daemon
2020-04-04  8:15 ` bugzilla-daemon
2020-04-04 11:05 ` bugzilla-daemon
2020-04-04 11:10 ` bugzilla-daemon
2020-04-04 11:15 ` bugzilla-daemon
     [not found] <bug-276-13@https.bugs.libre-soc.org/>
2020-04-10 15:04 ` bugzilla-daemon
2020-04-10 16:16 ` bugzilla-daemon
2020-04-10 17:27 ` 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-276-13-e9BbWsSrHS@http.bugs.libre-riscv.org/ \
    --to=bugzilla-daemon@libre-riscv.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