* [libre-riscv-dev] [Bug 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-05-27 19:25 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 #10 from Cole Poirier <colepoirier@gmail.com> ---
Tests now actually run, so I pushed a new commit. In order to formally verify
class Register(), I think I've done most of it, but there's a part of the
class's elaborate function that uses sync instead of comb, and I'm not sure how
to do this in proof form.
```
def elaborate(self, platform):
m = Module()
self.reg = reg = Signal(self.width, name="reg")
[snip..]
# write ports, don't allow write to address 0 (ignore it)
for wp in self._wrports:
with m.If(wp.wen):
m.d.sync += reg.eq(wp.data_i)
return m
```
Does the above prevent write to address 0, and if so how? because it doesn't
seem to do any conditional checking. Further, how would I integrate this in
order to finish the proof or register?
--
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-05-27 18:56 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 #9 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #8)
> 18 def elaborate(self, platform):
> 19 m = Module()
> 20 comb = m.d.comb
> 21 m.submodules.dut = dut = Register(32)
>
> yep not going to work, trying to access domething that has not had elaborate
> called.
>
> derive Driver *from* Register, instead, and replace the above with
>
> m = super().elaborate(platform)
>
> then the Register.elaborate will have been called.
>
> then self.reg will exist
Thanks very much! Will work on getting the existing Asserts working, then push
another commit.
--
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-05-27 18:48 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 #8 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
18 def elaborate(self, platform):
19 m = Module()
20 comb = m.d.comb
21 m.submodules.dut = dut = Register(32)
yep not going to work, trying to access domething that has not had elaborate
called.
derive Driver *from* Register, instead, and replace the above with
m = super().elaborate(platform)
then the Register.elaborate will have been called.
then self.reg will exist
--
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 27may2020
From: Luke Kenneth Casson Leighton @ 2020-05-27 18:42 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <20200527192939.3d4a1dc47a25d9509cb3a0c6@platen-software.de>
On Wednesday, May 27, 2020, Tobias Platen <libre-soc@platen-software.de>
wrote:
> morning:
> elaborate function for DataMerger
you may have missed that i left some review comments in 216?
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 353] formal proof of soc.regfile classes RegFile and RegFileArray needed
From: bugzilla-daemon @ 2020-05-27 18:40 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 #7 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #6)
> (In reply to Cole Poirier from comment #5)
>
> > Are class attributes (self.x) declared within __init__ public and those
> > declared within elaborate() private?
>
> in python the concept of public and private in classes does not exist, like
> it does in c++
>
> class instance atttributes are therefore *always* public. there does exist
> however a convention that if something starts with underscores it is *by
> convention* considered "not for public use".
>
> what you are getting confused about is "scope".
>
> within a function, any local variables are entirely local. however note
> that stuff declared in a module is *also* accessible within the function.
>
> therefore, only variables created *inside* the function are private scope to
> that function.
Thank you for clarifying this for me. My first language three years ago was
python (primarily pandas and numpy for data analysis), so I'm reasonably
comfortable with python scopes, the mistake I made was not thinking I had to
call elaborate first, which is about as silly. I also appreciate the review of
python vs c/c++, but I'm only proficient in python and rust, (and javascript if
I absolutely must**), so my OOP knowledge only comes from python, I don't know
how to write the other stuff like public/private classes, I can only sort of
read it because I've had to learn to understand when reading c/c++/java/go
code.
**I prefer doing UI in elm, which is a functional language that's designed
specifically for UI design that's transpiled to js. I bring this up because I
think you might find interesting to check out in a free moment because of your
work on pyjamas
> > I though all python class attributes
> > were public, and in order to get 'private' variables in a class you have to
> > do as you did in virtual_port.py by simply declaring it a variable and not
> > an attribute of the class object. I ask because I'm having an issue where
> > I'm trying to access self.reg of class Register(), which is declared inside
> > elaborate(),
>
> no it is not declared (this is not c), it is created, and it is created only
> when the function elaborate is called.
>
> how can you expect Register.reg to be created when Register.elaborate has
> not been called?
>
> > and I get an error, but accessing any of the self.xyz
> > attributes like self.width declared in __init__ works fine.
>
> this is correct behaviour. python is not a static language.
>
> commit it let's have a look.
With you... now. Pushed my commit.
--
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-27 18:38 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 #88 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #87)
> sounds good. In my very limited experience with disassembling Power code,
> compilers don't usually enable Rc or overflow writing.
that meshes with observations that the spec says performance is adversely
affected.
--
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-27 18:33 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 #87 from Jacob Lifshay <programmerjake@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #86)
> i think the best we can do is, when Rc=0, disable reading of XER.so
>
> Rc=1 basically makes a hell of a mess of the dependencies.
sounds good. In my very limited experience with disassembling Power code,
compilers don't usually enable Rc or overflow writing.
--
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-27 18:24 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 #86 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
i think the best we can do is, when Rc=0, disable reading of XER.so
Rc=1 basically makes a hell of a mess of the dependencies.
--
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-05-27 18:08 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 #6 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cole Poirier from comment #5)
> Are class attributes (self.x) declared within __init__ public and those
> declared within elaborate() private?
in python the concept of public and private in classes does not exist, like it
does in c++
class instance atttributes are therefore *always* public. there does exist
however a convention that if something starts with underscores it is *by
convention* considered "not for public use".
what you are getting confused about is "scope".
within a function, any local variables are entirely local. however note that
stuff declared in a module is *also* accessible within the function.
therefore, only variables created *inside* the function are private scope to
that function.
> I though all python class attributes
> were public, and in order to get 'private' variables in a class you have to
> do as you did in virtual_port.py by simply declaring it a variable and not
> an attribute of the class object. I ask because I'm having an issue where
> I'm trying to access self.reg of class Register(), which is declared inside
> elaborate(),
no it is not declared (this is not c), it is created, and it is created only
when the function elaborate is called.
how can you expect Register.reg to be created when Register.elaborate has not
been called?
> and I get an error, but accessing any of the self.xyz
> attributes like self.width declared in __init__ works fine.
this is correct behaviour. python is not a static language.
commit it let's have 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
* [libre-riscv-dev] [Bug 348] POWER9 SPR pipeline needed
From: bugzilla-daemon @ 2020-05-27 17:58 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-348-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=348
--- Comment #4 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #3)
> (In reply to Luke Kenneth Casson Leighton from comment #1)
> > if decode_spr_num(e_in.insn) = SPR_XER then
> > -- bits 0:31 and 35:43 are treated as reserved and return 0s
> > -- when read using mfxer
>
> from what I recall, at least some of the reserved XER bits are software
> writable and need to be implemented.
can you recall where and drop the relevant text and ref here? technically it
is possible to shadow the bits from the slow SPR regfile but it is messy.
--
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-27 17:56 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 #85 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #84)
> (In reply to Luke Kenneth Casson Leighton from comment #83)
> > um... um... it just occurred to me: if we detect that XER sticky overflow
> > is 1 in the ALU output stage, and if it is set (and required - insn.OE etc.)
> > only then do we even request a write to the XER.so register, then because
> > it is only setting, i do not believe we even need to read the XER.so at all.
> >
> > as in: i think we can actually *remove* XER.so from ALUInputData, entirely.
> >
> > this is because we don't actually care what the former value was - at all -
> > we are merely setting it. and because that new value is *not* dependent
> > on the old value - at all - we don't need to waste that read port.
> >
> > does this sound like a reasonable analysis?
>
> sounds mostly correct to me, as long as the logic for setting CR0's 4th bit
> still reads the previous value when overflow isn't triggered.
that's the fly in the ointment. i started removing SO and found that because
it is CR0's 4th bit, and because that 4th bit takes XER.SO as input
unconditionally as far as the calculation is concerned, XER.SO cannot be
removed from the input data structure for ALU.
now, it *can* be switched off by the *instruction* - Rc=1/0 - but not by the
ALU itself.
> SO is a prime
> candidate for some extra logic to allow multiple instructions to modify it
> each cycle.
as SO is being treated like any other register (despite it being only 1 bit
wide) it should be picked up by standard WaW (write after write) and unused
values thrown away.
--
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-27 17:46 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
Jacob Lifshay <programmerjake@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |programmerjake@gmail.com
--- Comment #84 from Jacob Lifshay <programmerjake@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #83)
> um... um... it just occurred to me: if we detect that XER sticky overflow
> is 1 in the ALU output stage, and if it is set (and required - insn.OE etc.)
> only then do we even request a write to the XER.so register, then because
> it is only setting, i do not believe we even need to read the XER.so at all.
>
> as in: i think we can actually *remove* XER.so from ALUInputData, entirely.
>
> this is because we don't actually care what the former value was - at all -
> we are merely setting it. and because that new value is *not* dependent
> on the old value - at all - we don't need to waste that read port.
>
> does this sound like a reasonable analysis?
sounds mostly correct to me, as long as the logic for setting CR0's 4th bit
still reads the previous value when overflow isn't triggered. SO is a prime
candidate for some extra logic to allow multiple instructions to modify it each
cycle.
--
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-05-27 17:42 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 #5 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #4)
> then you know what to do there: inspect line 22 of that file, and check
> it against the latest version of nmigen, online. have a look:
> https://github.com/nmigen/nmigen/blob/master/nmigen/compat/sim/__init__.py
>
>
> if not isinstance(generators, dict):
> generators = {"sync": generators}
> if "sync" not in fragment.domains:
> fragment.add_domains(ClockDomain("sync"))
>
>
> does that match with what you have?
Aha, my mistake, I forgot to checkout nmigen/nmigen master after I made a PR to
nmigen the other week... Oof silly me. fixed now, thanks.
> > Indeed, it seems to be a very productive strategy. Looking forward to
> > working with you on the proof today. Just reviewing my notes now, should
> > have some code for some of the basic assumptions committed in the next hour.
>
> cool.
Are class attributes (self.x) declared within __init__ public and those
declared within elaborate() private? I though all python class attributes were
public, and in order to get 'private' variables in a class you have to do as
you did in virtual_port.py by simply declaring it a variable and not an
attribute of the class object. I ask because I'm having an issue where I'm
trying to access self.reg of class Register(), which is declared inside
elaborate(), and I get an error, but accessing any of the self.xyz attributes
like self.width declared in __init__ works fine.
--
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 348] POWER9 SPR pipeline needed
From: bugzilla-daemon @ 2020-05-27 17:40 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-348-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=348
Jacob Lifshay <programmerjake@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |programmerjake@gmail.com
--- Comment #3 from Jacob Lifshay <programmerjake@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #1)
> if decode_spr_num(e_in.insn) = SPR_XER then
> -- bits 0:31 and 35:43 are treated as reserved and return 0s
> -- when read using mfxer
from what I recall, at least some of the reserved XER bits are software
writable and need to be implemented.
--
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 27may2020
From: Tobias Platen @ 2020-05-27 17:29 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <CAPweEDz+i8kW_HKmC+8_-ivENigOtpuXTnvODD_kUUn784TTcA@mail.gmail.com>
morning:
elaborate function for DataMerger
today:
reading l0_cache.py
_______________________________________________
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-05-27 17:26 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 #4 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cole Poirier from comment #3)
> (In reply to Luke Kenneth Casson Leighton from comment #2)
> > (In reply to Cole Poirier from comment #1)
> > > if this proof is needed before then for the virtual_port tests,
> >
> > it's not. i have a preliminary virtual_port test running, yesterday.
>
> Saw your 'proof-of-concept' test case yesterday, was helpful for
> understanding the functionality of the module further. Unfortunately, I
> think this test is now failing with the following error:
>
> ```
> Traceback (most recent call last):
> File "virtual_port.py", line 203, in <module>
> test_regfile()
> File "virtual_port.py", line 200, in test_regfile
> vcd_name='test_regfile_array.vcd')
> File "/home/colepoirier/src/nmigen/nmigen/compat/sim/__init__.py", line
> 22, in run_simulation
> fragment.domains += ClockDomain("sync")
> AttributeError: 'VirtualRegPort' object has no attribute 'domains'
> ```
then you know what to do there: inspect line 22 of that file, and check
it against the latest version of nmigen, online. have a look:
https://github.com/nmigen/nmigen/blob/master/nmigen/compat/sim/__init__.py
if not isinstance(generators, dict):
generators = {"sync": generators}
if "sync" not in fragment.domains:
fragment.add_domains(ClockDomain("sync"))
does that match with what you have?
> Indeed, it seems to be a very productive strategy. Looking forward to
> working with you on the proof today. Just reviewing my notes now, should
> have some code for some of the basic assumptions committed in the next hour.
cool.
--
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-05-27 16:45 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 #3 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #2)
> (In reply to Cole Poirier from comment #1)
> > if this proof is needed before then for the virtual_port tests,
>
> it's not. i have a preliminary virtual_port test running, yesterday.
Saw your 'proof-of-concept' test case yesterday, was helpful for understanding
the functionality of the module further. Unfortunately, I think this test is
now failing with the following error:
```
Traceback (most recent call last):
File "virtual_port.py", line 203, in <module>
test_regfile()
File "virtual_port.py", line 200, in test_regfile
vcd_name='test_regfile_array.vcd')
File "/home/colepoirier/src/nmigen/nmigen/compat/sim/__init__.py", line 22,
in run_simulation
fragment.domains += ClockDomain("sync")
AttributeError: 'VirtualRegPort' object has no attribute 'domains'
```
I suspect it's a simple fix, but the answer is not immediately apparent to me.
> > Luke please
> > feel free to take it over like you did with virtual_port today. I want to
> > help, so I don't want my learning while working slowly to be a blocker :)
>
> i don't totally get them either, so we work on it together, over time, ok?
>
> as you have probably noticed, i tend to write "proof-of-concept" unit
> tests that at least give a basic level of confidence then move quickly
> on. this will allow rapid progress but will bite us in corner-cases.
Indeed, it seems to be a very productive strategy. Looking forward to working
with you on the proof today. Just reviewing my notes now, should have some code
for some of the basic assumptions committed in the next hour.
--
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 27may2020
From: Cole Poirier @ 2020-05-27 16:35 UTC (permalink / raw)
To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
In-Reply-To: <CAPweEDz+i8kW_HKmC+8_-ivENigOtpuXTnvODD_kUUn784TTcA@mail.gmail.com>
Yesterday:
Studied virtual_port.py to understand nmigen, hdl, and hardware better
because its the full implementation of something I tried to implement
but really struggled to understand. Being able to compare my effort on
this to the end product is nearly as helpful to my learning as was the
tremendous amount of help Michael and Luke provided working through
writing bpermd.py and proof_bpermd.py. Thank you.
I also started working through the very basic first assertions for the
formal proof of Register, RegFile, and RegFileArray from
regfile/regfile.py, which I will work on with Luke today.
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-27 16: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 #83 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
um... um... it just occurred to me: if we detect that XER sticky overflow
is 1 in the ALU output stage, and if it is set (and required - insn.OE etc.)
only then do we even request a write to the XER.so register, then because
it is only setting, i do not believe we even need to read the XER.so at all.
as in: i think we can actually *remove* XER.so from ALUInputData, entirely.
this is because we don't actually care what the former value was - at all -
we are merely setting it. and because that new value is *not* dependent
on the old value - at all - we don't need to waste that read port.
does this sound like a reasonable analysis?
--
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 348] POWER9 SPR pipeline needed
From: bugzilla-daemon @ 2020-05-27 14:57 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-348-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=348
--- Comment #2 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
OP_MTSPR:
if is_fast_spr(e_in.write_reg) then
result := c_in;
result_en := '1';
if decode_spr_num(e_in.insn) = SPR_XER then
v.e.xerc.so := c_in(63-32);
v.e.xerc.ov := c_in(63-33);
v.e.xerc.ca := c_in(63-34);
v.e.xerc.ov32 := c_in(63-44);
v.e.xerc.ca32 := c_in(63-45);
v.e.write_xerc_enable := '1';
else
-- slow spr
case decode_spr_num(e_in.insn) is
when SPR_DEC =>
ctrl_tmp.dec <= c_in;
when others =>
-- mtspr to unimplemented SPRs should be a nop in
-- supervisor mode and a program interrupt for user mode
if ctrl.msr(MSR_PR) = '1' then
illegal := '1';
end case;
--
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-27 14:49 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 #14 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
and OP_SC. this also sets NIA and SRR1.
when OP_SC =>
-- check bit 1 of the instruction is 1 so we know this is sc;
-- 0 would mean scv, so generate an illegal instruction
interrupt
-- we need two cycles to write srr0 and 1
if e_in.insn(1) = '1' then
exception := '1';
exception_nextpc := '1';
ctrl_tmp.irq_nia <= std_logic_vector(to_unsigned(16#C00#,
64));
ctrl_tmp.srr1 <= msr_copy(ctrl.msr);
report "sc";
else
illegal := '1';
end if;
--
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-27 14:48 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 #13 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #10)
> could also add SPRSET as well (1 more SPR reg to input)
no, it's 2. too many. 2 because one is FAST (covering TAR, LR, SRR0/1 etc.)
the other is for the (slow) SPR regfile SRAM. not a good idea. that's 6
input regs, and 6 output.
--
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-27 14: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 #12 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #11)
> and probably addpcis:
>
> D <- d0||d1||d2
> RT <- NIA + EXTS(D || 16 0)
and OP_RFID:
when OP_RFID =>
f_out.redirect <= '1';
f_out.virt_mode <= b_in(MSR_IR) or b_in(MSR_PR);
f_out.priv_mode <= not b_in(MSR_PR);
f_out.redirect_nia <= a_in(63 downto 2) & "00"; -- srr0
-- Can't use msr_copy here because the partial function MSR
-- bits should be left unchanged, not zeroed.
ctrl_tmp.msr(63 downto 31) <= b_in(63 downto 31);
ctrl_tmp.msr(26 downto 22) <= b_in(26 downto 22);
ctrl_tmp.msr(15 downto 0) <= b_in(15 downto 0);
if b_in(MSR_PR) = '1' then
ctrl_tmp.msr(MSR_EE) <= '1';
ctrl_tmp.msr(MSR_IR) <= '1';
ctrl_tmp.msr(MSR_DR) <= '1';
end if;
although i have no idea what to do about those "priv_mode" and "virt_mode"
bits: we don't have global data structures like they do in microwatt.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 343] compalu_multi write requests need to hook into Data.ok
From: bugzilla-daemon @ 2020-05-27 14:27 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-343-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=343
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
nuts. just realised that all the formal proofs - and unit tests - need to
check XER.so ok, XER.ca ok etc. as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 340] formal proof of POWER9 SHIFTROT pipeline needed
From: bugzilla-daemon @ 2020-05-27 14:21 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-340-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=340
Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugs.libre-soc.org/
| |show_bug.cgi?id=343
--
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: 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