Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] [Bug 325] create POWER9 TRAP pipeline
From: bugzilla-daemon @ 2020-05-19 18:09 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

Michael Nolan <mtnolan2640@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|lkcl@lkcl.net               |mtnolan2640@gmail.com
                 CC|                            |mtnolan2640@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

* [libre-riscv-dev] [Bug 325] create POWER9 TRAP pipeline
From: bugzilla-daemon @ 2020-05-19 18:13 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

--- Comment #5 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #4)
> I think this should also cover interrupts.
> 
> I would suggest having the execution unit be a FSM since traps/interrupts
> are rare, so the FSM is not activated unless a trap/interrupt is taken. When
> we receive an external interrupt, we could switch the decoder to insert a
> special trap instruction instead of decoding normally.

traps are stunningly simple, the only thing they do is change the MSR and NIA
(program counter).  and change SRR0 and SRR1. it is hardly even an FSM :)

i like the interrupt idea, i believe it is kinda expected to do this.

l.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-19 18:30 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 #23 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
i looked more closely at the difference between branch, sys and trap, and rheir
combination would be a massive EIGHT incoming register ports.

* RA, RB, CR, MSR for trap
* 2x SPRs, MSR for syscalls
* 2x SPRs, no MSR for branches

this is too much.

i had assumed that MSR was a SPR, it isn't.

so the number of SPRs for branch can be reduced to 2.  spr3 can be deleted.

-- 
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] priority encoder replacement
From: Luke Kenneth Casson Leighton @ 2020-05-19 18:46 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD7L50z=L7grJ4U=Kewyqi3ix7z-f5L7eb7AgBna_Nxm8w@mail.gmail.com>

On Tuesday, May 19, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:


>
>
> If clz is strictly better, replace PriorityEncoder with clz, or just change
> clz to match PriorityEncoder's interface and rename it PriorityEncoder,
> deleting the old one.


it does have some subtle differences, PE sets a flag when the input is
entirely zero.

i do not believe there is an offbyone.  PE will set its output to 0 if bit
0 is 1.  output is 1 if input is 0bxxx10 which is pretty much the
definition of CLZ.

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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-19 19:16 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #49 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Michael Nolan from comment #48)
> Cole, since your module passes your formal proof, I think it might be a good
> idea to try hooking it up to the logical pipeline, and adding a test for it.
> 
> To hook it up, you're going to want to open up logical/main_stage.py and
> take a look at what's there for OP_CNTZ. You're going to want to do
> something similar to that for OP_BPERM using your Bpermd module.
> 
> To add a test for bperm, you'll want to open up
> logical/test/test_pipe_caller.py and duplicate the function `test_cmpb`.
> You'd then want to modify this copy to have a different name, execute the
> bpermd instruction instead of cmpb, and possibly have different data for
> registers 1 and 2. Again, happy to help if you get stuck

Sure that sounds like a good plan. I was planning on taking the proof luke
provided yesterday, and trying to speed it up by using an Array() as he
suggested instead of nested [i][j] for loops. Should I try connecting the
module or making the proof modification first? And thank you again for your
extreme generosity in offering to help, and in all the help you've given me so
far :)

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-19 19:24 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #50 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Cole Poirier from comment #49) 
> I was planning on taking the proof luke
> provided yesterday, and trying to speed it up by using an Array() as he
> suggested instead of nested [i][j] for loops. Should I try connecting the
> module or making the proof modification first? And thank you again for your
> extreme generosity in offering to help, and in all the help you've given me
> so far :)

I'm not sure I would. To me, a proof should be as simple as possible to
understand, because you need to be able to check the proof against the
specification. The existing proof is clear enough to allow it to be checked
against the pseudocode, and doesn't take an inordinate amount of time, so I
think it's fine to leave it as is.

So yeah, I'd say try hooking it up to main_stage and adding a test for it would
be better than trying to "optimize" the proof. Especially since there's a bug
in the module that the proof hasn't revealed (hint: it has to do with power's
numbering of bits).

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-19 19:30 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #51 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Michael Nolan from comment #50)
> I'm not sure I would. To me, a proof should be as simple as possible to
> understand, because you need to be able to check the proof against the
> specification. The existing proof is clear enough to allow it to be checked
> against the pseudocode, and doesn't take an inordinate amount of time, so I
> think it's fine to leave it as is.

Makes sense to me!

> So yeah, I'd say try hooking it up to main_stage and adding a test for it
> would be better than trying to "optimize" the proof. Especially since
> there's a bug in the module that the proof hasn't revealed (hint: it has to
> do with power's numbering of bits).

Is this the big-endian comment you left in the pseudo-code? Is that documented
in the spec? Looking at POWERISA v3.1 doesn't look like it notes this, unless
there is some esoteric notation that denotes this? Or POWERISA is just always
big-endian?

-- 
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 19may2020
From: Cole Poirier @ 2020-05-19 20:17 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
In-Reply-To: <CAPweEDzkRvwmA=+T6fiyGHoWVQD6D_R+bxtfMy5j0SWyBUSOJw@mail.gmail.com>

Today I am going to attempt to try hooking up the bperm.py module to the
logical pipeline and adding a test for it, using logical/main_stage.py's
OP_CNTZ as a model for OP_BPERM and logical/test/test_pipe_caller.py's
test_cmpb as a model for test_bperm.

Thank you very much for the confidence boost on the formal proof
yesterday Luke, it was very, very helpful.

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-05-19 20:43 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

--- Comment #6 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
* did the usual code-morphs blah blah just to make me feel happy
  (and also so i know what the code is doing, so i feel confident
  when it comes to connecting it up).

  i'm done with that :)

* branch's data structure uses Data to indicate when things
  are updated.  i felt it might be sensible to keep a consistent
  API so did the same thing to Trap's data structure.

  thus, o.nia.ok, o.srr0.ok and o.srr1.ok are all set to 1
  when the trap signals "go"

  these signals, for the two SPRs, can be wired directly to
  the FunctionUnit "WRITE_REQUEST" signals with no additional
  logic needed for decoding the operand at the FunctionUnit.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-19 21:02 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 #24 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ehn?  any clues, michael?

```
Traceback (most recent call last):
  File "fu/branch/test/test_pipe_caller.py", line 134, in run_all
    sim = Simulator(m)
  File "/home/lkcl/src/libresoc/nmigen/nmigen/back/pysim.py", line 935, in
__init__
    self._fragment = Fragment.get(fragment, platform=None).prepare()
  File "/home/lkcl/src/libresoc/nmigen/nmigen/hdl/ir.py", line 39, in get
    obj = obj.elaborate(platform)
  File "/home/lkcl/src/libresoc/nmigen/nmigen/hdl/dsl.py", line 537, in
elaborate
    fragment.add_subfragment(Fragment.get(self._named_submodules[name],
platform), name)
  File "/home/lkcl/src/libresoc/nmigen/nmigen/hdl/ir.py", line 39, in get
    obj = obj.elaborate(platform)
  File "/home/lkcl/src/libresoc/nmigen/nmigen/hdl/dsl.py", line 537, in
elaborate
    fragment.add_subfragment(Fragment.get(self._named_submodules[name],
platform), name)
  File "/home/lkcl/src/libresoc/nmigen/nmigen/hdl/ir.py", line 39, in get
    obj = obj.elaborate(platform)
  File "/home/lkcl/src/libresoc/soc/src/soc/decoder/power_decoder.py", line
315, in elaborate
    m = PowerDecoder.elaborate(self, platform)
  File "/home/lkcl/src/libresoc/soc/src/soc/decoder/power_decoder.py", line
262, in elaborate
    comb += self.op._eq(row)
  File "/home/lkcl/src/libresoc/soc/src/soc/decoder/power_decoder.py", line
139, in _eq
    self.internal_op.eq(InternalOp[row['internal op']]),
  File "/usr/lib/python3.7/enum.py", line 351, in __getitem__
    return cls._member_map_[name]
KeyError: 'OP_TDI'
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-19 21:06 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 #25 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
nggggh submodules is beginning to piss me off.  git silently failed and
refused to note that the submodule had been changed.  nothing reported
by "git diff", nothing reported by "git submodule" - nothing.

-- 
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] [Bug 313] Create Branch Pipeline for POWER9
From: Jacob Lifshay @ 2020-05-19 21:09 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <bug-313-13-lKqEaNzuOX@https.bugs.libre-soc.org/>

On Tue, May 19, 2020, 14:06 <bugzilla-daemon@libre-soc.org> wrote:

> https://bugs.libre-soc.org/show_bug.cgi?id=313
>
> --- Comment #25 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
> nggggh submodules is beginning to piss me off.  git silently failed and
> refused to note that the submodule had been changed.  nothing reported
> by "git diff", nothing reported by "git submodule" - nothing.


more reasons for a monorepo!
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

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

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

--- Comment #26 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
added OP_RFID it seemed to be missing?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-19 21:19 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 #27 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #25)
> nggggh submodules is beginning to piss me off.  git silently failed and
> refused to note that the submodule had been changed.  nothing reported
> by "git diff", nothing reported by "git submodule" - nothing.

Yep... I haven't had that happen to me yet, but it's pissing me off too.

I removed the opcodes OP_TDI, OP_TD, OP_TWI, OP_TW and replaced them with
OP_TRAP

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-19 21:22 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

Jacob Lifshay <programmerjake@gmail.com> changed:

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

--- Comment #28 from Jacob Lifshay <programmerjake@gmail.com> ---
(In reply to Michael Nolan from comment #27)
> (In reply to Luke Kenneth Casson Leighton from comment #25)
> > nggggh submodules is beginning to piss me off.  git silently failed and
> > refused to note that the submodule had been changed.  nothing reported
> > by "git diff", nothing reported by "git submodule" - nothing.
> 
> Yep... I haven't had that happen to me yet, but it's pissing me off too.

We definitely should move to a monorepo

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

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

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

--- Comment #29 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #28)
> (In reply to Michael Nolan from comment #27)

> > Yep... I haven't had that happen to me yet, but it's pissing me off too.
> 
> We definitely should move to a monorepo

no.  that sends the wrong message, unfortunately [it says, very loudly, "other
specific focussed alternative uses for our work not welcome, in the slightest. 
download our monorepo containing everything you don't want or need, and like
it.  or Go Home.  we don't care"]

when you have time, look up the nightmare of freeswitch ignoring standard
development practices when it comes to dependency management.

the intention of having the csv and isatables in the wiki is to make it clear
that they are independently useable *outside* of our project.

without requiring gigabyte additional downloads and dependencies which we need
but they most certainly do not.

really they should be split out of the wiki entirely, to make it *really* clear
that they are nothing to do with soc *or* libresoc.

it is just submodules pissing me off as i am not used to active development
with them.

i'll get over 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 313] Create Branch Pipeline for POWER9
From: bugzilla-daemon @ 2020-05-19 21:44 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 #30 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #27)

> Yep... I haven't had that happen to me yet, but it's pissing me off too.

i keep forgetting to do "git submodule update " after every git pull.

i think i will write a shell script which does both pull and update.

hmm i wonder... maybe it should be added as a git hook

> I removed the opcodes OP_TDI, OP_TD, OP_TWI, OP_TW and replaced them with
> OP_TRAP

i saw.  i added OP_RFID to enums.  rhat was missing.

-- 
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 325] create POWER9 TRAP pipeline
From: bugzilla-daemon @ 2020-05-19 23:19 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

--- Comment #7 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> (In reply to Jacob Lifshay from comment #4)
> > I think this should also cover interrupts.
> > 
> > I would suggest having the execution unit be a FSM since traps/interrupts
> > are rare, so the FSM is not activated unless a trap/interrupt is taken. When
> > we receive an external interrupt, we could switch the decoder to insert a
> > special trap instruction instead of decoding normally.
> 
> traps are stunningly simple, the only thing they do is change the MSR and
> NIA (program counter).  and change SRR0 and SRR1. it is hardly even an FSM :)
> 
> i like the interrupt idea, i believe it is kinda expected to do this.

hints of this technique:

irq_valid := '0';
if ctrl.msr(MSR_EE) = '1' then
    if ctrl.dec(63) = '1' then
        ctrl_tmp.irq_nia <= std_logic_vector(to_unsigned(16#900#, 64));
        report "IRQ valid: DEC";
        irq_valid := '1';
    elsif i_in.irq = '1' then
        ctrl_tmp.irq_nia <= std_logic_vector(to_unsigned(16#500#, 64));
        report "IRQ valid: External";
        irq_valid := '1';
    end if;
end if;

so hypothetically, yes, we could create an OP_IRQ that is covered by this
pipeline and is responsible for changing nia etc.

-- 
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 325] create POWER9 TRAP pipeline
From: bugzilla-daemon @ 2020-05-19 23:31 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

--- Comment #8 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
here is the continuation of that process (the FSM in microwatt which has to
take a couple of cycles to write out SRR0/1)

the first bit drops SRR1 into the SPR regfile (we can do 1 cycle) then moves on

the second elsif is near identical to TRAP except it sets the priv bit in the
outgoing MSR.

this we would need to detect at the instruction issue phase (MSR PR bit set)
and yes that is a pain in the neck, for *issue* phase to have to do that.

however once detected, again, an internal OP_INTPRIVthing can be created, sent
to the Trap pipeline for it to action and generate SRR1 and 0


elsif irq_valid = '1' and e_in.valid = '1' then
    -- we need two cycles to write srr0 and 1
    -- will need more when we have to write HEIR
    -- Don't deliver the interrupt until we have a valid instruction
    -- coming in, so we have a valid NIA to put in SRR0.
    exception := '1';
    ctrl_tmp.srr1 <= msr_copy(ctrl.msr);

elsif e_in.valid = '1' and ctrl.msr(MSR_PR) = '1' and
            instr_is_privileged(e_in.insn_type, e_in.insn) then
    -- generate a program interrupt
    exception := '1';
    ctrl_tmp.irq_nia <= std_logic_vector(to_unsigned(16#700#, 64));
    ctrl_tmp.srr1 <= msr_copy(ctrl.msr);
    -- set bit 45 to indicate privileged instruction type interrupt
    ctrl_tmp.srr1(63 - 45) <= '1';
    report "privileged instruction";

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-20  0:09 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #52 from Cole Poirier <colepoirier@gmail.com> ---
Michael, or Luke,

In order to add Bpermd to LogicalMainStage, it appears that I first have to add
it to soc.decoder.power_enums.InternalOp, because that is the type of the cases
for the switch statement. The switch-case statment 'matches' on 'op.isn_type'
which is an InternalOp. Is it possible to user Bpermd inside of a with m.Case
statement, given that all the other m.Case statements wrap InternalOp.isn's and
the bpermd TODO comment template expects InternalOp.OP_BPERM? If I need to add
OP_BPERM to soc.decoder.power_enums.InternalOp, are there any special
instructions or restrictions for doing so? As this will be my first time
touching code that is used by other people I want to make sure I don't
interfere with or break anything.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-20  0:17 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #53 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cole Poirier from comment #52)
> Michael, or Luke,
> 
> In order to add Bpermd to LogicalMainStage, it appears that I first have to
> add it to soc.decoder.power_enums.InternalOp,

line 102, it is already there.
remember use grep or in-editor search

i also use ctags (aptget install exuberant-ctags)

https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_enums.py;h=690bf129381cb9ede1d0d92e3564440597fd9e3e;hb=HEAD

so with it already being there, the Case statement can be uncommented and code
added.  try just doing something small and innocuous to confirm that.


regarding code commits, if you make sure there are no syntax errors and second
that no other tests fail you're in the clear.

it is perfectly fine to commit a test that fails although decorating it as such
is generally better.

@unittest.skip("broken") or something if memory serves correctly.

-- 
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 324] create POWER9 DIV pipeline
From: bugzilla-daemon @ 2020-05-20  0:21 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-324-13@https.bugs.libre-soc.org/>

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

--- Comment #2 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_enums.py;hb=HEAD

TODO, add DIV to Function enum, and back in the (annoyingly separated) CSV
files change DIV and MOD operations from type ALU Function Unit to type DIV.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-20  0:27 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #54 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #53)
> (In reply to Cole Poirier from comment #52)
> > Michael, or Luke,
> > 
> > In order to add Bpermd to LogicalMainStage, it appears that I first have to
> > add it to soc.decoder.power_enums.InternalOp,
> 
> line 102, it is already there.
> remember use grep or in-editor search
> 
> i also use ctags (aptget install exuberant-ctags)
> 
> https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_enums.py;
> h=690bf129381cb9ede1d0d92e3564440597fd9e3e;hb=HEAD
> 
> so with it already being there, the Case statement can be uncommented and
> code added.  try just doing something small and innocuous to confirm that.
> 
> 
> regarding code commits, if you make sure there are no syntax errors and
> second that no other tests fail you're in the clear.
> 
> it is perfectly fine to commit a test that fails although decorating it as
> such is generally better.
> 
> @unittest.skip("broken") or something if memory serves correctly.

Ah yes, appreciated, I will grep first in the future. For clarification, the
way to run the tests is by cd'ing to the soc/decoder directory then running
'python3 test/{test_file.py}' for each of the files in the tests directory? Or
do I cd to the top level soc directory, and run 'sudo python3 setup.py test'?

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-20  0:31 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

Jacob Lifshay <programmerjake@gmail.com> changed:

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

--- Comment #55 from Jacob Lifshay <programmerjake@gmail.com> ---
(In reply to Cole Poirier from comment #54)
> Ah yes, appreciated, I will grep first in the future. For clarification, the
> way to run the tests is by cd'ing to the soc/decoder directory then running
> 'python3 test/{test_file.py}' for each of the files in the tests directory?
> Or do I cd to the top level soc directory, and run 'sudo python3 setup.py
> test'?

Definitely don't use `sudo`. I cd to the top level and run either `python3
setup.py test` or `nosetests`.

-- 
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 323] create POWER9 MUL pipeline
From: bugzilla-daemon @ 2020-05-20  0:35 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-323-13@https.bugs.libre-soc.org/>

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

--- Comment #2 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=a60febdeb1c572a4b85b410c6519383fc581732d

i moved mul operations over to a MUL Function Unit.  the unit test,
test_pipe_caller.py, when cookie-cut copied over, should then be changed:

                    fn_unit = yield pdecode2.e.fn_unit
                    self.assertEqual(fn_unit, Function.SHIFT_ROT.value)

to:

                    fn_unit = yield pdecode2.e.fn_unit
                    self.assertEqual(fn_unit, Function.MUL.value)

really we should look at some point at deriving a class to contain
the common code from all these tests, soc.fn.*.test.test_pipe_caller.py

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