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: Re: [libre-riscv-dev] cache SRAM organisation
Date: Fri, 27 Mar 2020 09:44:30 +0000
Message-ID: <CAPweEDwf7s=r6bhq6N=VG7QQ1iD4jHYEG6mGvtxL32Uxnhzqwg@mail.gmail.com> (raw)
In-Reply-To: <6fbfb2a3258be77f4fce69661b283dc31a683f7b.camel@fibraservi.eu>

On Fri, Mar 27, 2020 at 9:25 AM Staf Verhaegen <staf@fibraservi.eu> wrote:

> My point is that you will have the same performance for the fixed 5-stage pipeline running @ 800MHz

no, it won't: it'll be half the clock speed.  it won't be double the
number of computations: it'll be the exact same number of
computations.  therefore, half the speed means half the number of
computations because the *throughput* is the same

when you use "cpufreq-set" to change the clock rate, if the clock rate
is halved, the computer is twice as slow.

yes it's confusing :)

you may be thinking that the pipeline is split into *two halves*, each
half processing separate computations.  this is not the case.


> as for the 10-stage pipeline running @ 1600MHz. Why do want to run @1600MHz ?

because you get double the performance by doing so (with increase in
power consumption of course).

when bypass latches are closed:

* maximum speed: 800 mhz
* stages: 5
* latency (completion time): 1.25e-9 times 5 = 6.25e-9
* throughput: 800 MOPS

when bypass latches are open:

* maximum speed: 1600 mhz (double - appx)
* stages: 10 (double)
* latency (completion time): 6.25e-10 times *10* = 6.25e-9 *EXACTLY THE SAME*
* throughput: 1600 MOPS *DOUBLE THE MOPS*

when bypass latches are open and we run at 800mhz:

* actual speed: 800 mhz
* stages: 10 (double)
* latency (completion time): 1.25e-9 times *10* = 1.25e-8 *HALF THE LATENCY*
* throughput: 800 MOPS *SAME*

so this should show why we want to do this: you get better latency,
which in turn means that there is less pressure on us to have massive
number of Function Units (particularly Branch Prediction Units), to
compensate for huge pipeline lengths.


> Actually the fixed 5-stage 800MHz capable pipeline will not be able to
> run @1600MHz when converted to configurable 5/10-stage pipeline
> due to the additional delay from the MUXes inserted in the path
> plus the fact that you likely can't split up each stage in two stages with
> each exact the half of the delay.

yes, very much agreed.  we will need to do some careful analysis (when
there is time!  this is very much for "revision 2") right down at the
gate level.

also, it may turn out that we simply can't run certain stages at that
kind of speed, or other factors which we haven't anticipated.

in the meantime, however, things like the MUL code (which is based on
a Wallace Multiplier and needs converting to Dadda) have been
*specifically* designed as easy-to-connect combinatorial blocks, with
the "joining" part done as nmigen OO classes that can be *dynamically
replaced* by us, as programmers.

and we are currently using that flexibility to combine *multiple
combinatorial blocks* in a chain... *and* to combine those further
blocks into pipeline-latched blocks.

so if we find that one particular combinatorial chain is too long to
fit into a single 1600mhz pipeline phase, then "oh dear, whoops", all
we do is, find that code, tweak a couple of parameters in a few files,
and the combinatorial chain is now split into additional pipeline
stages.

not, "argh we have a massive redesign to do".


it's a new idea: we just have to experiment, see what happens.
honestly, if we hit even 1200mhz for a first ASIC (in 45 or 28 nm)
that would be absolutely fantastic.

l.

_______________________________________________
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: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 22:32 Luke Kenneth Casson Leighton
2020-03-25 10:54 ` Staf Verhaegen
2020-03-25 12:33   ` Luke Kenneth Casson Leighton
2020-03-25 13:46     ` Staf Verhaegen
2020-03-25 15:53       ` Luke Kenneth Casson Leighton
2020-03-25 17:49         ` Jacob Lifshay
2020-03-26 12:18         ` Staf Verhaegen
2020-03-26 12:31           ` Staf Verhaegen
2020-03-26 15:15             ` Luke Kenneth Casson Leighton
2020-03-26 15:15           ` Luke Kenneth Casson Leighton
2020-03-26 20:08             ` Staf Verhaegen
2020-03-26 21:28               ` Luke Kenneth Casson Leighton
2020-03-27  9:08                 ` Staf Verhaegen
2020-03-27  9:16                   ` Luke Kenneth Casson Leighton
2020-03-27  9:40                     ` Staf Verhaegen
2020-03-27  9:46                       ` Luke Kenneth Casson Leighton
2020-03-27  9:52                         ` Luke Kenneth Casson Leighton
2020-03-26 12:27         ` Staf Verhaegen
2020-03-26 13:05           ` Luke Kenneth Casson Leighton
2020-03-26 20:18             ` Staf Verhaegen
2020-03-26 21:37               ` Luke Kenneth Casson Leighton
2020-03-27  9:25                 ` Staf Verhaegen
2020-03-27  9:44                   ` Luke Kenneth Casson Leighton [this message]
2020-03-27 10:03                     ` Lauri Kasanen
2020-03-27 10:10                       ` Luke Kenneth Casson Leighton
2020-03-27 10:36                     ` Staf Verhaegen
2020-03-27 10:59                       ` Luke Kenneth Casson Leighton
2020-03-28 14:08                         ` [libre-riscv-dev] Clock Gating (was cache SRAM organisation) Staf Verhaegen
2020-03-28 14:26                           ` Luke Kenneth Casson Leighton

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='CAPweEDwf7s=r6bhq6N=VG7QQ1iD4jHYEG6mGvtxL32Uxnhzqwg@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