* [libre-riscv-dev] [Bug 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 19:10 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
--- Comment #68 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
File "/home/lkcl/src/libresoc/soc/src/soc/decoder/isa/fixedlogical.py", line
223, in op_prtyd
s = s / RS[i % 8 + 7]
erm... ermermerm... that doesn't look right. divide? instead of ^ (XOR)?
TypeError: unsupported operand type(s) for /: 'int' and 'SelectableInt'
i think, really, we need to do the same trick done with eq, ge etc, turn all
operations from using python "op1 + op2" into "add(op1, op2)" and sort out
the operands - convert to SelectableInt - in 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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 19:06 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
--- Comment #67 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #66)
> i added popcount (because). it looks like it works except test_cmpb is
> not working
after updating submodules (will commit in a sec)
File "/home/lkcl/src/libresoc/soc/src/soc/decoder/isa/fixedlogical.py", line
193, in op_cmpb
if eq(RS[8 * n:8 * n + 7 + 1], RB[8 * n:8 * n + 7 + 1]):
NameError: name 'RS' is not defined
--
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] daily kan-ban update 14may2020
From: Luke Kenneth Casson Leighton @ 2020-05-14 18:55 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD5EAEQm+siMSmEeNQYeFMfH=hwfmoS-kLta75dbLaDANg@mail.gmail.com>
On Thu, May 14, 2020 at 7:28 PM Jacob Lifshay <programmerjake@gmail.com> wrote:
> (some types in Rust aren't allowed to have certain values so rustc exploits
> that fact to pack other information into those bytes to save space.
interesting! and scary :)
> I'm planning on attending the OpenPower virtual coffee call later today,
> and will try to make some progress on the load/store execution pipeline.
cool. my routine for a few days now:
bashing my head against the LD/ST FSM.... i do a little bit each morning,
scream loudly somewhere after lunch, and do a bit of ALU in the afternoon :)
> I may also work on a mul/div function unit, since Luke asked me to do that,
(btw i did popcount, if i can't stand the LD/ST FSM i'll try parity)
> though I think integer mul should be part of the fp mul pipeline since they
> can share multipliers, and integer div should be part of the
> fdiv/idiv/irem/udiv/urem/fsqrt/frsqrt ALU pipeline that I wrote a lot of
> previously.
yes. so the DIV pipeline would need to be set up to take minimum 64-bit wide
ints, even though FP64 only takes... 53(?) for the mantissa. likewise for MUL.
although a couple of things:
* i'd contemplated that there be some "hidden Function Units) and some
rewriting of Function.OP_xxxx into "micro-ops"... this is complex so is
off the "priority list"
* FP is also off the "critical priority" list for the 180nm test chip
* so is Partitioning
this drastically cuts down on complexity.
so although we can - and should - use the integer DIV ALU code that you wrote,
(and need to convert it to partitioning at some point) the partitioned
multiplier is
off the list.
this makes for a much simpler target and increases the chance of success for
our first test chip.
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 18:42 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
--- Comment #66 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #65)
> That makes a little more sense. Though if they're going to the trouble of
> making subf the way it is, you'd think they'd make this the same way.
>
> Oh well
sigh :)
i added popcount (because). it looks like it works except test_cmpb is
not working (which stops the simulation early), and if i comment it out,
the simulation popcount returns an integer, not a SelectableInt, so goes
skew-y. could you take a look?
--
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] daily kan-ban update 14may2020
From: Jacob Lifshay @ 2020-05-14 18:28 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxMq+A-8QNxn0obVU6M7Su=G4MMFfwfRHWuAPLGSpE8kw@mail.gmail.com>
I have been commenting on some of Rust's RFCs as well as on PyO3 issues:
link to my latest comment on forbidden values RFC:
https://github.com/rust-lang/rfcs/pull/2888#issuecomment-628789625
(some types in Rust aren't allowed to have certain values so rustc exploits
that fact to pack other information into those bytes to save space.
For example:
enum E {
A,
B,
C(bool),
}
will probably only take one byte by using the byte values 2 and 3 for A and
B since bool can only be 0 or 1)
I'm planning on attending the OpenPower virtual coffee call later today,
and will try to make some progress on the load/store execution pipeline.
I may also work on a mul/div function unit, since Luke asked me to do that,
though I think integer mul should be part of the fp mul pipeline since they
can share multipliers, and integer div should be part of the
fdiv/idiv/irem/udiv/urem/fsqrt/frsqrt ALU pipeline that I wrote a lot of
previously.
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
* [libre-riscv-dev] [Bug 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 17:29 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
--- Comment #65 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #64)
> (In reply to Luke Kenneth Casson Leighton from comment #63)
>
> > honestly: am clueless :)
>
> ah i think i might know why. as we found out in the PartitionedSignal
> GT / LT (etc) code, a comparator is much simpler than a full adder.
>
> it's only *because* we are using the output from the adder (actually,
> subtracter) - purely because it's there - that we're noticing the
> inversion.
>
> if however we had a totally separate Function Unit for CMP, we'd use
> the less-gates solution, and consequently could swap A and B over.
> then you'd never notice the difference :)
That makes a little more sense. Though if they're going to the trouble of
making subf the way it is, you'd think they'd make this the same way.
Oh 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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 17:14 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
--- Comment #64 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #63)
> honestly: am clueless :)
ah i think i might know why. as we found out in the PartitionedSignal
GT / LT (etc) code, a comparator is much simpler than a full adder.
it's only *because* we are using the output from the adder (actually,
subtracter) - purely because it's there - that we're noticing the
inversion.
if however we had a totally separate Function Unit for CMP, we'd use
the less-gates solution, and consequently could swap A and B over.
then you'd never notice the difference :)
--
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-14 16:54 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
--- Comment #63 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #59)
> *headdesk*
move the keyboard to the left, first...
> cmp is BACKWARDS!
:)
> (gdb) p/x $r1
> $1 = 0x40000000
> (gdb) p/x $r2
> $2 = 0x80000000
are ya having fun, yet?
> Why IBM, why did you do this?
hm i dunno... i mean... it could be justified if it's less code to check
+ve condition quicker than it is to check -ve condition or vice-versa.
then you would use sub for one and cmp for the other.
honestly: am clueless :)
--
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] daily kan-ban update 14may2020
From: Luke Kenneth Casson Leighton @ 2020-05-14 16:44 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <20200514174935.dfe49e5868c98ae9afc8f732@platen-software.de>
On Thu, May 14, 2020 at 4:49 PM Tobias Platen
<libre-soc@platen-software.de> wrote:
> Like Yesterday I am still working on the countzero.vhdl thing.
super. btw i noticed that countzero.vhdl is two cycles. feel free to
make the entire thing combinatorial (no use of sync). we need the
algorithm, working, first. making it faster by splitting across two
stages can be added later.
you'll see at line 98
https://github.com/antonblanchard/microwatt/blob/master/countzero.vhdl
that's a *synchronous* copy. don't do that. just make it a
combinatorial assignment.
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 16:35 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
--- Comment #62 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #61)
> i'll give this a shot, see what happens.
it worked! i'll do the formal proof output stage modifications
--
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-14 16:21 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
--- Comment #61 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #60)
> i wonder... i wonder if, rather than mess up the input stage *and* the
> main stage, which involves two 64-bit MUXes, if it would not be better
> to swap is_positive and is_negative in the *output* stage?
>
> this would only be QTY 2 single-bit MUXes
i'll give this a shot, see what happens.
--
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-14 16:17 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
--- Comment #60 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
sub pseudocode:
* subf RT,RA,RB (OE=0 Rc=0)
RT <- ¬(RA) + (RB) + 1
which is... b-a
and in alu/output_stage:
comb += self.o.cr0.eq(Cat(so, is_zero, is_positive, is_negative))
so bit 0 of CR0 is "is zero"
bit 1 is "is +ve"
bit 2 is "is -ve"
cmp pseudocode:
if L = 0 then
a <- EXTS((RA)[32:63] )
b <- EXTS((RB)[32:63])
else
a <- (RA)
b <- (RB)
if a < b then c <- 0b100
else if a > b then c <- 0b010
else c <- 0b001
CR[4*BF+32:4*BF+35] <- c || XER[SO]
and cmpi pseudocode:
if L = 0 then a <- EXTS((RA)[32:63])
else a <- (RA)
if a < EXTS(SI) then c <- 0b100
else if a > EXTS(SI) then c <- 0b010
else c <- 0b001
CR[4*BF+32:4*BF+35] <- c || XER[SO]
so that is *a* less than B/immediate, bit 2 (-ve) is set)
*a* greater than B/immediate, bit 1 (+ve) is set)
which is the opposite of add/subtract.
i presume this is best implemented by calculating "a-b" (rather than b-a).
note
in microwatt, there's comments at line 540 about this:
https://github.com/antonblanchard/microwatt/blob/master/execute1.vhdl
we can't invert the operands outside of the pipeline: that means
that the register port allocation system needs to have a "decoder" in it.
the inversion needs to be done *inside* the pipeline, not outside...
ok just checking alu/input_stage.py, ok yes that looks good.
i say "good", i mean "functional but messy as hell" :)
i wonder... i wonder if, rather than mess up the input stage *and* the
main stage, which involves two 64-bit MUXes, if it would not be better
to swap is_positive and is_negative in the *output* stage?
this would only be QTY 2 single-bit MUXes
--
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] daily kan-ban update 14may2020
From: Tobias Platen @ 2020-05-14 15:49 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <CAPweEDwiv05_Zw57=YVdxYNYHB=DyKdLayfvRxoNM3+qygrjTQ@mail.gmail.com>
Like Yesterday I am still working on the countzero.vhdl thing.
Tobias
On Thu, 14 May 2020 15:43:33 +0100
Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> On Thu, May 14, 2020 at 3:23 PM Michael Nolan <mtnolan2640@gmail.com> wrote:
>
> > Yesterday I worked on connecting the rotator from microwatt up to the
> > shift/rotate unit, fixing bugs in the rotator, and testing it.
>
> i'm amazed it worked, and also how elegant the microwatt rotator code is.
>
> > Today I might try working on comparisons, but I'm not sure whether they should
> > be a part of the alu or a separate FU
>
> i went through the list this morning, and left some TODOs.
>
> cmpb is different from cmp: cmp is definitely based on add (actually,
> subtract - but see the notes from execute1.vhdl):
> https://github.com/antonblanchard/microwatt/blob/master/execute1.vhdl#L540
>
> cmp is definitely arithmetic, however cmpb feels like it is a
> logical-thing (and is in fixedlogical)
> https://github.com/antonblanchard/microwatt/blob/master/execute1.vhdl#L657
> https://github.com/antonblanchard/microwatt/blob/master/ppc_fx_insns.vhdl#L735
> https://github.com/antonblanchard/microwatt/blob/master/helpers.vhdl#L117
>
>
> btw, you'll like this: because we are doing a parallel processor,
> different Function Units *can* actually cover multiple tasks :) let's
> not go into that right now, however if we convert power_enum Function
> into an unary field (1<<0, 1<<1, 1<<2) then we can, in the CSV files,
> set multiple bits.
>
> a good example would be AND and OR and XOR: those are prime candidates
> to put into *both* the Logical *and* Arithmetic pipelines. recorded
> it for now:
> https://bugs.libre-soc.org/show_bug.cgi?id=310
>
> l.
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
--
Tobias Platen <libre-soc[at]platen-software[dot]de>
_______________________________________________
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-14 15:34 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
--- Comment #59 from Michael Nolan <mtnolan2640@gmail.com> ---
*headdesk*
cmp is BACKWARDS!
The following will run both a subtract from and cmp and save their respective
updates to cr0 to r2 and r1 respectively:
li 6, 0x10
li 7, 0x05 # set up inputs
li 1, 0
mtcr 1 # clear cr
subf. 5, 6, 7
mfcr 2 # save cr to r2
mtcr 1 # clear cr again
cmpl cr0, 1, 6, 7 # This *should* give the same result as the subf
above
mfcr 1 # save cr to r1
(gdb) p/x $r1
$1 = 0x40000000
(gdb) p/x $r2
$2 = 0x80000000
Why IBM, why did you do this?
--
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 310] Function Units to cover multiple tasks
From: bugzilla-daemon @ 2020-05-14 14:59 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-310-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=310
--- Comment #2 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #1)
> On 5/14/20 10:43 AM, Luke Kenneth Casson Leighton wrote:
> > a good example would be AND and OR and XOR: those are prime candidates
> > to put into *both* the Logical *and* Arithmetic pipelines. recorded
> > it for now:
> > https://bugs.libre-soc.org/show_bug.cgi?id=310
>
>
> So this is sort of like what intel has on their processors. More complicated
> instructions can only execute on one port, but simple and frequently used
> ones can run on several.
yees, exaaactly :)
the Function Unit tracking (array of input latches plus corresponding
output latches) are there not just to be the front-ends to multiple
parallel copies of simple operations: they're there in case the complicated
ones start backing up.
an in-order processor is forced to stall if the complicated pipelines take
too long. even in microwatt, you can see "if operation == MUL or DIV, stall".
we can continue shoving out simple operations into *multiple* Function Units,
some of those, the ones that do not depend on the output of the
complicated instructions, can actually begin execution immediately.
however for the ones that *do* depend on the complicated ones we *continue
to shove them into Function Unit buffers/latches*.
the more FU latches available, the more we can "run ahead".
only when there is no FU latch available, *only then* does execution stall.
the problem comes if an FU Group has multiple functions, some of which can
cause blockage, some which do not. if that FU Group gets blocked and entirely
full (all FU register latches "waiting"), the next operation *will* cause
an execution stall.
to solve that: all you do is... make it possible for *another* FU Group
to do the exact same operation.
for simple operations this is perfectly fine.
this is why in an early iteration of LD/ST Comp Unit, it was capable of
performing ADD *and* it was capable of doing LD/ST. however POWER9 ADD
is a little more complex than just "ADD", so it wasn't appropriate to
add the carry-in/carry-out/ov/so to LD/ST Comp Unit just for that.
--
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-14 14:48 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
--- Comment #58 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
left some TODOs in the code this morning, UK time:
@@ -41,6 +41,12 @@ class LogicalMainStage(PipeModBase):
# TODO with m.Case(InternalOp.OP_POPCNT):
###### parity #######
# TODO with m.Case(InternalOp.OP_PRTY):
+ ###### cmpb #######
+ # TODO with m.Case(InternalOp.OP_CMPB):
+ ###### cntlz #######
+ # TODO with m.Case(InternalOp.OP_CNTZ):
+ ###### bpermd #######
+ # TODO with m.Case(InternalOp.OP_BPERM): - not in microwatt
and cmp because it is so similar to ADD should go in ALU
37 with m.Switch(self.i.ctx.op.insn_type):
38 #### CMP, CMPL ####
39 # TODO with m.Case(InternalOp.OP_CMP):
i've made the corresponding changes to power_enum Function (and to
the CSV files) already.
--
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 310] Function Units to cover multiple tasks
From: bugzilla-daemon @ 2020-05-14 14:47 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-310-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=310
Michael Nolan <mtnolan2640@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mtnolan2640@gmail.com
--- Comment #1 from Michael Nolan <mtnolan2640@gmail.com> ---
On 5/14/20 10:43 AM, Luke Kenneth Casson Leighton wrote:
> btw, you'll like this: because we are doing a parallel processor,
> different Function Units *can* actually cover multiple tasks let's
> not go into that right now, however if we convert power_enum Function
> into an unary field (1<<0, 1<<1, 1<<2) then we can, in the CSV files,
> set multiple bits.
>
> a good example would be AND and OR and XOR: those are prime candidates
> to put into *both* the Logical *and* Arithmetic pipelines. recorded
> it for now:
> https://bugs.libre-soc.org/show_bug.cgi?id=310
So this is sort of like what intel has on their processors. More complicated
instructions can only execute on one port, but simple and frequently used ones
can run on several.
--
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] daily kan-ban update 14may2020
From: Luke Kenneth Casson Leighton @ 2020-05-14 14:43 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <3a840394-8aa6-a597-093b-07af336a68d0@gmail.com>
On Thu, May 14, 2020 at 3:23 PM Michael Nolan <mtnolan2640@gmail.com> wrote:
> Yesterday I worked on connecting the rotator from microwatt up to the
> shift/rotate unit, fixing bugs in the rotator, and testing it.
i'm amazed it worked, and also how elegant the microwatt rotator code is.
> Today I might try working on comparisons, but I'm not sure whether they should
> be a part of the alu or a separate FU
i went through the list this morning, and left some TODOs.
cmpb is different from cmp: cmp is definitely based on add (actually,
subtract - but see the notes from execute1.vhdl):
https://github.com/antonblanchard/microwatt/blob/master/execute1.vhdl#L540
cmp is definitely arithmetic, however cmpb feels like it is a
logical-thing (and is in fixedlogical)
https://github.com/antonblanchard/microwatt/blob/master/execute1.vhdl#L657
https://github.com/antonblanchard/microwatt/blob/master/ppc_fx_insns.vhdl#L735
https://github.com/antonblanchard/microwatt/blob/master/helpers.vhdl#L117
btw, you'll like this: because we are doing a parallel processor,
different Function Units *can* actually cover multiple tasks :) let's
not go into that right now, however if we convert power_enum Function
into an unary field (1<<0, 1<<1, 1<<2) then we can, in the CSV files,
set multiple bits.
a good example would be AND and OR and XOR: those are prime candidates
to put into *both* the Logical *and* Arithmetic pipelines. recorded
it for now:
https://bugs.libre-soc.org/show_bug.cgi?id=310
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 14:37 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=310
--
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 310] Function Units to cover multiple tasks
From: bugzilla-daemon @ 2020-05-14 14:37 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-310-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=310
Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|--- |Lowest
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 310] New: Function Units to cover multiple tasks
From: bugzilla-daemon @ 2020-05-14 14:37 UTC (permalink / raw)
To: libre-riscv-dev
https://bugs.libre-soc.org/show_bug.cgi?id=310
Bug ID: 310
Summary: Function Units to cover multiple tasks
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: PC
OS: Linux
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: ---
* power_enum Function converts to unary values (1/2/4/8...)
* CSV files "Function" column sets multiple bits
* ALU / Logical / etc. (as appropriate) covers *MULTIPLE* operations
(switch statements), with duplicated logic.
this gives parallel operations and more opportunities for operations
to wait in line.
--
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] daily kan-ban update 14may2020
From: Michael Nolan @ 2020-05-14 14:23 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <CAPweEDxMq+A-8QNxn0obVU6M7Su=G4MMFfwfRHWuAPLGSpE8kw@mail.gmail.com>
Yesterday I worked on connecting the rotator from microwatt up to the
shift/rotate unit, fixing bugs in the rotator, and testing it. Today I
might try working on comparisons, but I'm not sure whether they should
be a part of the alu or a separate FU
--Michael
_______________________________________________
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] daily kan-ban update 14may2020
From: Luke Kenneth Casson Leighton @ 2020-05-14 10:54 UTC (permalink / raw)
To: Libre-RISCV General Development
yesterday, i looked (again) at the address-acknowledgement of
LDSTCompUnit - i think i have a handle on it. i also helped Michael
with the ALU pipelines, split out Logical operations. also reviewed
the MarketNext article (which we are pushed for time to review).
today - more LDSTCompUnit, which is challenging - and probably
(because it's so much easier) keep reviewing and going over the ALU
code.
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-14 0:20 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
--- Comment #57 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=de6e2485dff057322f6686ddeba6458b63a47159
ah well spotted, the correct field
--
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] popcount and parity
From: Luke Kenneth Casson Leighton @ 2020-05-13 22:20 UTC (permalink / raw)
To: Libre-RISCV General Development
jacob would you like to do popcount and parity, i remember you
mentioned a "best work" algorithm somewhere (referenced a wikipedia
page)? it resonated with me that it might be nice to add a general
class (of some kind) to nmutil for use in doing things like... ooo....
popcount.
here's where the two functions are in microwatt, feel free to use this
as a guide:
https://github.com/antonblanchard/microwatt/blob/master/logical.vhdl
and here's where they need to go in the logical pipeline:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/logical/main_stage.py;h=622216bbf5c8d9f80e1ad04f0903f5b27e0f7102;hb=HEAD#l41
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
page: next prev 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