Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 20:39 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #12 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
likewise we need LR at the same time.  yeah, i know.  it's a hell of a lot of
incoming wires and registers.

* LR 64-bit
* CIA 64-bit (48 probably more like?)
* CTR 64-bit
* TAR 64-bit
* CR 32-bit
* CompBROpSubset a *lot*.  around 64 bits due to the expanded decoding.

we just have to tolerate that, and have a *five* input Branch Computation Unit.

which has me slightly concerned for adding TRAP to the same pipeline, because
that brings in *another* 128 bits (!!) - RA 64-bit, RB 64-bit, plus it modifies
the CR so that's another 32 bits on the output side as well.  blegh.  can't do
that.
new bugreport, there.

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 20:31 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #11 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #10)

> I removed the TAR input, because the branch instruction would need to decide
> which of the 3 inputs to branch to. Instead, it should be fed that operand
> in the spr input (though that does mean it will be fed ctr twice for
> bcctr...). Does that seem reasonable?

nggghhh.  *thinks*, *thinks*....

ok, the way that the Function Units work is: well, let me find a diagram..
https://libre-soc.org/3d_gpu/comp_unit_req_rel.jpg

although that's an ALU FU, in the case of a *branch* FU, those inputs would
be:

* CTR
* CIA
* CR
* TAR

basically, those latches at the top "accumulate" all of the inputs needed
(some of which as you can see actually come from the operand - this is
CompBROpSubset)

anything that needs to be read from a regfile - whether it be the SPR one,
the Condition Regfile or the INT Regfile - all needs to have those pairs
of REQUEST/GO_READ signals.

* the outgoing one *requests* the register (actually the regfile port)
* the incoming one (GO_READ) demands that the FU latch the incoming register
  data, right now.  it will not get another chance.

so the idea of doing time-synchronous feeding of the input data (sharing one
of the register inputs for two registers, one after the other) is massively
more complicated than simply storing the data in (multiple) Function Unit
latches.

now, *at the regfile* there may only be one available Reg Port Bus.

therefore *over the (one) Reg Port Bus*, it may take two clock cycles:
* one to read CTR
* one to read TAR

and this can be done in any order: CTR first, TAR first, or if 2 Reg Port
Buses happen to be available, *both* simultaneously.

however that task is handled at the CompUnit (like in the diagram above),
precisely so that the pipelines *do not* have to have such complexity.

therefore, really, if the branch op needs 2 regs (one CTR, one TAR), then the
BranchCompUnit will need 2 latches to cover them, and consequently
BranchInputData
needs to have both ctr and tar.

let's have a look at what was generated by the parser.  all the others are
subsets (less regs) than this one:

    @inject()
    def op_bctarl(self, CTR, CR, TAR, LR):
        global NIA
        if mode_is_64bit:
            M = 0
        else:
            M = 32
        if ~BO[2]:
            CTR = CTR - 1
        ctr_ok = BO[2] | ne(CTR[M:64], 0) ^ BO[3]
        cond_ok = BO[0] | ~(CR[BI + 32] ^ BO[1])
        if ctr_ok & cond_ok:
            NIA = concat(TAR[0:62], SelectableInt(value=0x0, bits=2))
        if LK:
            LR = CIA + 4
        return (CTR, CR, TAR, LR,)

that's interesting.  TAR is returned but i do not see it being modified.
that's a bug.

NIA however is calculated but is not returned *from* the... oh wait, yes
i see, it's a global.  ok.  got it.

so, yes, apologies, we can't use spr for dual-purpose, we need 2 regs,
and they might as well be named ctr and tar, rather than spr.

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

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Luke Kenneth Casson Leighton @ 2020-05-15 20:11 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <4BDA96A5-9063-42A6-9548-CAE3CBEBEBAC@gatech.edu>

hi jeremy, welcome.

here you may have noticed, there are two chips: the 180nm test ASIC
which we have a tight deadline to meet, mid-august we need to freeze
the design and immediately move to doing layout using Coriolis2.  this
one we are extremely unlikely to even have FP operations.

beyond that we have a second ASIC to do, the quad-core SMP 800mhz
dual-issue.  that's where you saw the numbers for.

On Fri, May 15, 2020 at 8:33 PM Yehowshua <yimmanuel3@gatech.edu> wrote:

> I know we initially were targeting 5GFLOPS for the GPU on the first tapeout.

this was to be 5-6 GMACs capability for the quad-core SMP 800mhz
dual-issue (second target).  however... *sheepish*... we kinda
drastically overshot that on the internal architecture :)  it was to
be 5-6 GMACS which is of course 10-12 GFLOPS (FP MUL and FP ADD in
FPMAC counting as 2).

also each core - all four of them - is architected to handle a minimum
128-bit-wide LOAD/STORE data path (4x FP32), and there will be 4x FP32
- FMACs - per clock cycle, because they will be issued as 2x 64-bit
operations (2x 32-bit FPs in each 64-bit) and it is dual issue.

800mhz x 2 issue x 2-32 per 64-bit x 4 = 12.8 GMACs which x2 because
FPMUL and FPADD is 2 ops = 25.6 GFLOPs.

a teeny tiny bit over what we initially planned, then :)

> Basically, the way we’re doing the GPU is the add a vector FPU along with
> accompanying instructions into the actual CPU.

by overloading "multi-issue".  a hardware for-loop at the instruction
execution phase will push multiple sequential instructions into the
OoO engine from a *single* instruction.

> We would then just write the drivers that translate various shaders and drawing
> commands into vector instructions which can be scheduled on the scoreboard.

rather than having a ridiculous "Remote Procedure Call" system that
packs up Vulkan / OpenGL commands into a serial marshalled data stream
from the application, communicated to the kernel, shipped over PCIe or
other memory bus architecture, unpacked at the GPU, turned into
instructions, executed, and the results shipped *back* the other way

total insanity.

> Realistically, for our first tapeout(we’re using Google’s shuttle service on 1800nm TSMC),
> we’d do a CPU with no vector instructions(effectively no GPU) for October.

straight POWER9 however still OoO

> Since we’re doing FOSS down to the VLSI design cells(we’re using Time Ansell’s OpenPDK as an intermediate), we need somebody to do a PLL.

a Professor from LIP6 has offered to do that.  i introduced you to him
and Tim, yehowshua.

> With a FOSS PLL in place, we can get 300MHZ on the first tapeout. We’re doing a single core for the
> first tape out, with 6 stages I think…

the DIV pipeline will be... 8 (maybe more), MUL will be 2, ADD (etc.) will be 1.

* fetch: 1.
* decode: 1.
* issue and reg-read: 1 (minimum).
* execute: between 1 and 8 (maybe more)
* write: 1 (minimum)

POWER9 has update mode for LD/ST so those would take 1 extra.  some
ALU operations need to write to the Condition Register, that's another
extra 1 write (possibly).

etc.

basically this is why we're doing OoO because coordinating all that in
an in-order system would be absolute hell.

> With no PLL, I think we’re limited to 25-50MHz.

Staf mentioned that there's no reason why we should not attempt to
drive the external CLK line at 100mhz.  it could potentially radiate
EM like stink, however it might work.  we'll see :)

> Some simple math could give a DMIPS estimate.

it's down ultimately to how wide the register paths are, between the
Regfile and the Function Units.  if we have multiple Register Data
Buses, and can implement the multi-issue part in time, it'll be coded
in a general-purpose enough way that we could consider 4-issue.
however... without the register data paths, there's no point.

it comes down to how much time we have.

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 20:11 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #10 from Michael Nolan <mtnolan2640@gmail.com> ---
diff --git a/src/soc/branch/pipe_data.py b/src/soc/branch/pipe_data.py
index cab43cf..6d97102 100644
--- a/src/soc/branch/pipe_data.py
+++ b/src/soc/branch/pipe_data.py
@@ -22,10 +22,11 @@ class BranchInputData(IntegerData):
         # We need both lr and spr for bclr and bcctrl. Bclr can read
         # from both ctr and lr, and bcctrl can write to both ctr and
         # lr.
<snip>
+        self.tar = Signal(64, reset_less=True) # Target Address Register


I removed the TAR input, because the branch instruction would need to decide
which of the 3 inputs to branch to. Instead, it should be fed that operand in
the spr input (though that does mean it will be fed ctr twice for bcctr...).
Does that seem reasonable?

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 19:36 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #9 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
argh.

comb += branch.p.data_i.ctx.op.eq_from_execute1(pdecode2.e)

nope.  cia can't be part of BranchCompALUSubset - that's not its role,
the ctx.op only stores information decoded from the actual instruction.
will revert shortly.

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

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Yehowshua @ 2020-05-15 19:33 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAEoCstRUXkB_LxXXubx4A0dhLGvFqq6EPL+GzukDQORpHopaiw@mail.gmail.com>



> On May 15, 2020, at 3:15 PM, Jeremy Singher <thejsingher@gmail.com> wrote:
> 
> Are you targeting IPC as the performance metric? Or IPC x Freq?
> The Pi 1 Rev B seems to be a 1-wide in-order design, so it should be a
> pretty conservative target to hit.
> Any basic OOO core should beat the PI B in IPC, it only needs to run
> at an equivalent frequency.
> 
> Do you know what the final performance target is? (Or minimal target
> for a commercially viable product?)
> The Cortex A72 is a 3-w OOO that might be a good point to target (it's
> also used the latest Pi 4s).
> 
> From running a couple experiments on other open-OOO cores, it seems
> like 3-ish DMIPs/MHz is a good
> target for a OOO core.

I know we initially were targeting 5GFLOPS for the GPU on the first tapeout.

Basically, the way we’re doing the GPU is the add a vector FPU along with
accompanying instructions into the actual CPU.

We would then just write the drivers that translate various shaders and drawing
commands into vector instructions which can be scheduled on the scoreboard.

Realistically, for our first tapeout(we’re using Google’s shuttle service on 1800nm TSMC),
we’d do a CPU with no vector instructions(effectively no GPU) for October.

Since we’re doing FOSS down to the VLSI design cells(we’re using Time Ansell’s OpenPDK as an intermediate), we need somebody to do a PLL.

With a FOSS PLL in place, we can get 300MHZ on the first tapeout. We’re doing a single core for the 
first tape out, with 6 stages I think…

With no PLL, I think we’re limited to 25-50MHz.

Some simple math could give a DMIPS estimate.

Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 19:33 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #8 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #6)
> (In reply to Luke Kenneth Casson Leighton from comment #5)
> > oink.  you *removed* NIA :)  well... we will probably need CompBROpSubset
> > anyway.
> 
> Yep, since nothing but the branch unit used it

good call.

> > hum hum, don't know.  oh.  right.  NIA is *next* instruction address, not an
> > input.
> > ok so i think we need something called "cia" - current instruction address -
> > in
> > CompBROpSubset.
> 
> I added CIA to the branch unit's input data because it wasn't one of the
> things output by the decoder (well NIA is, but it's defaulted to 0),

as it's an output - and the CompBROpSubset is intended as as *input* to
the pipeline - yes NIA definitely goes.

> and I needed to set it from the testbench.

yehyeh.

we need cia however.  hmm hmm... it's not a "register" - there's no delay
in fetching it: the branch unit will receive the current PC right there,
because that (like the insn) is "known information".

yep, it needs to be added to CompBROpSubset.  will do that now...

commit 4e88a5d7027d5c60093925d38da9b1e63b77f743 (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Fri May 15 20:33:15 2020 +0100

    add cia to CompBROpSubset, remove data_len

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 19:28 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #7 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ok am done.  btw comb Signals default to zero if not set... actually they
default to the value in their initialisation - Signal(len, reset=0x5000) -
so do not need to be initialised to zero.

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

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Yehowshua @ 2020-05-15 19:24 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAEoCstRUXkB_LxXXubx4A0dhLGvFqq6EPL+GzukDQORpHopaiw@mail.gmail.com>



> On May 15, 2020, at 3:15 PM, Jeremy Singher <thejsingher@gmail.com <mailto:thejsingher@gmail.com>> wrote:
> 
> Lastly, have you guys talked to the university efforts to build
> open-source cores? I see links to the
> Shakti project on the site. Is this a collaboration with them? I
> thought they were doing RISC-V?
> There's also groups at ETH, Berkeley, and MIT pushing out their own
> application-class cores. How does
> this design compare to those?

This will be a full SOC with a GPU that supports Vulkan and eventually OpenGL and OpenCL.
AFAIK, there are no other full out GPU projects.

Yes - there has been some discussion with Shakti on Luke’s end and Shakti is informally aware of Libre-SOC.
I’m not sure as to the Curren’t state of Shakti - I think the project went quit e almost a year ago.

We had some unfortunate run-ins with Berkeley and RISCV - and we decided to go with POWER because we have access to some important relations at IBM

Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Yehowshua @ 2020-05-15 19:20 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAEoCstRUXkB_LxXXubx4A0dhLGvFqq6EPL+GzukDQORpHopaiw@mail.gmail.com>



> On May 15, 2020, at 3:15 PM, Jeremy Singher <thejsingher@gmail.com> wrote:
> 
> Part of the reason I'm asking so many questions (beyond my own
> curiosity) is that I will likely be
> a TA for a computer-architecture course in the near future, and I
> would like to revamp the course by
> having students interact with real RTL for a complex SoC, instead of
> just simulators.

NO WAYY!!

So how I actually got involved in Libre-SOC was that I was trying to start a open cores effort in Georgia Tech’s ECE department.

A couple GT VC alum’s prodded me into the direction of starting a company with Libre-SOC.

Also, my ECE department hired me to revamp the computer architecture course because I complained about it so much.

So I decided to make a website for the future course here: https://comparch-resources.ece.gatech.edu <https://comparch-resources.ece.gatech.edu/>
We’re beta testing the course with students remotely this summer. I decided to have them use nMigen.

You can see how to install yosys correctly here: https://comparch-resources.ece.gatech.edu/resources/nmigen/nmigen/ <https://comparch-resources.ece.gatech.edu/resources/nmigen/nmigen/>


I’m a grad student about to graduate end of summer at GT.

Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 19:17 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #6 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> oink.  you *removed* NIA :)  well... we will probably need CompBROpSubset
> anyway.

Yep, since nothing but the branch unit used it

> hum hum, don't know.  oh.  right.  NIA is *next* instruction address, not an
> input.
> ok so i think we need something called "cia" - current instruction address -
> in
> CompBROpSubset.

I added CIA to the branch unit's input data because it wasn't one of the things
output by the decoder (well NIA is, but it's defaulted to 0), and I needed to
set it from the testbench.

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

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Jeremy Singher @ 2020-05-15 19:15 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <747F8870-06C6-46A0-AFD9-D55289D4C41A@gatech.edu>

> Unfortunately, not yet - would you like to help with this?
> We’re a bit starved on labor - about 4ish full-time in man-hours?

Sure, if you point me to documentation on the core design, I can draw
up a diagram of it.
Is there enough information on the core to make a WikiChip-like diagram?
I find that displaying the pipeline depth, width, and important
components is a good way of
displaying key characteristics of a core, and it makes it easier for
people like me to draw comparisons
against other cores (commercial and open-source).

> We’re using a modification on the scoreboard architecture from the Cray CDC 6600.
> Our scoreboard is somewhat similar to that of Tomasulo’s algorithm.

So you have OOO execution with multiple functional units executing in parallel,
and a scoreboard tracking completion status of writes to registers, right?
Is this a unified-register-file, or register-in-issue-queue design?

> No. So since we’re implementing a POWER chip, we decided to start by writing a POWER
> Simulator first. There are were a few options for this, QEMU, PearPC, and Gem5.

Ah I see, that's ok. You have to start somewhere :).

> From initial discussion, our first tapeout would be looking at Raspberry Pi rev B 2012 performance wise.
> It would be good to get some drystone number down.

Are you targeting IPC as the performance metric? Or IPC x Freq?
The Pi 1 Rev B seems to be a 1-wide in-order design, so it should be a
pretty conservative target to hit.
Any basic OOO core should beat the PI B in IPC, it only needs to run
at an equivalent frequency.

Do you know what the final performance target is? (Or minimal target
for a commercially viable product?)
The Cortex A72 is a 3-w OOO that might be a good point to target (it's
also used the latest Pi 4s).

From running a couple experiments on other open-OOO cores, it seems
like 3-ish DMIPs/MHz is a good
target for a OOO core.

> Are you familiar with Python nMigen - its basically Chisel for Python. You mentioned michroarchitecture… Perhaps you could help Luke on the scoreboard.

Ya, I've been trying to run the script on the website, running into
problems with Yosys, debugging now.

Lastly, have you guys talked to the university efforts to build
open-source cores? I see links to the
Shakti project on the site. Is this a collaboration with them? I
thought they were doing RISC-V?
There's also groups at ETH, Berkeley, and MIT pushing out their own
application-class cores. How does
this design compare to those?

Part of the reason I'm asking so many questions (beyond my own
curiosity) is that I will likely be
a TA for a computer-architecture course in the near future, and I
would like to revamp the course by
having students interact with real RTL for a complex SoC, instead of
just simulators.


Thanks,
-Jeremy
On Fri, May 15, 2020 at 11:45 AM Yehowshua <yimmanuel3@gatech.edu> wrote:
>
>
>
> > On May 15, 2020, at 2:24 PM, Jeremy Singher <thejsingher@gmail.com> wrote:
> >
> > Hi all,
> >
> > My name is Jeremy Singher.
>
> Hello and welcome!
>
> > I'm a graduate student studying computer
> > architecture, interested in open-source hardware and high performance
> > microarchitectures. I am looking for an open-source hardware project I can
> > contribute to through the course of my graduate studies, and I have some
> > questions about the Libre-SOC project.
> >
> > 1. It seems like you guys are building various components of an
> > out-of-order microarchitecture, such as the scoreboard, and load-store
> > ordering units. Do you have a complete microarchitecture diagram of the
> > core (or a text description)?
>
> Unfortunately, not yet - would you like to help with this?
> We’re a bit starved on labor - about 4ish full-time in man-hours?
>
> > I could find bits and pieces on specific
> > components, but I'm interested in details like pipeline width, depth,
> > branch-to-branch latency, load-use delay, etc.
>
> We’re using a modification on the scoreboard architecture from the Cray CDC 6600.
> Our scoreboard is somewhat similar to that of Tomasulo’s algorithm.
>
> > 2. Is the SoC at a state at which I can evaluate performance on simple
> > benchmarks in simulation? Other similar open-source hardware projects have
> > make targets to launch verilator simulations, but I could not find an
> > equivalent in your repos (although I probably am just bad at looking).
>
> No. So since we’re implementing a POWER chip, we decided to start by writing a POWER
> Simulator first. There are were a few options for this, QEMU, PearPC, and Gem5.
>
> We’re making tweaks to PearPC and we also writing a simulator in Python that parses the official POWER3.0B spec.
>
> I can’t remember why we decided to fiddle around with PearPC and not use QEMU or Gem5.
>
> > 3. What is your target performance in terms of an established benchmark
> > like Coremark, Dhrystone, Embench, or SPEC? I'm trying to compare the
> > merits and progress of various hardware projects out-there.
>
> From initial discussion, our first tapeout would be looking at Raspberry Pi rev B 2012 performance wise.
> It would be good to get some drystone number down.
>
> > 4. What is the right way to get started contributing? My experience is with
> > Verilog, and I've looked at other languages too, including BSV and Chisel.
> > I'm primarily interested in developing microarchitecture for
> > performance-critical components, like branch predictors, prefetchers,
> > instruction schedulers, and load-store units. Ideally, I could contribute
> > my work as part of graduate studies to this project.
> >
>
> Are you familiar with Python nMigen - its basically Chisel for Python. You mentioned michroarchitecture… Perhaps you could help Luke on the scoreboard.
>
> Our codebase is a bit of a mess at the moment - there was so much to do for such a large project.
> By August, with significant extra funding and labor in the pipeline, there should be more ability to clean things up.
>
> > Sorry for the barrage of questions.
> >
>
> No offense here :)
>
> > Best,
> > -Jeremy
>
> Yehowshua
>
> > _______________________________________________
> > libre-riscv-dev mailing list
> > libre-riscv-dev@lists.libre-riscv.org
> > http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 19:14 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #5 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
oink.  you *removed* NIA :)  well... we will probably need CompBROpSubset
anyway.
things like data_len can be removed (i don't see branch needing that), and
there
may be other fields as well.

i would have kiinda expected NIA to be passed in though (to CompBROpSubset),
because
it comes from the Program Counter, which would be special-cased rather than
stored
in an SPR.

hum hum, don't know.  oh.  right.  NIA is *next* instruction address, not an
input.
ok so i think we need something called "cia" - current instruction address - in
CompBROpSubset.

btw do a git pull i just did a minor cleanup

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 19:01 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #4 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
commit d1a2cb9f4852bd8118cb4db043e6622cae077830 (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Fri May 15 19:58:47 2020 +0100

    add branch input record

will swap over to that in a mo

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 18:58 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #3 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
hmm hmm i thought perhaps instead of passing nia into all ALUs (where it would
then not actually be used - the wires would be routed, taking up space but
then not actually go anywhere), to create a separate CompBROpSubset?

then, likewise in CompBROpSubset, anything _not_ used in any branch operation
can be removed from it.

diff --git a/src/soc/alu/alu_input_record.py b/src/soc/alu/alu_input_record.py
index 2c3dcc4..41a40eb 100644
--- a/src/soc/alu/alu_input_record.py
+++ b/src/soc/alu/alu_input_record.py
@@ -13,7 +13,6 @@ class CompALUOpSubset(Record):
     def __init__(self, name=None):
         layout = (('insn_type', InternalOp),
                   ('fn_unit', Function),
-                  ('nia', 64),
                   ('imm_data', Layout((("imm", 64), ("imm_ok", 1)))),
                     #'cr = Signal(32, reset_less=True) # NO: this is from the
C
R SPR
                     #'xerc = XerBits() # NO: this is from the XER SPR

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

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Yehowshua @ 2020-05-15 18:47 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAEoCstQz36UuDJ+ZUgLRJNeQkA=pTfYuzCr+XgF-FJY9+yJsvA@mail.gmail.com>


> 4. What is the right way to get started contributing? My experience is with
> Verilog, and I've looked at other languages too, including BSV and Chisel.
> I'm primarily interested in developing microarchitecture for
> performance-critical components, like branch predictors, prefetchers,
> instruction schedulers, and load-store units. Ideally, I could contribute
> my work as part of graduate studies to this project.


Start by reading through section 5.1 here:

https://libre-soc.org/ <https://libre-soc.org/>

There should be some instructions to get you started with the codebase.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] Introduction and Questions
From: Yehowshua @ 2020-05-15 18:45 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAEoCstQz36UuDJ+ZUgLRJNeQkA=pTfYuzCr+XgF-FJY9+yJsvA@mail.gmail.com>



> On May 15, 2020, at 2:24 PM, Jeremy Singher <thejsingher@gmail.com> wrote:
> 
> Hi all,
> 
> My name is Jeremy Singher.

Hello and welcome!

> I'm a graduate student studying computer
> architecture, interested in open-source hardware and high performance
> microarchitectures. I am looking for an open-source hardware project I can
> contribute to through the course of my graduate studies, and I have some
> questions about the Libre-SOC project.
> 
> 1. It seems like you guys are building various components of an
> out-of-order microarchitecture, such as the scoreboard, and load-store
> ordering units. Do you have a complete microarchitecture diagram of the
> core (or a text description)?

Unfortunately, not yet - would you like to help with this?
We’re a bit starved on labor - about 4ish full-time in man-hours?

> I could find bits and pieces on specific
> components, but I'm interested in details like pipeline width, depth,
> branch-to-branch latency, load-use delay, etc.

We’re using a modification on the scoreboard architecture from the Cray CDC 6600.
Our scoreboard is somewhat similar to that of Tomasulo’s algorithm.

> 2. Is the SoC at a state at which I can evaluate performance on simple
> benchmarks in simulation? Other similar open-source hardware projects have
> make targets to launch verilator simulations, but I could not find an
> equivalent in your repos (although I probably am just bad at looking).

No. So since we’re implementing a POWER chip, we decided to start by writing a POWER
Simulator first. There are were a few options for this, QEMU, PearPC, and Gem5.

We’re making tweaks to PearPC and we also writing a simulator in Python that parses the official POWER3.0B spec.

I can’t remember why we decided to fiddle around with PearPC and not use QEMU or Gem5.

> 3. What is your target performance in terms of an established benchmark
> like Coremark, Dhrystone, Embench, or SPEC? I'm trying to compare the
> merits and progress of various hardware projects out-there.

From initial discussion, our first tapeout would be looking at Raspberry Pi rev B 2012 performance wise.
It would be good to get some drystone number down.

> 4. What is the right way to get started contributing? My experience is with
> Verilog, and I've looked at other languages too, including BSV and Chisel.
> I'm primarily interested in developing microarchitecture for
> performance-critical components, like branch predictors, prefetchers,
> instruction schedulers, and load-store units. Ideally, I could contribute
> my work as part of graduate studies to this project.
> 

Are you familiar with Python nMigen - its basically Chisel for Python. You mentioned michroarchitecture… Perhaps you could help Luke on the scoreboard.

Our codebase is a bit of a mess at the moment - there was so much to do for such a large project.
By August, with significant extra funding and labor in the pipeline, there should be more ability to clean things up.

> Sorry for the barrage of questions.
> 

No offense here :)

> Best,
> -Jeremy

Yehowshua

> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev


_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] Introduction and Questions
From: Jeremy Singher @ 2020-05-15 18:24 UTC (permalink / raw)
  To: libre-riscv-dev

Hi all,

My name is Jeremy Singher. I'm a graduate student studying computer
architecture, interested in open-source hardware and high performance
microarchitectures. I am looking for an open-source hardware project I can
contribute to through the course of my graduate studies, and I have some
questions about the Libre-SOC project.

1. It seems like you guys are building various components of an
out-of-order microarchitecture, such as the scoreboard, and load-store
ordering units. Do you have a complete microarchitecture diagram of the
core (or a text description)? I could find bits and pieces on specific
components, but I'm interested in details like pipeline width, depth,
branch-to-branch latency, load-use delay, etc.
2. Is the SoC at a state at which I can evaluate performance on simple
benchmarks in simulation? Other similar open-source hardware projects have
make targets to launch verilator simulations, but I could not find an
equivalent in your repos (although I probably am just bad at looking).
3. What is your target performance in terms of an established benchmark
like Coremark, Dhrystone, Embench, or SPEC? I'm trying to compare the
merits and progress of various hardware projects out-there.
4. What is the right way to get started contributing? My experience is with
Verilog, and I've looked at other languages too, including BSV and Chisel.
I'm primarily interested in developing microarchitecture for
performance-critical components, like branch predictors, prefetchers,
instruction schedulers, and load-store units. Ideally, I could contribute
my work as part of graduate studies to this project.

Sorry for the barrage of questions.

Best,
-Jeremy
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 17:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

--- Comment #2 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #1)
> I'm working on defining the pipeline data type for this, and I'm wondering
> how I should handle the CR input. Conditional branches can branch on any of
> the 32 bits in the cr, so I think it should take in the entire CR.

there is a selector in the insn, right? that is the "CR" equivalent of the RA,
RB, RS and RT fields.

> However,
> I suspect we'll be implementing cr0..cr7 as separate 4 bit registers to
> avoid false dependencies, so making the branch take in the whole register
> would complicate matters

yes those are the two ways to do it:

A treat CR as separate 4 bit regs.

B treat it as one 64 bit reg

scheme A requires 8 regs as input if you need the full CR.  8 inputs from the
Dependency Matrices is a bit much.

sometimes however you need the full 64 bit. i do have a Dep Matrix strategy for
both, it involves a vector grouping system:

* both A and B are available, however q request for CR0 read will *also* set a
request for the *whole* 64 bits of CR.

something like that.

however, it is complicated. 

so for now, i think we just go with full 64 bit.  annoying as that is.

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-15 17:26 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-313-13@https.bugs.libre-soc.org/>

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

Michael Nolan <mtnolan2640@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mtnolan2640@gmail.com

--- Comment #1 from Michael Nolan <mtnolan2640@gmail.com> ---
I'm working on defining the pipeline data type for this, and I'm wondering how
I should handle the CR input. Conditional branches can branch on any of the 32
bits in the cr, so I think it should take in the entire CR. However, I suspect
we'll be implementing cr0..cr7 as separate 4 bit registers to avoid false
dependencies, so making the branch take in the whole register would complicate
matters

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-15 15:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>

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

Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.libre-soc.org/
                   |                            |show_bug.cgi?id=315

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 315] SPR Pipeline needed
From: bugzilla-daemon @ 2020-05-15 15:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-315-13@https.bugs.libre-soc.org/>

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

Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.libre-soc.org/
                   |                            |show_bug.cgi?id=305

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 314] Create Condition Register pipeline
From: bugzilla-daemon @ 2020-05-15 15:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-314-13@https.bugs.libre-soc.org/>

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

Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.libre-soc.org/
                   |                            |show_bug.cgi?id=315

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 315] SPR Pipeline needed
From: bugzilla-daemon @ 2020-05-15 15:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-315-13@https.bugs.libre-soc.org/>

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

Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.libre-soc.org/
                   |                            |show_bug.cgi?id=314

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 315] New: SPR Pipeline needed
From: bugzilla-daemon @ 2020-05-15 15:40 UTC (permalink / raw)
  To: libre-riscv-dev

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

            Bug ID: 315
           Summary: SPR Pipeline needed
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: PC
                OS: Mac OS
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl@lkcl.net
          Reporter: lkcl@lkcl.net
                CC: libre-riscv-dev@lists.libre-riscv.org
   NLnet milestone: ---

SPR set/get pipeline is needed
see https://github.com/antonblanchard/microwatt/blob/master/execute1.vhdl
https://libre-soc.org/openpower/isa/sprset/

* OP_MTSPR
* OP_MFSPR

note that setb is not implemented by microwatt

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

^ permalink raw reply

page:   latest

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