Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] [Bug 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 17:51 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

--- Comment #31 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Michael Nolan from comment #30)

> I'm taking a look at regfile.py as well as the proof. Part of the reason you
> see everything failing is that the truth table in the proof isn't right; the
> register file doesn't have a defined output when read enable is low. I have
> an idea as to how to prove that register writes work, would you like me to
> write it or leave it up to you?

Actually, it turned out that the register file wasn't generating read and write
ports.

-- 
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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 17:52 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

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

> I'm taking a look at regfile.py as well as the proof. Part of the reason you
> see everything failing is that the truth table in the proof isn't right; the
> register file doesn't have a defined output when read enable is low.

the default - because it is combinatorial - will be that the output is
zero when read-enable is low.  we rely on this when it comes to multiple
registers (later) because those zeros are OR-cascaded together (using
ortreereduce) to create the output.

> I have
> an idea as to how to prove that register writes work, would you like me to
> write it?

yes please.  we really need to move on, fast.  RegFileArray *should* be
a lot easier to write (if using the Register as the base)

-- 
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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 17:53 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

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

> the default - because it is combinatorial - will be that the output is
> zero when read-enable is low.  we rely on this when it comes to multiple
> registers (later) because those zeros are OR-cascaded together (using
> ortreereduce) to create the output.

This has been fixed

> 
> yes please.  we really need to move on, fast.  RegFileArray *should* be
> a lot easier to write (if using the Register as the base)

Done.

-- 
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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 17:55 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

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

> Actually, it turned out that the register file wasn't generating read and
> write ports.

thank you for sorting 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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 18:06 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

--- Comment #35 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #34)
> (In reply to Michael Nolan from comment #31)
> 
> > Actually, it turned out that the register file wasn't generating read and
> > write ports.
> 
> thank you for sorting that.

Thanks so much Michael, more material for me to learn from :)

-- 
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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 18:07 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

--- Comment #36 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Cesar Strauss from comment #29)
> (In reply to Luke Kenneth Casson Leighton from comment #27)
> > basically i have no idea what i am doing with Formal Proofs.  i can read
> > them, i can *maybe* spot omissions once they're written, and i can just about
> > manage combinatorial ones.  these sync/time-based ones: really no idea.
> 
> Hi Luke,
> 
> As I learned about formal verification, I found the initial slides of
> http://www.clifford.at/papers/2017/smtbmc-sby/slides.pdf very enlightening
> for basic concepts. See for instance slides 6 to 16.
> 
> (In reply to Luke Kenneth Casson Leighton from comment #28)
> > https://zipcpu.com/blog/2018/03/10/induction-exercise.html
> > 
> > all i can say is: argh :)
> 
> This illustrates the difficulties in induction proofs.
> 
> It is apparent, from the circuit, that the two shift-registers will be equal
> for all time, so the XOR output will be always zero.
> 
> However, bounded model check can only check for a finite number of cycles.
> To prove it for all time, you prove it that, whenever the assertions hold
> for n cycles, it will hold for the n+1 cycle.
> 
> The problem with induction, is that it does not start with the initial state
> (see slide 11). So, the "initial" state can be in the unreachable state area
> (see slide 9).
> 
> In the example, an initial state in which the shift register are different,
> is unreachable. But the proof checker does not know that. So, it can choose
> an initial state where the last bit is equal, passing the assertion, but the
> next-to-last bit is different.
>  
> Then, it holds the shift enable de-asserted for n cycles and asserts it for
> the n+1 cycle, finally shifting out the differing bits. So, it passes for n
> cycles, but fails in n+1.
> 
> The easy way to solve this is to assert that the shift register contents are
> always equal.
> 
> Another way is limiting the time in which the shift-enable can be kept
> de-asserted. This is done with an assumption.
> 
> Without an assumption, the proof checker is free to toggle any unconnected
> input signal, in the most perverse way possible, to make the proof fail. In
> reality, the input signals must obey some protocol. For instance, you tell
> the proof checker that it must keep (assume) issue_i low whenever busy_o is
> high. Otherwise it would be free to assert issue_i in the middle of a busy_o
> cycle, which it's a violation of the protocol.
> 
> Hope it helps,
> 
> Cesar

Thank you very much for sharing this to help me Cesar, it's super helpful, and
I'm incredibly grateful for your help.

Cole

-- 
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 339] create POWER9 ROTATE (SHIFTROT) pipeline
From: bugzilla-daemon @ 2020-06-01 18:09 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-339-13@https.bugs.libre-soc.org/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|lkcl@lkcl.net               |mtnolan2640@gmail.com

--- Comment #4 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
michael, i need your help, here: sraw "works" in shift_rot/test_pipe_caller.py
only because carry isn't being checked in the test.  i'm not sure if it's
being set in the simulator?

* sraw RA,RS,RB (Rc=0)
* sraw.  RA,RS,RB (Rc=1)

    n <- (RB)[59:63]
    r <- ROTL32((RS)[32:63], 64-n)
    if (RB)[58] = 0 then
        m <-  MASK(n+32, 63)
    else m <- [0]*64
    s <- (RS)[32]
    RA <- r&m | ([s]*64)& ¬m
    carry <-  s & ((r&¬m)[32:63] != 0)
    CA    <-  carry
    CA32  <-  carry

Special Registers Altered:

    CA CA32
    CR0                    (if Rc=1)


* srawi RA,RS,SH (Rc=0)
* srawi.  RA,RS,SH (Rc=1)

    n <- SH
    r <- ROTL32((RS)[32:63], 64-n)
    m <- MASK(n+32, 63)
    s <- (RS)[32]
    RA <- r&m | ([s]*64)& ¬m
    carry <- s & ((r&¬m)[32:63] != 0)
    CA    <- carry
    CA32  <- carry

Special Registers Altered:

    CA CA32
    CR0                    (if Rc=1)

-- 
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 01jun2020
From: Cole Poirier @ 2020-06-01 18:30 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: libre-riscv-dev
In-Reply-To: <20200601182035.50488196a3d82bfe0ddcaf55@platen-software.de>

Yesterday:

Started reading the materials on proofs provided by Luke and Cesar,
apologies, I should have communicated this on the bug report, however,
given that I was struggling I'm very grateful to Michael for taking it
over and finishing it. This, like Michael's fixing of proof_bpermd
really, really helps me learn because since I've already made several
attempts on my own(ish), I can see 'the path forward' to what I should
have done. I want to be able to contribute more than I currently am,
but, I'm realizing that unfortunately I have to learn to crawl before I
can walk then run. I've started the journey at least, and I learn many
new things every day.

Today:

If proof_regfile/Register is done, should I try writing
proof_regfile/Regfile? or if Michael is doing this, I volunteer to work
on TRAP and/or SYS instructions.

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] daily kan-ban update 01jun2020
From: Luke Kenneth Casson Leighton @ 2020-06-01 18:33 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <17FDD266-C7B5-4DB2-A722-9B4C44CA9E01@getmailspring.com>

On Mon, Jun 1, 2020 at 7:30 PM Cole Poirier <colepoirier@gmail.com> wrote:

> attempts on my own(ish), I can see 'the path forward' to what I should
> have done. I want to be able to contribute more than I currently am,
> but, I'm realizing that unfortunately I have to learn to crawl before I
> can walk then run.

you're braver than i am.  i can contribute small additions to proofs.

> I've started the journey at least, and I learn many
> new things every day.

:)

> Today:
>
> If proof_regfile/Register is done, should I try writing
> proof_regfile/Regfile? or if Michael is doing this, I volunteer to work
> on TRAP and/or SYS instructions.

TRAP, SYS and SPR are a higher priority at the moment.

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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-06-01 18:35 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-353-13@https.bugs.libre-soc.org/>

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

--- Comment #37 from Michael Nolan <mtnolan2640@gmail.com> ---
Aha, I knew something was fishy. The inputs should have been AnySeq not
AnyConst. Because it's a sequential circuit, they should be able to change on
any cycle (to be able to read or write and such)

-- 
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 01jun2020
From: Michael Nolan @ 2020-06-01 18:54 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <17FDD266-C7B5-4DB2-A722-9B4C44CA9E01@getmailspring.com>

On 6/1/20 2:30 PM, Cole Poirier wrote:
> I want to be able to contribute more than I currently am,
> but, I'm realizing that unfortunately I have to learn to crawl before I
> can walk then run. I've started the journey at least, and I learn many
> new things every day.
Formal stuff is hard, it took me a while to figure out what I was doing 
when I first tried to learn it (back in 2016). Just keep trying, you'll 
eventually get it.
>
> Today:
>
> If proof_regfile/Register is done, should I try writing
> proof_regfile/Regfile? or if Michael is doing this, I volunteer to work
> on TRAP and/or SYS instructions.

I've got a proof for RegFileArray which shouldn't be too hard to modify 
for RegFile.


_______________________________________________
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 01jun2020
From: Luke Kenneth Casson Leighton @ 2020-06-01 19:02 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <d3f6668a-8e9c-035b-0a55-1154a7da6241@gmail.com>

On Mon, Jun 1, 2020 at 7:54 PM Michael Nolan <mtnolan2640@gmail.com> wrote:

> I've got a proof for RegFileArray which shouldn't be too hard to modify
> for RegFile.

go for it.  btw, just so you know: because the wen is unary,
RegFileArray technically can do broadcast (multiple bit-enables:
effectively VSPLAT), and ren (effectively) is an ORing of all enabled
bits.  i doubt however that we'll use broadcast-ren

if you've some time, i could really use your help on sraw, and also
"rlwinm." - the CR0 version of "rlwinm".
https://bugs.libre-soc.org/show_bug.cgi?id=339

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] daily kan-ban update 01jun2020
From: Cole Poirier @ 2020-06-01 19:03 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
In-Reply-To: <CAPweEDyrBgT7ueqHAZva6YuZRpXJrv_xnswFuv9k4nv0R8wTNw@mail.gmail.com>

On Jun 1 2020, at 11:33 am, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> On Mon, Jun 1, 2020 at 7:30 PM Cole Poirier <colepoirier@gmail.com> wrote:
> 
>> attempts on my own(ish), I can see 'the path forward' to what I should
>> have done. I want to be able to contribute more than I currently am,
>> but, I'm realizing that unfortunately I have to learn to crawl before I
>> can walk then run.
> 
> you're braver than i am.  i can contribute small additions to proofs.

Thanks Luke, being with you on this perilous journey makes it much more
fun :)
 
>> I've started the journey at least, and I learn many
>> new things every day.
> 
> :)
> 
>> Today:
>> 
>> If proof_regfile/Register is done, should I try writing
>> proof_regfile/Regfile? or if Michael is doing this, I volunteer to work
>> on TRAP and/or SYS instructions.
> 
> TRAP, SYS and SPR are a higher priority at the moment.
> 
> l.

Should I work on the #TODOs in fu/trap/main_stage.py? Or is there
another file I should work on instead?

On Jun 1 2020, at 11:54 am, Michael Nolan <mtnolan2640@gmail.com> wrote:
>
> I've got a proof for RegFileArray which shouldn't be too hard to
> modify for RegFile.

Awesome! I'm excited to learn from it!

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

* [libre-riscv-dev] [Bug 325] create POWER9 TRAP pipeline
From: bugzilla-daemon @ 2020-06-01 19:05 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-325-13@https.bugs.libre-soc.org/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|mtnolan2640@gmail.com       |colepoirier@gmail.com

-- 
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 01jun2020
From: Luke Kenneth Casson Leighton @ 2020-06-01 19:05 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <0D2F440B-EB45-4B1E-804A-36AB40213914@getmailspring.com>

On Mon, Jun 1, 2020 at 8:03 PM Cole Poirier <colepoirier@gmail.com> wrote:

> Should I work on the #TODOs in fu/trap/main_stage.py?

go for it.  check the bugreport, discuss there
https://bugs.libre-soc.org/show_bug.cgi?id=325

_______________________________________________
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 300] Documentation for the SOC
From: bugzilla-daemon @ 2020-06-01 19:16 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-300-13@https.bugs.libre-soc.org/>

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

Cole Poirier <colepoirier@gmail.com> changed:

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

--- Comment #3 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Jacob Lifshay from comment #2)
> deferred till after oct tapeout

Just noticed this when searching for the Power9 TRAP Pipeline bug report. I
want to leave a note for the deferred discussion.

I think that I should work with Yehowshua on the documentation, when the time
is right, because I have the unique (for now, hopefully we will have more noobs
join) perspective of understanding very little prior to interacting with the
project, so I think I'll be able to help make the documentation more novice
friendly.

-- 
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 339] create POWER9 ROTATE (SHIFTROT) pipeline
From: bugzilla-daemon @ 2020-06-01 19:31 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-339-13@https.bugs.libre-soc.org/>

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

--- Comment #5 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #4)
> michael, i need your help, here: sraw "works" in
> shift_rot/test_pipe_caller.py
> only because carry isn't being checked in the test.  i'm not sure if it's
> being set in the simulator?

>     s <- (RS)[32]
>     RA <- r&m | ([s]*64)& ¬m
>     carry <-  s & ((r&¬m)[32:63] != 0)
>     CA    <-  carry
>     CA32  <-  carry
> 
> Special Registers Altered:
> 
>     CA CA32
>     CR0                    (if Rc=1)


Hmm. So the way carry gets set currently in test_pipe_caller.py is that it
completely ignores modifications to the carry flag from the pseudocode and
instead updates it based on the inputs and outputs. This is because for the
arithmetic instructions (add/sub with carry), they don't actually set the carry
flag in the pseudocode. However, it seems that the shift instructions do have
pseudocode explicitly setting CA and CA32. I think parser.py should do
something to instruction_info to tell caller.py to use the carry flag from the
instruction globals and not generate one from the inputs and outputs. What
would be the best way of going about this, does it fit with one of the existing
fields?

-- 
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 339] create POWER9 ROTATE (SHIFTROT) pipeline
From: bugzilla-daemon @ 2020-06-01 20:13 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-339-13@https.bugs.libre-soc.org/>

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

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

> carry flag in the pseudocode. However, it seems that the shift instructions
> do have pseudocode explicitly setting CA and CA32. I think parser.py should
> do something to instruction_info to tell caller.py to use the carry flag
> from the instruction globals and not generate one from the inputs and
> outputs. What would be the best way of going about this, does it fit with
> one of the existing fields?

it appears to be a special case, just for sraw etc.

i would be inclined to suggest allowing CA and CA32 to be picked up as output
parameters then if spotted in the outputs the values put into corresponding XER
fields.

otherwise we need to do some messing about.

although... when i looked at the pseudicode it looked very much like it was
simply doing 32 bit carry i.e. bit 31 was detected as sign then 32 and above
nonzero is "carry".

-- 
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 339] create POWER9 ROTATE (SHIFTROT) pipeline
From: bugzilla-daemon @ 2020-06-01 20:17 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-339-13@https.bugs.libre-soc.org/>

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

--- Comment #7 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
sradi is different

carry <- s & ((r& ¬m) != 0) CA <- carry CA32 <- carry

best add CA and CA32 to the fields that can be returned.

-- 
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-06-01 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 #41 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
bctar bcctr and bclr need to be added as unit tests.  bclr fails at the moment:

  File "fu/branch/test/test_pipe_caller.py", line 208, in assert_outputs
    self.assertEqual(branch_taken, sim_branch_taken, code)
AssertionError: 1 != False : bclr 0, 5, 0

-- 
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 360] move RS to 1st or 2nd operand in CSV files
From: bugzilla-daemon @ 2020-06-01 21:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-360-13@https.bugs.libre-soc.org/>

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

--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
turns out we can't do this for SHIFT_ROT but it can be done for:

* CR (for MTCRF)
* ALU (for EXTS)
* Logical (for a bunch of stuff)

-- 
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 336] ALU CompUnit needs to recognise that RA (src1) can be zero
From: bugzilla-daemon @ 2020-06-01 21:50 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-336-13@https.bugs.libre-soc.org/>

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

--- Comment #46 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #45)
> (In reply to Cesar Strauss from comment #43)
> 
> > So rdmask, as an input, must be driven and held high, for all the time that
> > busy_o is active?
> 
> yes - for now.  i will look into whether (and how, and if) it should be
> moved into CompXXXOpSubsets (into oper_i).

just fyi, Cesar:

https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/alu/pipe_data.py;h=33f54b026b95e06860a9f8b6a9a1b2797fdd59ee;hb=93fb5e930101a3bbb317e6180fc598f56b43cb9c#l67

line 67 (right at the end).  there's a function, "rdflags", which is there for
all soc.fu.*.pipe_data.py and it will be called by the Decoder and passed the
data structure (Decode2Execute1Type) which has all of the information, from
the actual instruction, about which register file ports (rd.req[0-N]) should
be activated.

it has to be done from the Decoder because only the Decoder (PowerDecode2) has
the relevant information.

but... what PowerDecode2 *doesn't* know is the order of the regfile ports
at the Function Unit... so... the function "rdflags" defines 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 336] ALU CompUnit needs to recognise that RA (src1) can be zero
From: bugzilla-daemon @ 2020-06-01 22:04 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-336-13@https.bugs.libre-soc.org/>

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

--- Comment #47 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
I've updated the Documentation, here:

https://libre-soc.org/3d_gpu/architecture/decoder/

-- 
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] [OpenPOWER-HDL-Cores] microwatt decoder tables: M-Form and X-Form switched RS and RB
From: Paul Mackerras @ 2020-06-01 23:13 UTC (permalink / raw)
  To: Luke Kenneth Casson Leighton
  Cc: openpower-hdl-cores, Libre-RISCV General Development
In-Reply-To: <CAPweEDz9S=HXwnZqiQ9YtsiseGw6Do5qJnPE9kCjSjmozTWqVQ@mail.gmail.com>

Hi Luke,

On Mon, Jun 01, 2020 at 01:20:45PM +0100, Luke Kenneth Casson Leighton wrote:
> anton, paul, and team, hi,
> 
> we noticed that in microwatt decode1.vhdl tables, M-Form has:
> 
> * op1 is RA
> * op2 is a constant or RB, which is in the *3rd* field (M-Form) position
> * op3 is RS, which is in the *second* Form position
> 
> where in X-Form it is:
> 
> * op1 is RA
> * op2 is a constant or RB, where RB is from the *2nd* field
> * op3 is RS (or RC), which is in the 3rd position.

I'm not quite following, sorry.  When you talk about the second or
third position or field, are you talking about where they are in the
instruction word (and if so, are you counting left to right, or right
to left), or are you talking about the input_reg_a/b/c entries in
microwatt's decode tables?

If you're talking about positions in the instruction word, then either
I'm misunderstanding your paragraph about X-form above, or it is
incorrect, because instructions such as "and" and "or" take their
inputs from RS and RB, so op1 is not RA for them, though it is for the
arithmetic instructions.

(I asked some of the original Power architects why there was this
nonuniformity in the Power ISA where rotate and logical instructions
use RS and RB as their inputs, whereas arithmetic instructions use RA
and RB as inputs.  The answer was that in the Power1 implementation,
they were very short of gates, so they made the logic for rotating and
masking data for store instructions also serve as the logic for doing
the rotate and mask instructions.  Since stores take their data from
RS, that meant that the rotate and shift instructions also took the
data to be rotated or shifted from RS.)

Regards,
Paul.

_______________________________________________
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 358] new MCU-ALU test picked up RC / OE / CR handling issue
From: bugzilla-daemon @ 2020-06-01 23:24 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-358-13@https.bugs.libre-soc.org/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

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