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 336] ALU CompUnit needs to recognise that RA (src1) can be zero
Date: Sun, 14 Jun 2020 23:42:40 +0000
Message-ID: <bug-336-13-r3tHX3jbhI@https.bugs.libre-soc.org/> (raw)
In-Reply-To: <bug-336-13@https.bugs.libre-soc.org/>

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

--- Comment #60 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cesar Strauss from comment #59)
> Created attachment 64 [details]
> Suggested pipeline design for the ALU Comp Unit
> 
> (In reply to Luke Kenneth Casson Leighton from comment #58)
> > (In reply to Cesar Strauss from comment #57)
> > > I don't really recall being much afflicted by this sort of issue. But then,
> > > I normally try to avoid using latches as much as possible, this may be the
> > > reason.
> > 
> > yyeah they're not a "normal" way to do FSMs.  however with some aspects being
> > combinatorial and some being sync, we can't use "standard" techniques.
> 
> Did you consider implementing the ALU CompUnit as a pipeline?

you mean, MultiCompUnit itself?  if so: this would violate the mission-critical
protocol, the purpose for which MultiCompUnit exists.

MultiCompUnit *must not* abandon its data.  its absolutely must track the
operands from start to finish.

we call this a "Phase-aware Function Unit".  "phase-aware" because it
absolutely
has to keep track of the start time and completion time.
failure to do so would be absolutely disastrous.

a pipeline *abandons* its data.  it says "here, you deal with it, i'm
abdicating
all responsibility for data-tracking".  i.e. once the data is in the pipeline,
there is *no hardware* in the actual pipeline itself which tracks or handles
responsibility for tracking the completion of that result.

this was the subject of a rather excruciating discussion on comp.arch: it
became
clear that there simply does not exist an Industry-standard or Computer Science
term that covers "Function Units which track data from operand to result".

one had to be invented, and the best that could be thought of was "Phase-aware
Function Unit"

for an out-of-order system, it is absolutely imperative that we have
Phase-aware Function Units, and that "management" task is what MultiCompUnit
is for.

a pipeline *cannot* fulfil that role.  by definition and by design.

however.... MultiCompUnit can *MANAGE* pipelines... by using the ready/valid
protocol.

and if we have multiple MultiCompUnit front-ends onto a single pipeline,
*now* we have Reservation Stations.

and that's what the ReservationStations class is for:
https://git.libre-soc.org/?p=nmutil.git;a=blob;f=src/nmutil/concurrentunit.py;hb=HEAD#l40


> I can give it a try, in parallel with other tasks. It would be a nice way to
> learn more about the pipeline API.

actually we do need a ReservationStation version of a MultiCompUnit unit test.
a 2 or 3 stage "real" but dummy pipeline (simply passing its input through to
its output, maybe doing +1 on each stage or something, or, heck, doing ADD
would be perfectly on)

then there would be 4 to 5 MultiCompUnits wired up to a ReservationStation
version
of that pipeline (see nmutil multipipe.py)

the unit test would then be an adaptation of the test_inout_mux_pipe.py test,
throwing multiple inputs in and seeing if they come out successfully at the
end.

https://git.libre-soc.org/?p=nmutil.git;a=blob;f=src/nmutil/test/test_inout_mux_pipe.py;hb=HEAD

there's some other code i can refer you to, if you're interested
(and we should raise a new bugreport for it)

-- 
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

      parent reply index

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 16:24 [libre-riscv-dev] [Bug 336] New: add indicator to Decode2ExecuteType that RA is zero bugzilla-daemon
2020-05-21 16:35 ` [libre-riscv-dev] [Bug 336] ALU CompUnit needs to recognise that RA (src1) can be zero bugzilla-daemon
2020-05-21 16:36 ` bugzilla-daemon
2020-05-21 21:12 ` bugzilla-daemon
2020-05-21 21:41 ` bugzilla-daemon
2020-05-22  1:11 ` bugzilla-daemon
2020-05-23 12:51 ` bugzilla-daemon
2020-05-23 13:07 ` bugzilla-daemon
2020-05-23 19:09 ` bugzilla-daemon
2020-05-23 19:16 ` bugzilla-daemon
2020-05-23 19:39 ` bugzilla-daemon
2020-05-23 20:52 ` bugzilla-daemon
2020-05-23 22:52 ` bugzilla-daemon
2020-05-23 23:10 ` bugzilla-daemon
2020-05-24  1:46 ` bugzilla-daemon
2020-05-24  3:33 ` bugzilla-daemon
2020-05-24 13:46 ` bugzilla-daemon
2020-05-24 14:00 ` bugzilla-daemon
2020-05-24 14:37 ` bugzilla-daemon
2020-05-24 14:44 ` bugzilla-daemon
2020-05-24 15:07 ` bugzilla-daemon
2020-05-24 20:01 ` bugzilla-daemon
2020-05-24 20:29 ` bugzilla-daemon
2020-05-24 20:41 ` bugzilla-daemon
2020-05-25  0:14 ` bugzilla-daemon
2020-05-25  0:56 ` bugzilla-daemon
2020-05-25  1:19 ` bugzilla-daemon
2020-05-25  1:27 ` bugzilla-daemon
2020-05-25  1:31 ` bugzilla-daemon
2020-05-25  2:21 ` bugzilla-daemon
2020-05-25  2:29 ` bugzilla-daemon
2020-05-25  4:05 ` bugzilla-daemon
2020-05-25  7:28 ` bugzilla-daemon
2020-05-25  9:42 ` bugzilla-daemon
2020-05-25 10:43 ` bugzilla-daemon
2020-05-25 15:14 ` bugzilla-daemon
2020-05-25 15:25 ` bugzilla-daemon
2020-05-25 15:32 ` bugzilla-daemon
2020-05-25 23:06 ` bugzilla-daemon
2020-05-25 23:41 ` bugzilla-daemon
2020-05-26 10:01 ` bugzilla-daemon
2020-05-26 10:15 ` bugzilla-daemon
2020-05-26 16:29 ` bugzilla-daemon
2020-05-26 17:22 ` bugzilla-daemon
2020-05-28 10:44 ` bugzilla-daemon
2020-05-31 16:42 ` bugzilla-daemon
2020-06-01 11:09 ` bugzilla-daemon
2020-06-01 11:46 ` bugzilla-daemon
2020-06-01 11:55 ` bugzilla-daemon
2020-06-01 12:01 ` bugzilla-daemon
2020-06-01 12:02 ` bugzilla-daemon
2020-06-01 21:50 ` bugzilla-daemon
2020-06-01 22:04 ` bugzilla-daemon
2020-06-02 23:06 ` bugzilla-daemon
2020-06-06 20:33 ` bugzilla-daemon
2020-06-06 20:53 ` bugzilla-daemon
2020-06-06 21:20 ` bugzilla-daemon
2020-06-06 22:38 ` bugzilla-daemon
2020-06-07 20:35 ` bugzilla-daemon
2020-06-07 22:55 ` bugzilla-daemon
2020-06-08  1:20 ` bugzilla-daemon
2020-06-08  1:28 ` bugzilla-daemon
2020-06-09 12:36 ` bugzilla-daemon
2020-06-09 12:43 ` bugzilla-daemon
2020-06-14 23:21 ` bugzilla-daemon
2020-06-14 23:42 ` bugzilla-daemon [this message]

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-336-13-r3tHX3jbhI@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