* [libre-riscv-dev] Avoiding Spectre or Meltdown
From: Yehowshua @ 2020-05-18 13:03 UTC (permalink / raw)
To: Libre-RISCV General Development
I know Jacob mentioned some scheme earlier.
If you shadow commits to memory(really cache) during speculation by having commits placed in a buffer, which you can ignore once branch is resolved, wouldn’t that avoid some problems with Spectre and Meltdown?
Yehowshua
_______________________________________________
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 319] POWER9 setting carry (and other) XER flags
From: bugzilla-daemon @ 2020-05-18 12:00 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-319-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=319
--- Comment #3 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
started documenting the XER fields here:
https://libre-soc.org/openpower/pipeline_operands/
we really need this as a variant / extension of power_decode:
a set of CSVs that tell us the bits in XER which need setting.
(likewise we need one for which SPRs are needed by which operations)
--
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] daily kan-ban update 18may2020
From: Luke Kenneth Casson Leighton @ 2020-05-18 11:45 UTC (permalink / raw)
To: Libre-RISCV General Development
over the weekend i:
* continued to help michael with the pipelines (and moved them to
soc.fu this morning).
* also helped cole.
* and a new team member cesar (welcome!).
* and got LDSTCompUnit working (maybe).
* and had a fascinating conversation thanks to yehowshua and jeremy
(also welcome!), which resulted in this
(https://libre-soc.org/3d_gpu/architecture/tomasulo_transformation/).
* and did a preliminary first cut at a pinmux for the 180nm chip.
* and probably some other things i've forgotten about as i was up late
enough that my neuro-electrical memory is slightly shot.
* also this morning i reviewed the XER register and added some tables
from p45-6 of V3.0B spec to determine when the bits are set.
documented here https://libre-soc.org/openpower/pipeline_operands/
this latter is going to be a bit of a pig. if we don't treat the XER
bits - each *bit* - as an actual separate and distinct "register" -
protected by a Dependency Matrix column - we might as well give up -
and no, doing an in-order design will not help on any level of
performance because all of those operations which set XER bits *still*
need to stall. microwatt only gets away with this because it is only
a 2-stage pipeline.
today i will see how it goes because am still recovering from the
effects of three disrupted sleep nights in a row.
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 319] POWER9 setting carry (and other) XER flags
From: bugzilla-daemon @ 2020-05-18 11:29 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-319-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=319
--- Comment #2 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
dang. these XER bits really do need to be treated as individual registers
covered by separate DM rows.
if we don't they'll chain together and completely destroy any opportunity
for parallelism.
this in turn means we need to define a function which, rather laboriously,
tells us at the instruction *decode* phase, what implicit "registers"
(which fields) are to be written to, and which to be read/write. SO is
definitely on that list.
--
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 319] POWER9 setting carry (and other) XER flags
From: bugzilla-daemon @ 2020-05-18 11:08 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-319-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=319
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
Section 3.2.2 Fixed-Point Exception Register (XER)
32 Summary Overflow (SO)
The Summary Overflow bit is set to 1 when-
ever an instruction (except mtspr and addex)
sets the Overflow bit. Once set, the SO bit
remains set until it is cleared by an mtspr
instruction (specifying the XER). It is not
altered by Compare instructions, or by other
instructions (except mtspr to the XER and
addex with operand CY=0) that cannot over-
flow. Executing an mtspr instruction to the
XER, supplying the values 0 for SO and 1 for
OV, causes SO to be set to 0 and OV to be set
to 1. addex does not alter the contents of SO.
33 Overflow (OV)
The Overflow bit is set to indicate that an over-
flow has occurred during execution of an
instruction. The Overflow bit can also used as
an independent Carry bit by using the addex
with operand CY=0 instruction and avoiding
other instructions that modify the Overflow bit
(e.g., any XO-form instruction with OE=1).
XO-form Add, Subtract From, and Negate
instructions having OE=1 set it to 1 if the carry
out of bit M is not equal to the carry out of bit
M+1, and set it to 0 otherwise.
XO-form Multiply Low and Divide instructions
having OE=1 set it to 1 if the result cannot be
represented in 64 bits (mulld, divd, divde,
divdu, divdeu) or in 32 bits (mullw, divw,
divwe, divwu, divweu), and set it to 0 other-
wise.
addex with operand CY=0 sets OV to 1 if there
is a carry out of bit M, and sets it to 0 other-
wise.
The OV bit is not altered by Compare instruc-
tions, or by other instructions (except mtspr to
the XER) that cannot overflow.
34 Carry (CA)
The Carry bit is set as follows, during execu-
tion of certain instructions. Add Carrying, Sub-
tract From Carrying, Add Extended, and
Subtract From Extended types of instructions
set it to 1 if there is a carry out of bit M, and
set it to 0 otherwise. Shift Right Algebraic
instructions set it to 1 if any 1-bits have been
shifted out of a negative operand, and set it to
0 otherwise. The CA bit is not altered by Com-
pare instructions, or by other instructions
(except Shift Right Algebraic, mtspr to the
XER) that cannot carry.
44 Overflow32 (OV32)
OV32 is set whenever OV is implicitly set, and
is set to the same value that OV is defined to
be set to in 32-bit mode.
45 Carry32 (CA32)
CA32 is set whenever CA is implicitly set, and
is set to the same value that CA is defined to
be set to in 32-bit mode.
--
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 319] New: POWER9 setting carry (and other) XER flags
From: bugzilla-daemon @ 2020-05-18 11:04 UTC (permalink / raw)
To: libre-riscv-dev
https://bugs.libre-soc.org/show_bug.cgi?id=319
Bug ID: 319
Summary: POWER9 setting carry (and other) XER flags
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: PC
OS: Linux
Status: CONFIRMED
Severity: enhancement
Priority: ---
Component: Source Code
Assignee: lkcl@lkcl.net
Reporter: lkcl@lkcl.net
CC: libre-riscv-dev@lists.libre-riscv.org
NLnet milestone: ---
we need to think through how to set the various XER flags properly.
if we naively have XER as a permanent incoming input (and output),
this will create a permanent sequential (in-order) read-write hazard
on all ALU operations that will light up the DMs covering XER like
a mythbusters christmas tree.
--
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-18 5:19 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 #80 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://libre-soc.org/openpower/isa/comparefixed/
hmm hmmm the cmpeqb code is stopping ALUIntermediateData from not having cr0 in
it.
i suggest instead that we put the 8 bits into self.o.o, then special case
cmpeqb to test o.any() and only set cr0[2]
also hmm, cmp* seem to want to store the comparison in a BR indexed register,
not cr0.
which sigh tends to suggest we need to move cmp operations to their own
pipeline, one that takes the full 32 bits of CR.
alternatives are that we expand ALU cr to the full bit width.
however if going that route i would like to suggest we pass an index (and mask)
saying which CR(s) have been modified.
the mask would be sent as write enable lines to the CR regfile.
this would remove the need to pass *in* the full CR and stop an unnecessary
read hazaelrd being created.
--
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 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-18 4:09 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugs.libre-soc.org/
| |show_bug.cgi?id=216
--
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 216] LOAD STORE buffer needed
From: bugzilla-daemon @ 2020-05-18 4:09 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-216-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=216
Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugs.libre-soc.org/
| |show_bug.cgi?id=318
--
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-18 4:08 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 #38 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
cole i moved the soc.logical.bperm code into soc.fu.logical.bperm
can i leave it with you to update the imports?
--
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-18 4:07 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 #79 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #78)
> michael i am going to do a codeshuffle moving all pipelines to a subdir
> called pipe.
called it "fu" because strictly speaking these pipelines will be managed
by Function Unit front-ends.
--
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-18 1:40 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 #78 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
michael i am going to do a codeshuffle moving all pipelines to a subdir called
pipe.
common code can sit at that level including a README, as well as the multi
inout construction (based on the ReservationStation class).
also at that level would be a specification object that constructs multiple
Function Units just like in the diagram from Mitch's book.
some of these will be multiple pipes (the ones that only do one clock) and some
will be N > 1 ReservationStations but only the one pipe (DIV in particular)
also then in front of those will be the relevant CompUnits, some of which we
need to construct. ALUCompUnit will be the basis for most of them.
it starts with moving the pipelines to a pipe subdir, the rest needs its iwn
bugreport.
--
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-18 1:23 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 #37 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #36)
> (In reply to Cole Poirier from comment #35)
> > Thank you for the guidance to do standard python debugging, found the bug
> > and fixed it in minutes.
>
> ta-daaa :)
>
>
> > Should I make a PR to nmigen with this fix?
>
> of course! and next time, don't ask, just do it :)
Just did, and will do in the future, still getting my... cirucuit-legs so to
speak :)
> > I'm stopping work for today. Will pick this up and make my 'real' first
> > proof attempt in the morning.
>
> great. it's kinda cool, isn't it?
It's fantastically cool! I can't wait to work on this tomorrow, would keep
working now, but I must give my brain some rest.
--
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-18 0:50 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 #36 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cole Poirier from comment #35)
> Thank you for the guidance to do standard python debugging, found the bug
> and fixed it in minutes.
ta-daaa :)
> Should I make a PR to nmigen with this fix?
of course! and next time, don't ask, just do it :)
> I'm stopping work for today. Will pick this up and make my 'real' first
> proof attempt in the morning.
great. it's kinda cool, isn't 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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-18 0:45 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 #35 from Cole Poirier <colepoirier@gmail.com> ---
Thank you for the guidance to do standard python debugging, found the bug and
fixed it in minutes.
The key turned out to be adding os.realpath() at the top of the assertFormal()
function:
```
def assertFormal(self, spec, mode="bmc", depth=1):
caller, *_ = traceback.extract_stack(limit=2)
spec_root, _ = os.path.splitext(caller.filename)
- spec_dir = os.path.dirname(spec_root)
+ spec_dir = os.path.dirname(os.path.realpath(spec_root))
spec_name = "{}_{}".format(
os.path.basename(spec_root).replace("test_", "spec_"),
caller.name.replace("test_", "")
)
[snip..]
```
Should I make a PR to nmigen with this fix?
I'm stopping work for today. Will pick this up and make my 'real' first proof
attempt in the morning.
--
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-18 0:14 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 #34 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #33)
> Cole, one critically important thing that you need to learn as a "first
> reaction"
> is to go through every single file, at every single line, on a stack trace,
> actually seeing what that line (and nearby) actually does.
>
> here is the relevant line of nmigen.test.utils:
>
> with subprocess.Popen([require_tool("sby"), "-f", "-d", spec_name],
> cwd=spec_dir,
> universal_newlines=True,
> stdin=subprocess.PIPE, stdout=subprocess.PIPE)
> as proc:
> stdout, stderr = proc.communicate(config)
>
> also, that it is perfectly find to insert debug print statements into that
> code in order to find out what is going on.
>
> for example, do this:
>
> sbytool = require_tool("sby")
> print ("sby tool blah blah", sbytool, spec_name, spec_dir)
> with subprocess.Popen([sbytool, "-f", "-d", spec_name], ....
>
>
> then, if that is not obvious what is going on, drill down into require_tool,
> which can be found in nmigen/_toolchain.py
>
> and there, start dropping in a ton of print debug statements that tell you
> what is going on.
>
> print ("env_var", env_var)
> print path
> print shutil.which(path)
> print os.environ.keys()
>
> etc blah blah blah
>
> further up the assertFormal function, start dropping in print statements
> there.
>
> basically, when you've done all that, try this:
>
> lkcl@fizzy:~/src/libresoc/soc/src/soc/logical/formal$ python3 proof_bperm.py
>
> and:
>
> lkcl@fizzy:~/src/libresoc/soc/src/soc/logical/formal$ cd ..
> lkcl@fizzy:~/src/libresoc/soc/src/soc/logical$ python3 logical/proof_bperm.py
>
> and tell me what happens in each case.
Ah yes, classic python debugging print over here, print over there, print
everywhere! I thought I was doing something trivially wrong. Will deep dive
now. Thank you for the guidance. Will report back shortly.
--
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-17 23:44 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 #33 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
Cole, one critically important thing that you need to learn as a "first
reaction"
is to go through every single file, at every single line, on a stack trace,
actually seeing what that line (and nearby) actually does.
here is the relevant line of nmigen.test.utils:
with subprocess.Popen([require_tool("sby"), "-f", "-d", spec_name],
cwd=spec_dir,
universal_newlines=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE) as
proc:
stdout, stderr = proc.communicate(config)
also, that it is perfectly find to insert debug print statements into that
code in order to find out what is going on.
for example, do this:
sbytool = require_tool("sby")
print ("sby tool blah blah", sbytool, spec_name, spec_dir)
with subprocess.Popen([sbytool, "-f", "-d", spec_name], ....
then, if that is not obvious what is going on, drill down into require_tool,
which can be found in nmigen/_toolchain.py
and there, start dropping in a ton of print debug statements that tell you
what is going on.
print ("env_var", env_var)
print path
print shutil.which(path)
print os.environ.keys()
etc blah blah blah
further up the assertFormal function, start dropping in print statements there.
basically, when you've done all that, try this:
lkcl@fizzy:~/src/libresoc/soc/src/soc/logical/formal$ python3 proof_bperm.py
and:
lkcl@fizzy:~/src/libresoc/soc/src/soc/logical/formal$ cd ..
lkcl@fizzy:~/src/libresoc/soc/src/soc/logical$ python3 logical/proof_bperm.py
and tell me what happens in each 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 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-17 23:31 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
--- Comment #11 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cesar Strauss from comment #10)
> I got my development environment running, by consulting
> https://libre-soc.org/HDL_workflow/.
>
> Then, I ran the testbench at experiment/compldst_multi.py, generated the
> timing diagram, and confirmed in GTKWave that the problem related in comment
> #3 does not occur any longer in the latest git master.
>
> I started reading the reference material, in order to get a basic knowledge
> of the functionalities and interfaces.
>
> Then, I followed the nMigen tutorial at
> https://github.com/RobertBaruch/nmigen-tutorial, while reading the code of
> the LD/ST Comp Unit itself, and as a result I got a reasonable understanding
> of both.
excellent. similar to https://bugs.libre-soc.org/show_bug.cgi?id=316
if you'd like we can find a practical and useful example that's an awful
lot less complicated than this one, by way of getting started.
> I'll now go back to the reference material a little more. Once I get a
> better understanding, I'll return to the code and proceed with reviewing it
> and improving the unit tests. I have formed some thoughts about this already.
me too. please, when you have a moment, do describe them. here's a couple:
* we do need a way to test dual ports (two CompLDSTs with
two ports, 4-4 as well) which write to the same memory
this will test whether the (prototype) L0CacheBuffer is doing
its job (which i am not certain that it does. it handles _one_
LD or _one_ ST correctly)
* we need some tests to be delayed-response (to each of the rd and wr
*and* go.ad *and* go.st) and some to be immediate-response
these can be done using multiple "processes". you notice in the
simulation that a function is passed in: it is possible to pass in
*multiple* such functions. hmm hmm where's an example of that...
https://git.libre-soc.org/?p=nmutil.git;a=blob;f=src/nmutil/test/test_inout_mux_pipe.py;hb=HEAD
what that does is: set up a pipeline with a 4-input, 4-output "muxer"
at the input and output. a context (index) is passed down the pipeline,
and used to associate the "result" back with its corresponding output.
so you can see in InputTest, there are *eight* separate and distinct
simultaneously-operating "processes": 4 do sending, 4 do receiving.
they all operate on the same (global) python data structure, which gives
a way for the python unit test to actually check that they're doing the
right thing.
a) that no data is lost
b) that data sent from input N is *received* at output N
c) that the order of any data sent from input N to output N is preserved
regardless of the interleaving order.
so in a similar fashion, a class could be designed where one function
takes care of rd.req[N] and rd.go[N] acknowledgement (for N=0..2),
and likewise another function responds to ad.req, another to wr.req[0..1]
and so on, where because those "processes" are all members of the same
class, they have access to the full "state" of all other "processes" and
consequently can verify and report that the request-signals are coming
in correctly (or at all), and in the right order.
in addition, under the control of the caller (the unit test), those
individual processes could be told "respond immediately to the signal"
or "response with an arbitrary delay" extremely easily: a simple for-loop
with a "yield" in it - as you can see at line 101 in test_inout_mux_pipe.py
will create that type of behaviour.
beyond that: in a similar way to InputTest, setting up multiple CompLDSTUnits,
and getting them to hammer the same L0CacheBuffer via multiple ports, is also a
very important test, as it is the way to ensure that multiple LD/ST operations
can operate in parallel and not corrupt memory (or be lost).
beyond *that*, at some point we need to also arbitrarily test raising an
"exception" flag, which will result in the "shadow" condition being pulled,
and that should result in the complete cancellation of the operation.
> I'll ask if I need further clarifications, and report my progress.
appreciated.
--
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-17 23:22 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 #32 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #31)
> try running a different formal test that is known to already work.
Unfortunately, after several hours and multiple re-installations of nmigen,
nmutil, ieee754fpu, soc, yosys, symbiyosys, and dist-packages cleanings, when
trying to run known working proof '~/src/soc/src/soc/decoder/formal$ python3.7
proof_decoder.py'
I get the same error with the following output:
```
mask 0x1f
E
======================================================================
ERROR: test_decoder (__main__.DecoderTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "proof_decoder.py", line 125, in test_decoder
self.assertFormal(module, mode="bmc", depth=4)
File "/home/colepoirier/src/nmigen/nmigen/test/utils.py", line 100, in
assertFormal
stdin=subprocess.PIPE, stdout=subprocess.PIPE) as proc:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '': ''
----------------------------------------------------------------------
Ran 1 test in 3.459s
FAILED (errors=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] LD/ST Comp Unit FSM (was: Re: Scoreboard vs Tomasulo)
From: Luke Kenneth Casson Leighton @ 2020-05-17 23:01 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <8b3c4ad8-8cc8-6834-0dbb-531de3707754@gmail.com>
you may have to send that privately, the list only allows certain attachments.
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
On Sun, May 17, 2020 at 11:42 PM Cesar Strauss <cestrauss@gmail.com> wrote:
>
> On 05/17/2020 19:23, Luke Kenneth Casson Leighton wrote:
> > btw Cesar you've been tracking the list for a while, so you know of this:
> > https://libre-soc.org/HDL_workflow
>
> Indeed.
>
> > feel free to send me an ssh public key.
>
> Gladly. It is attached.
>
> Regards,
>
> Cesar
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
_______________________________________________
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 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-17 23:01 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
--- Comment #10 from Cesar Strauss <cestrauss@gmail.com> ---
I got my development environment running, by consulting
https://libre-soc.org/HDL_workflow/.
Then, I ran the testbench at experiment/compldst_multi.py, generated the timing
diagram, and confirmed in GTKWave that the problem related in comment #3 does
not occur any longer in the latest git master.
I started reading the reference material, in order to get a basic knowledge of
the functionalities and interfaces.
Then, I followed the nMigen tutorial at
https://github.com/RobertBaruch/nmigen-tutorial, while reading the code of the
LD/ST Comp Unit itself, and as a result I got a reasonable understanding of
both.
I'll now go back to the reference material a little more. Once I get a better
understanding, I'll return to the code and proceed with reviewing it and
improving the unit tests. I have formed some thoughts about this already.
I'll ask if I need further clarifications, and report my progress.
Regards,
Cesar
--
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] LD/ST Comp Unit FSM (was: Re: Scoreboard vs Tomasulo)
From: Cesar Strauss @ 2020-05-17 22:42 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <CAPweEDwWOynkzhFcPJmyFVBHYjWJJf6sRc+YbzNc+ZrV0Q7jQA@mail.gmail.com>
On 05/17/2020 19:23, Luke Kenneth Casson Leighton wrote:
> btw Cesar you've been tracking the list for a while, so you know of this:
> https://libre-soc.org/HDL_workflow
Indeed.
> feel free to send me an ssh public key.
Gladly. It is attached.
Regards,
Cesar
_______________________________________________
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] LD/ST Comp Unit FSM (was: Re: Scoreboard vs Tomasulo)
From: Luke Kenneth Casson Leighton @ 2020-05-17 22:23 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDzTD3rF7cz-36qS5K_-fX6yaWGWd+yo0K17AjQdCOXqcw@mail.gmail.com>
btw Cesar you've been tracking the list for a while, so you know of this:
https://libre-soc.org/HDL_workflow
feel free to send me an ssh public key.
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-17 22:19 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 #31 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
try running a different formal test that is known to already work.
--
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-17 21:28 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 #30 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Cole Poirier from comment #29)
> Hi Michael, is there an argument that needs to be passed in order to run the
> formal proof, or a config.sby file? I'm currently trying 'python3
> proof_bperm.py' which gives me an error about a missing file... I'm pulling
> my hair out trying to figure out which file it's looking for.
>
> ```
> E.
> ======================================================================
> ERROR: test_formal (__main__.TestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "proof_bperm.py", line 112, in test_formal
> self.assertFormal(module, mode="bmc", depth=2)
> File "/home/colepoirier/src/nmigen/nmigen/test/utils.py", line 100, in
> assertFormal
> stdin=subprocess.PIPE, stdout=subprocess.PIPE) as proc:
> File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
> restore_signals, start_new_session)
> File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
> raise child_exception_type(errno_num, err_msg, err_filename)
> FileNotFoundError: [Errno 2] No such file or directory: '': ''
>
> ----------------------------------------------------------------------
> Ran 2 tests in 0.479s
>
> FAILED (errors=1)
> ```
Nope, no arguments needed. I ran into this error a while ago, it's something to
do with symbiyosys not finding a file. I'm not sure how it got fixed though, as
it seemed to resolve itself. Are you using the latest nmigen, installed from
the git repo?
--
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