Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* Re: [libre-riscv-dev] libre-riscv-dev Digest, Vol 23, Issue 16
From: Jacob Lifshay @ 2020-07-10 22:50 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Samuel Falvo II
In-Reply-To: <CAPweEDw=fEV4-GHme2cG9LFiZd4UAMXjCfQ+kXWbfj9xwoZ7Yg@mail.gmail.com>

apparently whitequark fixed the dependency issues with nmigen_soc:
https://github.com/nmigen/nmigen-soc/commit/5509bd2aad3012eed09c06f660cb9b60cd2cff95

So, if you install from https://github.com/nmigen/nmigen-soc instead
of PyPI or m-labs it will probably work

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] libre-riscv-dev Digest, Vol 23, Issue 16
From: Luke Kenneth Casson Leighton @ 2020-07-10 22:58 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Samuel Falvo II
In-Reply-To: <CAC2bXD4JQuR_H2uZSd7W5Lu+NRgdpw2jto_8bniHUZ2voeXh4w@mail.gmail.com>

On Friday, July 10, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:

> apparently whitequark fixed the dependency issues with nmigen_soc:
> https://github.com/nmigen/nmigen-soc/commit/5509bd2aad3012eed09c06f660cb9b
> 60cd2cff95


nice.



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

* Re: [libre-riscv-dev] libre-riscv-dev Digest, Vol 23, Issue 16
From: Luke Kenneth Casson Leighton @ 2020-07-10 23:07 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Samuel Falvo II
In-Reply-To: <CAC2bXD4JQuR_H2uZSd7W5Lu+NRgdpw2jto_8bniHUZ2voeXh4w@mail.gmail.com>

On Friday, July 10, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:

> apparently whitequark fixed the dependency issues with nmigen_soc:
> https://github.com/nmigen/nmigen-soc/commit/5509bd2aad3012eed09c06f660cb9b
> 60cd2cff95
>
> So, if you install from https://github.com/nmigen/nmigen-soc instead
> of PyPI or m-labs it will probably work


  install_requires=["nmigen>=0.1,<0.5"],


that will...sort-of do the trick.

installation of nmigen-soc will pull in an arbitrary, unverified and
untrusted version of nmigen off the internet

then, you git clone the nmigen repo and install that.

the pre-installed nmigen-soc dependencies will *match* the version of
nmigen being installed manually, resulting in successful replacement.

we are going to have to sort this out for the reproducible builds for
coriolis2

we absolutely cannot have arbitrary dependencies randomly downloaded, not
for any reason.

any one of those arbitrary untrusted packages could result in major
differences in the GDSII files

i mean *all* dependencies of nmigen.

pip3 is basically completely inappropriate, here, given that it could
result in USD 10 to 20 million dollars in NREs wasted because some random
software got installed.

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

* Re: [libre-riscv-dev] libre-riscv-dev Digest, Vol 23, Issue 16
From: Jacob Lifshay @ 2020-07-11  0:35 UTC (permalink / raw)
  To: Libre-RISCV General Development; +Cc: Samuel Falvo II
In-Reply-To: <CAPweEDxzoHV_zA00S8RvHwFkhjAtDt2arKrDh-AQKSGVf2Cfvw@mail.gmail.com>

On Fri, Jul 10, 2020 at 4:08 PM Luke Kenneth Casson Leighton
<lkcl@lkcl.net> wrote:
>
> On Friday, July 10, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> > apparently whitequark fixed the dependency issues with nmigen_soc:
> > https://github.com/nmigen/nmigen-soc/commit/5509bd2aad3012eed09c06f660cb9b
> > 60cd2cff95
> >
> > So, if you install from https://github.com/nmigen/nmigen-soc instead
> > of PyPI or m-labs it will probably work
>
>
>   install_requires=["nmigen>=0.1,<0.5"],
>
>
> that will...sort-of do the trick.

just install nmigen first :)

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] bisecting nmigen
From: Jacob Lifshay @ 2020-07-11  0:46 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD74kwS0yNUTa9to7Km8y=C+T8c_TKPKpk7b=P3M=b5_6w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

I wrote a helper script to look for the nmigen bug. Attaching it as a
txt file in case anyone wants to look at it, adapt it, whatever.
Didn't put it in a git repo since I'm not sure it should be there.
save the attached script as a .sh file, run chmod +x on it, then, from
the nmigen repo, run:
git bisect start
git bisect bad 30e2f91176edcd1c8766c2cb11f413b9c77936b9
git bisect good 303ea18cb60567e45a755c6b6289a601f27d46e6
git bisect run ~/projects/nmigen-bisect-script.sh &> ../nmigen-bisect.log

Jacob

[-- Attachment #2: nmigen-bisect-script.txt --]
[-- Type: text/plain, Size: 1697 bytes --]

#!/bin/bash
# this script's license is LGPLv2.1+
dir="$(mktemp -d)"
cd "$dir"
git clone ~/projects/nmigen
git clone ~/projects/nmigen-soc
git clone ~/projects/libreriscv/ieee754fpu
git clone ~/projects/libreriscv/nmutil
git clone ~/projects/libreriscv/soc
pushd soc
git submodule init
git config submodule.libreriscv.url ~/projects/libreriscv/soc/libreriscv
git config submodule.nmigen-type-annotations.url ~/projects/libreriscv/soc/nmigen-type-annotations
git submodule update
popd
python3 -m venv "$dir/venv"
(
    set -e
    . "$dir/venv/bin/activate"
    pushd nmigen
    python setup.py develop
    popd
    pushd nmigen-soc
    python setup.py develop
    popd
    pushd nmutil
    python setup.py develop
    popd
    pushd ieee754fpu
    python setup.py develop
    popd
    pushd soc
    make install
    python <<<"from nmigen.back.pysim import Simulator, Delay, Settle"
    popd
)
status=$?
echo "status: $status"
if ((status != 0)); then
    status=125
else
    (
        . "$dir/venv/bin/activate"
        pushd soc
        timeout --kill-after=5s 30s python src/soc/fu/div/test/test_pipe_caller.py DIVTestCase.test_6_regression -f
    )
    if [[ -s soc/div_simulator.vcd ]]; then
        state="$(~/projects/vcdump/target/debug/vcdump --strings soc/div_simulator.vcd |
            jq '.top.alu.pipe_start.setup_stage.ra')"
        echo "state: $state"
        if [[ "$state" == "" || "$state" == "null" ]]; then
            status=125
        elif [[ "$state" =~ ^([^\"]*'"'[^\"]*'"'[^\"]*)*'"''0'*[^0\"][^\"]*'"' ]]; then
            status=0
        else
            status=1
        fi
    else
        status=125
    fi
fi
echo "status: $status"
cd ~
rm -rf "$dir"
exit $status

[-- Attachment #3: Type: text/plain, Size: 177 bytes --]

_______________________________________________
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] bisecting nmigen
From: Luke Kenneth Casson Leighton @ 2020-07-11  1:12 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD5SRhuHW3AOXW66LouBQs6A07b+K0J9QFtDbG1BDj-pyA@mail.gmail.com>

On Saturday, July 11, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:

>
> git bisect run ~/projects/nmigen-bisect-script.sh &> ../nmigen-bisect.log


i always wondered how it was intended to be used.  always confused me
though.

plus if there are multiple errors it does not help.

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

* Re: [libre-riscv-dev] libre-riscv-dev Digest, Vol 23, Issue 18
From: Samuel Falvo II @ 2020-07-11  2:09 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <mailman.5.1594421940.8323.libre-riscv-dev@lists.libre-riscv.org>

On Fri, Jul 10, 2020 at 3:59 PM
<libre-riscv-dev-request@lists.libre-riscv.org> wrote:
> On Friday, July 10, 2020, Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> the main one you want is soc/fu/spr/test/test_pipe_caller.py

This test seems to pass if I run it manually; I get a too many open
files error if I run it from make test.  But you did say that that way
lies the path to the dark-side, so I'll just stick with manual
invocation for now.

I guess my next question is to better understand the nature of the
formal tests you want me to write.  I can try to write a set of
"obvious" formal properties for the main_stage.py module; but, it'd be
better if I had a clearer understanding of the intention of the main
stage module.  Is here a good place to discuss the scope for bug 418
or should we move this discussion to the bug?

BTW, I re-asserted to Mailman that I did *not* want to be on digest
mode.  Mailman presents my configuration to me with it turned off
(screenshot available upon request); I'm not sure why it continues to
keep me in digest mode.

-- 
Samuel A. Falvo II

_______________________________________________
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] bisecting nmigen
From: Jacob Lifshay @ 2020-07-11  3:04 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxknMU_Drz7EATxA9ts9rvCOFGP8Fj-3hq+As-9aB34og@mail.gmail.com>

well, got basically useless results: my script ended up skipping every
single commit except the first and last one, I skipped if it didn't
get far enough to output a vcd file with the signal included.

I'm going to be done for today

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] bisecting nmigen
From: Luke Kenneth Casson Leighton @ 2020-07-11  8:58 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD7okcwDnWgxbN5acg20RqHmB5sqp2v0qD04-99X2VBEyQ@mail.gmail.com>

On Sat, Jul 11, 2020 at 4:04 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> well, got basically useless results: my script ended up skipping every
> single commit except the first and last one, I skipped if it didn't
> get far enough to output a vcd file with the signal included.

sigh this is why i stopped investigating git bisect: the process of
selecting which half of the binary search often needs manual
intervention and inspection, as some bugs are introduced that are not
relevant but otherwise cause a wrong "decision".

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] libre-riscv-dev Digest, Vol 23, Issue 18
From: Luke Kenneth Casson Leighton @ 2020-07-11  9:02 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAEz=so=eHaD43DHWdAP+9qcwxXfsRE6HxKRVX0FWd9amfjAW1w@mail.gmail.com>

On Sat, Jul 11, 2020 at 3:09 AM Samuel Falvo II <sam.falvo@gmail.com> wrote:
>
> On Fri, Jul 10, 2020 at 3:59 PM
> <libre-riscv-dev-request@lists.libre-riscv.org> wrote:
> > On Friday, July 10, 2020, Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> > the main one you want is soc/fu/spr/test/test_pipe_caller.py
>
> This test seems to pass if I run it manually; I get a too many open
> files error if I run it from make test.  But you did say that that way
> lies the path to the dark-side, so I'll just stick with manual
> invocation for now.

i usually use "nosetests3" anyway, but yes, run manually.

> I guess my next question is to better understand the nature of the
> formal tests you want me to write.  I can try to write a set of
> "obvious" formal properties for the main_stage.py module;

that's the general idea.  just like in the fu/alu/formal/formal_main_stage.py

> but, it'd be
> better if I had a clearer understanding of the intention of the main
> stage module.  Is here a good place to discuss the scope for bug 418
> or should we move this discussion to the bug?

buuug.

> BTW, I re-asserted to Mailman that I did *not* want to be on digest
> mode.  Mailman presents my configuration to me with it turned off
> (screenshot available upon request); I'm not sure why it continues to
> keep me in digest mode.

possibly because you have to respond to a confirmation message to
change options.  i set it via the admin interface for you.

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] bisecting nmigen
From: Luke Kenneth Casson Leighton @ 2020-07-11 11:34 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDz46r7GqEmir4=HK_rby3CVZWLZT5D2J4Y+w32XjAW7zA@mail.gmail.com>

commit 2606ee33ad548bed1b9294bbca3962e834d12fd0
Author: whitequark <whitequark@whitequark.org>
Date:   Sun Jun 28 05:04:16 2020 +0000

    back.pysim: simplify.

    Remove _EvalContext, which was a level of indirection serving almost
    no purpose. (The only case where it would be useful is repeatedly

turns out it does serve a purpose: the div simulation hasn't completed
in 10 minutes, where it normally takes... maybe... 25 seconds?  i've
stopped it running.


commit 6d417568ad68565fc7e01e7611ce8cf0b8fdb603
Author: whitequark <whitequark@whitequark.org>
Date:   Wed Jul 8 08:29:20 2020 +0000

    back.pysim: only extract signal names if VCD is requested.

    This commit also fixes an issue introduced in 2606ee33 that regressed
    simulator startup time and bloated VCD files. (It's actually about
    10% faster now than *before* the regression was introduced.)

it's not complete.  i ran a diff on the vcd files: it looks to me like
it's actually dumping zeros into the vcd file.  as in: *actual* zero
values are being outputted.  in other words there's nothing wrong
*with the vcd file itself*: nmigen has *outputted zeros* into a VCD
file that is correctly and legally formatted.

in the meantime whilst that's being sorted, it is necessary to use
this git revision:

commit 303ea18cb60567e45a755c6b6289a601f27d46e6 (HEAD, tag: working2)
Author: Alan Green <alan.green@gmail.com>
Date:   Tue Jun 23 22:12:02 2020 +1000

    _yosys: handle unparseable versions

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] daily kan-ban update 11jul2020
From: Luke Kenneth Casson Leighton @ 2020-07-11 13:28 UTC (permalink / raw)
  To: Libre-RISCV General Development

task list:

https://bugs.libre-soc.org/showdependencytree.cgi?maxdepth=1&id=383&hide_resolved=1

yesterday:

* sorting out div, particularly overflow.
* helping samuel get up and running

today:

* tracked down issue with whitequark that jacob highlighted, on vcd files
* added "overflow calculation" to MUL pseudocode
* added more MUL unit tests


i'm starting to become reasonably confident that MUL and DIV are
functionally correct.  checking against first qemu then actual POWER9 would
help with that.

the only downside being that the blocks are so massive that we can't
realistically use them as-is.  however the unit tests give us a baseline to
"codemorph" against.

still the biggest next milestone is being able to select littlend/bigend
code in order to run microwatt unit tests.  still thinking that through.

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

* Re: [libre-riscv-dev] daily kan-ban update 11jul2020
From: Luke Kenneth Casson Leighton @ 2020-07-12  1:56 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDzThqgf0oXaNJCVT8o1sXWha7YSnUaXN5uwvZuV5giOmQ@mail.gmail.com>

On Saturday, July 11, 2020, Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:

>
> still the biggest next milestone is being able to select littlend/bigend
> code in order to run microwatt unit tests.  still thinking that through.
>

for now i have set up a module with a single global flag that everything
uses.  this can be changed later to respect the appropriate MSR bit.

i identified that in PowerDecoder the instruction byte swapping was
inverted.  correcting this brought the decoder into line with qemu and with
microwatt test binaries.

the next phase was to track down a bug in core.py where rather than take
the conditional output from the CompUnit i had connected directly to the
pipeline ALU output.

the pipeline output obvuously changes depending on what cycle is currently
being executed, resulting in data corruption.

whereas the CompUnit Manager's entire job is to latch that data at the
correct point in time, then present it to the Regfile Bus on request.

this allowed me to progress to another bug that i will investigate
tomorrow.  there may be a ST instruction missing from the CSV files, i have
to track it down.

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] daily kan-ban update 12jul2020
From: Luke Kenneth Casson Leighton @ 2020-07-12 12:43 UTC (permalink / raw)
  To: Libre-RISCV General Development

tasks:
https://bugs.libre-soc.org/showdependencytree.cgi?maxdepth=1&id=383&hide_resolved=1

yesterday:

* big addition of bigendian flag throughout code (qemu, ISACaller, tests)
* started running helloworld.bin again

today:

* fixed simple bug in PowerDecoder2, OP_B was not setting LR register write
* added LD/ST cacheing-inhibit instructions

so that's enough to get helloworld "operational" as far as running
without a UART peripheral is concerned.  the next stage will be to
drop a UART peripheral (simulated or otherwise) onto the memory bus.
these are what the ld/st cache-inhibit instructions are supposed to be
used for, to access the peripheral at address 0xc0000000.

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

* Re: [libre-riscv-dev] bisecting nmigen
From: Jacob Lifshay @ 2020-07-13  1:14 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDy9Vu1G5X90bsRs0eSnm_50rM5JxYCtF-MKjFvdh_LSpQ@mail.gmail.com>

I found the cause of the bug and submitted a pull request to fix it:
cause: https://github.com/nmigen/nmigen/issues/429#issuecomment-657304913
pull request: https://github.com/nmigen/nmigen/pull/430

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] daily kan-ban update 12jul2020
From: Jacob Lifshay @ 2020-07-13  1:48 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDzUMD5Ykn4=td7oi2xxZBsdKr5SF0k=crGGXwCi6Ra+_A@mail.gmail.com>

today:
found the root cause and created a fix for nmigen's zeros in vcd issue

Finished off the pull request for adding string-typed vcd variables
and for outputting values as strings instead of u64 values:
https://github.com/sgpthomas/vcdump/pull/1

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] daily kan-ban update 12jul2020
From: Jacob Lifshay @ 2020-07-13  3:49 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD7bdo0wSW39D7fhxDAJOpxnthhDXX1TSAuJvmiq1M8cNg@mail.gmail.com>

I also just proposed adding a API to nmigen to output VCD events. You
can think of them as the VCD file having certain times marked. I think
they would be useful for unit tests since we could output them to the
VCD file when we read all the variables in a unit test.

https://github.com/nmigen/nmigen/issues/431

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] daily kan-ban update 12jul2020
From: Luke Kenneth Casson Leighton @ 2020-07-13  9:42 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD4ouF5mhrV9-_Kwz79mzU05ss_Ww5cNnANZFT+nT6yKNg@mail.gmail.com>

On Mon, Jul 13, 2020 at 4:49 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> I also just proposed adding a API to nmigen to output VCD events. You
> can think of them as the VCD file having certain times marked. I think
> they would be useful for unit tests since we could output them to the
> VCD file when we read all the variables in a unit test.

so... this is like... debug log notifications?  (which are missing
from nmigen, and it's quite a nuisance).

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] bisecting nmigen
From: Luke Kenneth Casson Leighton @ 2020-07-13  9:43 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD7Wt_n--MMHEvrLr7357r_LHngBydnp+SLN7FhW35weYA@mail.gmail.com>

excellent!

On Mon, Jul 13, 2020 at 2:14 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> I found the cause of the bug and submitted a pull request to fix it:
> cause: https://github.com/nmigen/nmigen/issues/429#issuecomment-657304913
> pull request: https://github.com/nmigen/nmigen/pull/430
>
> Jacob
>
> _______________________________________________
> 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

* Re: [libre-riscv-dev] daily kan-ban update 12jul2020
From: Jacob Lifshay @ 2020-07-13  9:51 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxpF3zfj-uBiu4YVzBf6xwB_h5g5wP2FobE+-4zxhJgNA@mail.gmail.com>

On Mon, Jul 13, 2020, 02:43 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:

> On Mon, Jul 13, 2020 at 4:49 AM Jacob Lifshay <programmerjake@gmail.com>
> wrote:
> >
> > I also just proposed adding a API to nmigen to output VCD events. You
> > can think of them as the VCD file having certain times marked. I think
> > they would be useful for unit tests since we could output them to the
> > VCD file when we read all the variables in a unit test.
>
> so... this is like... debug log notifications?  (which are missing
> from nmigen, and it's quite a nuisance).
>

kinda -- they show up as signals in gtkwave

>
additional info after 30s of searching:
https://stackoverflow.com/questions/33095017/how-to-specify-annotations-in-vcd-files

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] daily kan-ban update 12jul2020
From: Luke Kenneth Casson Leighton @ 2020-07-13  9:58 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD4vW=KQFy7KWF--Pnqvjve59G3mQmP-202SWT9jvp_7Ow@mail.gmail.com>

On Mon, Jul 13, 2020 at 10:51 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> On Mon, Jul 13, 2020, 02:43 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> wrote:
>
> > On Mon, Jul 13, 2020 at 4:49 AM Jacob Lifshay <programmerjake@gmail.com>
> > wrote:
> > >
> > > I also just proposed adding a API to nmigen to output VCD events. You
> > > can think of them as the VCD file having certain times marked. I think
> > > they would be useful for unit tests since we could output them to the
> > > VCD file when we read all the variables in a unit test.
> >
> > so... this is like... debug log notifications?  (which are missing
> > from nmigen, and it's quite a nuisance).
> >
>
> kinda -- they show up as signals in gtkwave

that's good.  it's close enough.  what would be better (if it's at all
possible):  yield ev1("some additional debug info %d" %
some_runtime_variable)  although just the event (at all) would be
extremely useful.

> additional info after 30s of searching:
> https://stackoverflow.com/questions/33095017/how-to-specify-annotations-in-vcd-files

except without nmigen support it's moot.

_______________________________________________
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] discrepancy in v3.0B spec immediate shift operations regarding sh field, XS-form
From: Luke Kenneth Casson Leighton @ 2020-07-13 13:08 UTC (permalink / raw)
  To: openpower-hdl-cores; +Cc: Libre-RISCV General Development

apologies again, keenly aware that the team is extremely busy with POWER10.

another discrepancy has been detected in the V3.0B specification
regarding all XS (and MD) Form fields for "sh".  V3.0B p20 Book I
Section 1.7, sh is defined - *defined* - as:

sh (30,16:20)
    Fields that are concatenated to specify a shift
    amount.
    Formats: MD, XS

this as best i can tell places the bits of sh into the correct order -
*as defined by this section*.

now let us move to a definition of an XS-Form instruction, for example
extswsli.   the bits are identified as:

31   RS    RA    sh    445 sh Rc
0    6    11    16    21     30 31

*however* - and here is where the discrepancy exists - the pseudo-code
then goes on to place sh[5] into a *different* position:

   n <- sh[5] || sh[0:4]

this as best i can tell does effectively exactly the same
bit-reordering as the definition covered in Section 1.7 and
consequently *does it twice*.

it could be argued that the pseudo-code is "clear" because it is
taking the bits from the instruction field and "re-ordering" them,
however remember that *by definition* in Section 1.7 *those bits have
already been re-ordered*.  bit 30 is, by definition in Section 1.7,
*already* sh[5].

consequently we logically conclude that the pseudo-code is incorrect,
in all cases (sradi, extswsli, rldimi, rldic, rldicl, rldicr) and
should simply be:

    n <- sh

this change has been tested and found to be correct.

unfortunately, again, i must apologise: as we are critically dependent
on the actual pseudo-code for correct functionality of the
python-based cycle-accurate simulator, we have to commit these changes
to the published pseudo-code on the libre-soc.org website, without
delay, as part of the funding remit from NLNet, under the PET
Programme.

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] daily kan-ban update 13jul2020
From: Luke Kenneth Casson Leighton @ 2020-07-13 15:40 UTC (permalink / raw)
  To: Libre-RISCV General Development

task list:

https://bugs.libre-soc.org/showdependencytree.cgi?maxdepth=1&id=383&hide_resolved=1

yesterday:

got a significant way running microwatt helloworld binary.  further
progress needs a 16550 UART.

today:

* closed a number of completed bugreports
* added unit tests for extswsli
* reported v3.0B spec bug
* started on formal proof for extswsli

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

* Re: [libre-riscv-dev] daily kan-ban update 13jul2020
From: Tobias Platen @ 2020-07-13 18:36 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAPweEDxUCw4+kvd9-xTAj=EU-P+S2ak+S+tv6nLiHMD=Cgteew@mail.gmail.com>

today:

I've updated the .gitlab-ci.yml as it is missing a dependency (nmigen-soc). 
I was able to run the test_microwatt.py and test_issuer without any errors.

@programmerjake the .gitlab-ci.yml says https://github.com/nmigen/nmigen.git, is this correct.
First I tried out https://github.com/nmigen/nmigen.git which says nmigen-0.1 then 
I tried out https://github.com/m-labs/migen which is nmigen-0.2.
I saw that you commited a bugfix to https://github.com/nmigen/nmigen so I assume that is the most recent version.

Tobias

_______________________________________________
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 13jul2020
From: Jacob Lifshay @ 2020-07-13 19:35 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200713203612.a464abb49dd8ed831e358a86@platen-software.de>

On Mon, Jul 13, 2020, 11:36 Tobias Platen <libre-soc@platen-software.de>
wrote:

> today:
>
> I've updated the .gitlab-ci.yml as it is missing a dependency
> (nmigen-soc).
> I was able to run the test_microwatt.py and test_issuer without any errors.
>

make sure to use https://github.com/nmigen/nmigen-soc.git since that
recently fixed a dependency issue that was causing nmigen to be reverted to
nmigen 0.1 from PyPI

>
> @programmerjake the .gitlab-ci.yml says
> https://github.com/nmigen/nmigen.git, is this correct.
>

yes, that is correct.

> First I tried out https://github.com/nmigen/nmigen.git which says
> nmigen-0.1 then
>
it's actually on nmigen-0.3-dev, you might have seen 0.1 from the
nmigen-soc dependency issue

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

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