Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* Re: [libre-riscv-dev] cache SRAM organisation
From: Luke Kenneth Casson Leighton @ 2020-03-26 15:15 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <db557324bcb76a999d8f66c75b9319974a1a1e08.camel@fibraservi.eu>

On Thursday, March 26, 2020, Staf Verhaegen <staf@fibraservi.eu> wrote:
>
>
> You seem to mixing up two different concepts, e.g. synchronicity and
> write-through.


ah ok.  i didn't realise that SRAMs would have these as separate concepts.
perhaps i would get it immediately if i saw a gate level schematic.


> Synchronous means signals are synced with an edge of a (clock) signal.
> SRAM write-through means that after a write operation you also get on the Q
> output the data you have just written. These two concepts are orthogonal to
> each other.
> The current synchronous SRAM being developed will most likely have
> write-through behavior;


ah good


> will be confirmed before May test chip tape-out.


ah May not March.


>
>  It will cause delay on the signal though. I need to check if it has
> changed but in the OpenRAM 0.35um test tape-out I did the address and data
> input was latched on rising edge and the Q output was updated on falling
> edge of the clock. So the delay on the Q output is half a clock cycle plus
> the internal delay on the output latch enable signal.


fascinating.  that's pretty much exactly what the CDC6600 did on its
register file.


> So if timing of the write-through is critical it is still best to still
> include MUXs as said in Jacob's reply to allow the bypass ofsignal. I have
> seen SRAM that did include a AWT (asynchronous write through) but this just
> moved the MUXs inside the SRAM block and also adds them if you don't need
> this AWT. So I would like to keep these MUX be added added externally is
> needed.


ok

> > mode.  the reason why we need the synchronous mode is because some
> > Function Units will be sitting idle,waiting for their input operands,
which have to come from
> > otherFunction Units as "results".


> I can understand you do this to implement functional units with
> configurable pipeline length but I would strongly discourage to pipeline
> register files after each other .


"pipeline register files after each other"? apologies i am not clear what
you mean, here.  do you mean "don't do write-thru on the Regfile"?

this design is not like an InOrder system where it is very risky to change
pipeline lengths or do any kind of fancy work.

the (parallel) OoO design has all data dependencies sorted out, all units
*know exactly* which units they are waiting for, they can be arbitrary
completion time, they can be FSMs, and the Dependency Matrices just don't
care because they record completion *not* completion *time*.

therefore the only thing stopping them from proceeding is how fast they can
get a result, so that other FUs can get at it as an input operand as quick
as possible.

that means either: a Register Forwarding Bus, or it means a write to the
Regfile followed by a read.

therefore anything we can do to reduce the number of clock cycles between
that regfile write and subsequent read is a good thing.

if write-thru is available, we can use it to reduce delay by one cycle.
however yes i note that because it is on the falling edge we might not be
able to take full advantage of it.



If the latter is excluded would you still need an asynchronous RAM block ?


i can't tell, yet, apologies.  i believe the answer is no.

Staf it would help enormously i think if you could let us know, in terms of
what options to nmigen Memory module, are permitted.  i am assuming that
nmigen Memory actually supports the options correctly!

we can then "wrap" the Memory module (or hook it) and throw asserts if we
ever use options that are not supported.

l.




-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
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] cache SRAM organisation
From: Luke Kenneth Casson Leighton @ 2020-03-26 15:15 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <350514fc6cf0b578804b85775beb8c0e039cab1e.camel@fibraservi.eu>

On Thursday, March 26, 2020, Staf Verhaegen <staf@fibraservi.eu> wrote:

> (Sorry send to early)
>
>
> > .In theory on a single port SRAM
>
> In theory on a single port SRAM the write data input and the Q data output
> could be on opposite sides of the block but I will make sure that these
> pins are on the same side of the block and close together so you don't need
> much wire to connect a pass-through MUX.


ah fantastic, really appreciated.

that will help keep it small.

l.



-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 16:52 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

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

> > that _should_ be sufficient to get sub, subi and neg all working, with not a
> > lot of effort.
> 
> Working now.

yay!  oh wait...

F
======================================================================
FAIL: test_sub (__main__.DecoderTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "simulator/test_sim.py", line 98, in test_sub
    self.run_test_program(program, [1, 2, 3, 4, 5])
  File "simulator/test_sim.py", line 105, in run_test_program
    qemu_register_compare(simulator, q, reglist)
  File "simulator/test_sim.py", line 111, in qemu_register_compare
    simulator.regfile.assert_gpr(reg, qemu_val)
  File "/home/lkcl/src/libreriscv/soc/src/soc/simulator/internalop_sim.py",
line 74, in assert_gpr
    assert reg_val == val, msg
AssertionError: reg r3 got 10000000000004444, expecting 4444

----------------------------------------------------------------------
Ran 5 tests in 15.696s

FAILED (failures=1)

how many bits is that
0x 1 0000 0000 0000 4444

ha, that's amusing.  the result is a roll-over from 64-bit arithmetic

> Need to sort out setting the carry and overflow flags at some
> point though, that'll be more fun...

yehyeh.  a SPR storing the carry, first.  take a look at pearpc,
it should show a way to do it (that's easy to interpret)
https://github.com/sebastianbiallas/pearpc

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 16:57 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #123 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
i hacked masking the write to take out the upper 1 in write_reg.

-- 
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 257] Implement demo Load/Store queueing algorithm
From: bugzilla-daemon @ 2020-03-26 17:06 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-257-13@http.bugs.libre-riscv.org/>

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

--- Comment #18 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
oh.  one important thing that came out of the discussion on comp.arch:
the number of wires involved, if we are not careful, is MENTAL.

let's imagine we pass the expanded (shifted, masked) data and op-length
out from each FunctionUnit.  the data, previously a maximum of 64 bit,
is now a full cache-line wide (because it has been shifted into position
for the cache write), and the operation, previously encoded as len=1,2,4,8
(we could use 2 bits for that) and in binary address form LSBs 0-3, is
now a 16 bit mask...

oh times two, one for the aligned and one for the misaligned LD/ST.

so that's 128, 256, plus 16x2=32 equals 288 wires per LD/ST FU, of which
there will be 8.

that's a staggering 2,304 wires *just for the data*

eep.

if we do the splitting *after* the Muxing through the 4-port Muxer(s),
*even if the splitting was needed for input into the Address Clash Matrix*,
we can halve that number of wires to "only" around 1120.

kiinda important :)

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 17:15 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #124 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #122)

> how many bits is that
> 0x 1 0000 0000 0000 4444
> 
> ha, that's amusing.  the result is a roll-over from 64-bit arithmetic
> 
> > Need to sort out setting the carry and overflow flags at some
> > point though, that'll be more fun...
> 
> yehyeh.  a SPR storing the carry, first.  take a look at pearpc,
> it should show a way to do it (that's easy to interpret)
> https://github.com/sebastianbiallas/pearpc

Ooops, some of my experiments with carry must have snuck in, sorry. Speaking
of, I'm getting some weird behavior with carry on qemu. If I run some
instructions that generate a carry or overflow, then have gdb read the xer
register, it returns 0. But if I execute a `mfxer r5` or the like and print out
that register, it gives me the correct value for xer. I'm trying to confirm
whether this is a bug with qemu or not.

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 17:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #125 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #124)
> (In reply to Luke Kenneth Casson Leighton from comment #122)
> 
> > how many bits is that
> > 0x 1 0000 0000 0000 4444
> > 
> > ha, that's amusing.  the result is a roll-over from 64-bit arithmetic
> > 
> > > Need to sort out setting the carry and overflow flags at some
> > > point though, that'll be more fun...
> > 
> > yehyeh.  a SPR storing the carry, first.  take a look at pearpc,
> > it should show a way to do it (that's easy to interpret)
> > https://github.com/sebastianbiallas/pearpc
> 
> Ooops, some of my experiments with carry must have snuck in, sorry. 

no worries

> Speaking
> of, I'm getting some weird behavior with carry on qemu. If I run some
> instructions that generate a carry or overflow, then have gdb read the xer
> register, it returns 0. But if I execute a `mfxer r5` or the like and print
> out that register, it gives me the correct value for xer. I'm trying to
> confirm whether this is a bug with qemu or not.

hmmm.  if it's a bug in qemu it's one that, i suspect, would have been detected
a loooong time ago.  but... you never know...

let's look at the spec:

p70 3.0B "addc":

RT <= (RA) + (RB)

The sum (RA) + (RB) is placed into register RT.
Special Registers Altered:
    CA CA32
    CR0                                       (if Rc=1)
    SO OV OV32                               (if OE=1)

ok so SO (summary overflow), OV (overflow) and OV32 (overflow 32-bit)
all get set, in XER.  these are listed on p45 3.2.2

however that's not the "carry" flag: that's *CR0*.  which is in... errr...
the Condition Register p45 2.3.1

let's check the pearpc source (yes it's only 32-bit).  ppc_alu.c
whereisitwhereisit...  ok!

https://github.com/sebastianbiallas/pearpc/blob/master/src/cpu/cpu_generic/ppc_alu.cc#L56

ahh, then as a *separate* concern, if you see the implementation of addcx,
that updatex XER_CA *and* updates CR0:
https://github.com/sebastianbiallas/pearpc/blob/master/src/cpu/cpu_generic/ppc_alu.cc#L86

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 17:51 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #126 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
here's ppc_update_cr0:

https://github.com/sebastianbiallas/pearpc/blob/master/src/cpu/cpu_generic/ppc_opc.h#L26

#define CR_CR0_LT (1<<31)
#define CR_CR0_GT (1<<30)
#define CR_CR0_EQ (1<<29)
#define CR_CR0_SO (1<<28)

* clears the CR-CR0 bits
* result is zero: sets bit 29
* result top bit is set (indicating -ve as signed): sets bit 31
* otherwise (+ve signed): sets bit 30
* after that (in *addition*): if the XER SO bit was set, set bit 28 of CR0

interestingly, then, it looks like you have to check the XER flag *before*
checking the carry.  and XER is set based on... err... comparing operand A
with the result.  how odd.
https://github.com/sebastianbiallas/pearpc/blob/master/src/cpu/cpu_generic/ppc_alu.cc#L86

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 17:56 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #127 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
oh - i just spotted this in p30, section 2.3.1.  it seems to concur with
ppc_update_cr0 *except* of course, it's been adapted for 32/64-bit modes.

if (64-bit mode)
   then M <= 0
   else M <= 32
if       (target_register)[M:63] < 0 then c <= 0b100  # bit 31
else if (target_register)[M:63] > 0 then c <= 0b010   # bit 30
else                                      c <= 0b001  # bit 29
CR0 <= c || XERSO                                     # bit 28

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 18:01 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #128 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #125)

> hmmm.  if it's a bug in qemu it's one that, i suspect, would have been
> detected
> a loooong time ago.  but... you never know...
> 

> ok so SO (summary overflow), OV (overflow) and OV32 (overflow 32-bit)
> all get set, in XER.  these are listed on p45 3.2.2
> 

Sorry, was actually overflow that I was checking: 
        li 1, 1
        sldi 1, 1, 63
        or 2, 1, 1
        addco. 3, 2, 1
        mfxer 5

That should add -0x80000000000000000 to itself and overflow, and the "o" means
that OV and SO should actually be set. Like I said before, running it in qemu
and reading the xer register gives a result of 0, and reading r5 gives a result
of 0xe0000000.

> however that's not the "carry" flag: that's *CR0*.  which is in... errr...
> the Condition Register p45 2.3.1

It does also list CA and CA32, which should correspond to the flags in xer as
well.

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 19:39 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #129 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://github.com/qemu/qemu/blob/master/target/ppc/translate.c#L950

eurrrgh... macros-on-macros-on-macros... *sigh*.

ok so we're looking at a trail that goes through GEN_HANDLER, GEN_OPCODE,
GEN_INT_ARITH_ADD but ultimately lands at geo_op_addic which in turn
lands in gen_op_arith_add.

here's where addco sets the flags compute_ca=1, compute_ov=1 *but* sets
add_ca=0 whereas addeo *does* set all three (line #926)

https://github.com/qemu/qemu/blob/master/target/ppc/translate.c#L924

the flag "cpu_ca" comes in globally (initialised at line 132).

looking at the spec, the difference between addco and addeo is supposed to
be:

addco

RT <= (RA) + (RB)
The sum (RA) + (RB) is placed into register RT.

addeo

RT <= (RA) + (RB) + CA
The sum (RA) + (RB) + CA is placed into register RT.

hmmm need to look at microwatt, will do that in a minute.

-- 
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] Setup automation scripts
From: Cole Poirier @ 2020-03-26 19:42 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
In-Reply-To: <CAPweEDwHd_-L0YFVmHE99CLNDN6XwXOuTzEMPrkoKwmxUn=Mzg@mail.gmail.com>



On Mar 25 2020, at 9:14 pm, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:

> cole click the three dots first before reading this further...

> ... which includes trimming context on replies.  you see how much crap
> there is, how long it took to scroll down and find this?
> 
> not everyone is using gmaul.
> 
> l.

Sorry for this lapse in judgement Luke. I've been trying my best to
adhere to proper mailing list etiquette, and I've switched to using the
open source mail client Mailspring to allow me to make sure I'm sending
plaintext mail. But of course, this doesn't prevent me from slipping
into my old ways, so thank you for this reminder, I'll try very hard not
to do this again.

Cole

_______________________________________________
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] cache SRAM organisation
From: Staf Verhaegen @ 2020-03-26 20:08 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAPweEDyM_wqTbum5+=iiLGqq3KY15OOg3aOewpsRWFp9iOvq0w@mail.gmail.com>

[-- Attachment #1.1: Type: text/plain, Size: 649 bytes --]

Luke Kenneth Casson Leighton schreef op do 26-03-2020 om 15:15 [+0000]:
> On Thursday, March 26, 2020, Staf Verhaegen <staf@fibraservi.eu> wrote:
> > I can understand you do this to implement functional units withconfigurable pipeline length but I would strongly discourage to pipelineregister files after each other .
> 
> 
> "pipeline register files after each other"? apologies i am not clear whatyou mean, here.  do you mean "don't do write-thru on the Regfile"?

No I meant for example connecting the output of one port of an asynchronous RAM to for example the address input of another port of an asynchronous RAM.

greets,
Staf.


[-- Attachment #2: Type: text/plain, Size: 177 bytes --]

_______________________________________________
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] cache SRAM organisation
From: Staf Verhaegen @ 2020-03-26 20:18 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAPweEDzEvtPYGKvGMvebmQzhJDhSgfvUOVZvB2WXxSbv_ebE8A@mail.gmail.com>

[-- Attachment #1.1: Type: text/plain, Size: 793 bytes --]

Luke Kenneth Casson Leighton schreef op do 26-03-2020 om 13:05 [+0000]:
> On Thursday, March 26, 2020, Staf Verhaegen <staf@fibraservi.eu> wrote:
> > Would like to make separate side remark here. In ASICs MUXes are relativeexpensive gates with respect to delay and power. So if this principle isgenerally applied over the whole design it will make it difficult to make achip that is competitive in power/performance compared to ARM/x86 CPUs.
> 
> 
> just the ALU pipeline registers.  we felt that the advantage of being ableto drop to say 500mhz and halve the number of pipeline stages to say 5, andalso be able to ramp up to 1.6ghz and double bavk up to 10 stages, wasworth considering.

What would be the advantage over running at 800Mhz with 5 pipeline stages ?

greets,
Staf.


[-- Attachment #2: Type: text/plain, Size: 177 bytes --]

_______________________________________________
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 20:29 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #130 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://github.com/antonblanchard/microwatt/blob/master/ppc_fx_insns.vhdl#L110
ppc_adde():
return 65-bit RA + 65-bit RB + carry

https://github.com/antonblanchard/microwatt/blob/master/ppc_fx_insns.vhdl#L140
ppc_add():
return 64-bit RA + 64-bit RB

hmm ppc_add() doesn't appear to be used (at all) in execute1.vhdl

decode_input_carry(ic, XERC) is:
if ic=ZERO return 0
if ic=ONE return 1
if ic=CA return XERC.ca

returning XERC.ca might be a significant difference, there... ah!  yes,
if you look in the "cry_in" column, adde and addeo are supposed to take
cry_in=CA *not* cry_in=ZERO.

that's likely to be 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

^ permalink raw reply

* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 20:34 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #131 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
btw don't be afraid to commit unit tests that don't "quotes work quotes".

when it comes to unit tests, the whole idea is to have
"things-that-demonstrate-a-need-to-fix-code" rather than "have everything
absolutely perfect".

so do go ahead and commit some unit tests that actually break, but you
expect them to pass at some point in the future.

i say that because in the past i noticed that you commented out some unit
tests which "failed".  just leave them to fail, as a reminder.  also
there's a way to tag them with bugreports (with decorators).

i'll document this in HDL_workflow.

-- 
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 257] Implement demo Load/Store queueing algorithm
From: bugzilla-daemon @ 2020-03-26 20:58 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-257-13@http.bugs.libre-riscv.org/>

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

--- Comment #19 from Jacob Lifshay <programmerjake@gmail.com> ---
I was thinking that the load/store FUs would just split and submit both halves
to a queue-like structure that and the FU would just track both halves
independently until they complete, then merge them. If a load/store doesn't
need to be split, then it would only take one queue entry.

That queue can have all the dependency matrix and scheduling stuff be part of
it and it only needs enough entries to keep the pipeline full -- it doesn't
need double entries to handle split load/stores since the FUs will just stall
if the queue is too full.

-- 
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] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-26 21:03 UTC (permalink / raw)
  To: Libre-RISCV General Development, Jock Tanner, Immanuel,
	Yehowshua U, Michael Nolan

https://git.libre-riscv.org/?p=crowdsupply.git;a=blob;f=updates/023_2020mar26_decoder_emulator_started.mdwn;hb=HEAD

this is just the beginning, i have to fill in the sections - it would
be really handy if people could help!

* jacob in particular on the algorithmic library
* jock on how you got on with the coriolis2 thing (even if it's "it
was total chaos")
* yehowshua if you could write a paragraph or two about CREATE-X
* michael could you do something about the use of GNU as and qemu?

if you prefer just reply to this message with a paragraph or two and i
will cut/paste it?  i'll do the conf-call and the Talos-II
workstation.

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 257] Implement demo Load/Store queueing algorithm
From: bugzilla-daemon @ 2020-03-26 21:23 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-257-13@http.bugs.libre-riscv.org/>

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

--- Comment #20 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #19)
> I was thinking that the load/store FUs would just split and submit both
> halves to a queue-like structure that and the FU would just track both
> halves independently until they complete, then merge them. If a load/store
> doesn't need to be split, then it would only take one queue entry.

yes - only submit one queue entry, however there's a second split, in order
to double the maximum throughput (without needing dual-ported L1 cache SRAM):
use bit 4 to select odd-even banks.

however that selection needs to be back at the start:
https://libre-riscv.org/3d_gpu/l0_to_l1_n_way_cache_buffer.png

so we need *two* multi-in 4-out PriorityPickers, where the inputs are
actually done like this:

for i in range(16):
   if addr[i][4] == 0:
      multi_picker_even[i] = ldst_requested[i]
   else:
      multi_picker_odd[i] = ldst_requested[i]

*then* followed by:

mpick_even = MultiPriorityPicker(multi_picker_even, 4)
mpick_odd  = MultiPriorityPicker(multi_picker_odd, 4)

*then* followed by:

for i in range(4):
     L0_cache_buffer_even.port[i] == mpick_even.out_en[i] # each 16-bit wide
     L0_cache_buffer_odd .port[i] == mpick_odd .out_en[i] # ditto

that L0_cache_buffer_odd/even, yes it can be a Queue, however a FIFO Queue
has a bit of a problem: you can't normally get access to the entries in it.
where we need to *merge* entries (the bytemasks) that happen to have the same 
address bits 5 and upwards.

> That queue can have all the dependency matrix and scheduling stuff be part
> of it and it only needs enough entries to keep the pipeline full -- it
> doesn't need double entries to handle split load/stores since the FUs will
> just stall if the queue is too full.

part of the discussion on comp.arch was that we *may* want to prioritise
aligned LDs/STs over misaligned ones.

this can easily be done by putting the misaligned LDs/ST requests at the
*end* of the PriorityPicker.

however, again, if there happens to be a sequential batch of LDs/STs
which happen to be misaligned because they are a massive sequential batch of
8-byte LDs that were offset accidentally by 4 bytes, we do *not* want
misaligned LDs/STs to be deprioritised, because they will actually merge
quite nicely with the other LDs/STs.

therefore (and i'm recommending we do this later) we actually need to
prioritise which entry should be sent from the L0 cache/buffer/queue
by the number of bits that "merge" at the bytemask level.  this with
a "popcount" (or pseudo-popcount) on every entry in the L0 cache/buffer/queue
that detects at the very minimum which are full cache-lines after merging
the byte-masks which all have the same binary addresses [bits 5 and upwards].

*not* by "whether it is first in the queue".

so ultimately, a queue (FIFO queue) is not the right data structure to use.

if you'd like to write a round-robin Picker, great! :)  however i don't
think it makes a huge amount of difference, initially, whether it's
Priority-picked or RR-picked.  the PP and Multi-PP code exists :)

-- 
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]  email etiquette
From: Jacob Lifshay @ 2020-03-26 21:25 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <ADC6B2B8-8F9C-41EE-8327-E7333E954038@getmailspring.com>

On Thu, Mar 26, 2020, 12:43 Cole Poirier <colepoirier@gmail.com> wrote:

> Sorry for this lapse in judgement Luke. I've been trying my best to
> adhere to proper mailing list etiquette, and I've switched to using the
> open source mail client Mailspring to allow me to make sure I'm sending
> plaintext mail. But of course, this doesn't prevent me from slipping
> into my old ways, so thank you for this reminder, I'll try very hard not
> to do this again.
>

We're not like some of the Kernel mailing lists which will just block any
mail with html, so you can still use the gmail client if you want, just
remember to try to trim excessive context, avoid top-posting, and avoid
using non-plaintext features.

I'm currently writing this in the gmail app for android, in case you were
wondering.

Jacob
_______________________________________________
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] cache SRAM organisation
From: Luke Kenneth Casson Leighton @ 2020-03-26 21:28 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <7b5a312befec67dbf14d31f5bb4c418c8784e787.camel@fibraservi.eu>

On Thu, Mar 26, 2020 at 8:08 PM Staf Verhaegen <staf@fibraservi.eu> wrote:

> Luke Kenneth Casson Leighton schreef op do 26-03-2020 om 15:15 [+0000]:
> > On Thursday, March 26, 2020, Staf Verhaegen <staf@fibraservi.eu> wrote:
> > > I can understand you do this to implement functional units withconfigurable pipeline length but I would strongly discourage to pipelineregister files after each other .
> >
> >
> > "pipeline register files after each other"? apologies i am not clear whatyou mean, here.  do you mean "don't do write-thru on the Regfile"?
>
> No I meant for example connecting the output of one port of an asynchronous RAM to for example the address input of another port of an asynchronous RAM.

ah right, no definitely not.  the connections are:

RegisterFile readport[0..R] ==> FunctionUnit[0..M] operand latches
                                            pipeline stage 0
                                            pipeline stage 1
                                            ...
                                            pipeline stage N
RegisterFile writeport[0..W] <== FunctionUnit[0..M] result latches

(and also: )
register file bypass forwardingbus <== FunctionUnit result latches
register file bypass forwardingbus ==> FunctionUnit operand latches

so the asynchronous SRAMs will definitely *only* be connected to SFF
latches.  *not* to other asynchronous SRAMs.

appreciated the clarification.

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

* Re: [libre-riscv-dev] email etiquette
From: Cole Poirier @ 2020-03-26 21:33 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD4G8-OxL+h68iZaQOPch-+6rpuFUKWWhYGi9z-5JFE+sA@mail.gmail.com>

> On Mar 26, 2020, at 2:25 PM, Jacob Lifshay <programmerjake@gmail.com> wrote:
> 
> We're not like some of the Kernel mailing lists which will just block any
> mail with html, so you can still use the gmail client if you want, just
> remember to try to trim excessive context, avoid top-posting, and avoid
> using non-plaintext features.
> 
> I'm currently writing this in the gmail app for android, in case you were
> wondering.
> 
> Jacob

Will do! Thanks for the advice Jacob!

Cole
_______________________________________________
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] cache SRAM organisation
From: Luke Kenneth Casson Leighton @ 2020-03-26 21:37 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <b18283c7e7a93fa8afdef2f0a8679b26e4569528.camel@fibraservi.eu>

---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

On Thu, Mar 26, 2020 at 8:18 PM Staf Verhaegen <staf@fibraservi.eu> wrote:
>
> Luke Kenneth Casson Leighton schreef op do 26-03-2020 om 13:05 [+0000]:
> > On Thursday, March 26, 2020, Staf Verhaegen <staf@fibraservi.eu> wrote:
> > > Would like to make separate side remark here. In ASICs MUXes are relativeexpensive gates with respect to delay and power. So if this principle isgenerally applied over the whole design it will make it difficult to make achip that is competitive in power/performance compared to ARM/x86 CPUs.
> >
> >
> > just the ALU pipeline registers.  we felt that the advantage of being ableto drop to say 500mhz and halve the number of pipeline stages to say 5, andalso be able to ramp up to 1.6ghz and double bavk up to 10 stages, wasworth considering.
>
> What would be the advantage over running at 800Mhz with 5 pipeline stages ?

i assume you mean fixed 5-pipeline stages.

the problem is, if you *want* to run at 1.6ghz and have complex
pipeline stages, you simply can't: 5 stages are too long, the gate
propagation delay is too large.  the only way to get to 1.6hz is:
split those 5 stages into 10 smaller stages.

the problem with _that_ is: if you then run those 10 stages at say
800mhz, or say even 400 mhz or 100mhz (because you are in power-saving
mode), you just *massively* increased the latency for completion of
any given operation.

so even though those 10 stages are so fast (because you are in 14nm)
that, at 100mhz, they complete in under 5% of a 100mhz clock rate, if
you have a fixed 10-stage pipeline you are absolutely screwed, you
*have* to have the penalty of the 10-stage pipeline latency.

screwed 1:  5-stage pipeline FORCES you to ONLY be able to run at
BELOW (e.g) 800mhz

screwed 2: 10-stage pipeline FORCES you to have massive instruction
completion latency at below (e.g.) 800mhz.

solution: give every other pipeline stage's registers a "combinatorial bypass".

un-screwed 1: when speed is above 800mhz, switch off the combinatorial
bypass, pipeline becomes 10-stage.

un-screwed 2: when speed is below 800mhz, switch ON the combinatorial
bypass, latency due to slower clock rate DISAPPEARS because all
pipelines are now only 5-stage, not 10.

according to some people on comp.arch, the first time this appeared in
commercial processors was in the 1990s, done by IBM.

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 217] create a "ring" system which allows pad locations to be specified conveniently
From: bugzilla-daemon @ 2020-03-26 21:39 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-217-13@http.bugs.libre-riscv.org/>

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

--- Comment #44 from Jock Tanner <tanner.of.kha@gmail.com> ---
Sorry for being missing for some time, it was a busy week for me. My other
projects and local bureaucracy required my attention.

So I reworked the ALU16 example with the hope that this approach could be
(re)used in a future work.

https://git.libre-riscv.org/?p=soclayout.git;a=blob;f=experiments7/utils.py

My goals were:

- eliminate dead, duplicated and redundant code,

- facilitate multiple instantiation of electronic components through modular
design with a support for module “nesting”,

- enable parameterization of the electronic modules in a simple, declarative
manner,

- proper incapsulate all Coriolis interfacing to overcome the “global context”
antipattern that prevailed in the original code, and further improve the
readability and maintainability.

To achieve these goals, I

- created a class named 'Module', which encapsulated the execution context
('Hurricane.Cell', 'Hurricane.DataBase', 'CRL.AllianceFramework', 'editor', et
c.) in its attributes and properties,

- converted the typical actions into the methods of this class,

- separated the initialization of the Module object ('Module.__init__()') with
the actual operations ('Module.build()'),

- provided a method for recursive building of “nested” objects.

Right now, 'Module.build()' is designed to be implemented in 'Module'
subclasses. As soon as my understanding of the requirements will grow beyond
the simple examples, 'Module.build()' can be converted into the “template
method”.

The amount of required parameters can also be reduced. Maybe we could teach the
module to deduct either its size or pin spacing. Now the initialization looks
quite fuzzy.

I deleted all the 'print' statements from the example, since I could not grasp
the logic and requirements behind them. Perhaps it makes sense to return some
logging, preferably with a proper use of 'logging' facility.

-- 
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 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-26 21:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>

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

--- Comment #132 from Jacob Lifshay <programmerjake@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #131)
> btw don't be afraid to commit unit tests that don't "quotes work quotes".
> 
> when it comes to unit tests, the whole idea is to have
> "things-that-demonstrate-a-need-to-fix-code" rather than "have everything
> absolutely perfect".
> 
> so do go ahead and commit some unit tests that actually break, but you
> expect them to pass at some point in the future.
> 
> i say that because in the past i noticed that you commented out some unit
> tests which "failed".  just leave them to fail, as a reminder.  also
> there's a way to tag them with bugreports (with decorators).
> 
> i'll document this in HDL_workflow.

Actually, I'd decorate them with something like:
import unittest

@unittest.skip("not working yet")
def test_fn():
    body-here

or

@unittest.expectedFailure # FIXME: not working yet
def test_fn():
    body-here


That way, once I add support for GitLab CI we will get a message when one of
the commits fails any of the tests, allowing us to more quickly detect that
something unexpectedly broke. If it's filled with a whole bunch of tests that
we know will fail, then that makes the CI nearly worthless because it will
always be filled with a bunch of failures obscuring the ones we care about.

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