Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: Jacob Lifshay <programmerjake@gmail.com>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: [libre-riscv-dev] bisecting nmigen
Date: Fri, 10 Jul 2020 17:46:14 -0700
Message-ID: <CAC2bXD5SRhuHW3AOXW66LouBQs6A07b+K0J9QFtDbG1BDj-pyA@mail.gmail.com> (raw)
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

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPweEDx7hh_eia79gvefVq2J13rbvyAum-5jxr-XX+9SHFG6CQ@mail.gmail.com>
     [not found] ` <CAC2bXD55UhNWrqsAQCKczTd=7oSWWrpDSrvLmvHeu77ZZ8mJVQ@mail.gmail.com>
     [not found]   ` <CAPweEDyJ7ZZFim9vk3YK1ttdARnfqeWqtdV_FeDJ-sfcSW4CTg@mail.gmail.com>
     [not found]     ` <CAC2bXD4OSaJ7VR0QaqkHJnTR2b5hvuy-o_jcs7DSWAgPPi906A@mail.gmail.com>
     [not found]       ` <CAPweEDy0R6vXm=Lm166dvNf39h4pnbT-ZdnOtDEu8H1+Vmzs9Q@mail.gmail.com>
     [not found]         ` <CAC2bXD7yK_pJkNTicyOV3jhwR-Wv+yQFw49sKqeBifR1tYC4-Q@mail.gmail.com>
2020-07-10 12:33           ` [libre-riscv-dev] daily kan-ban update 09jul2020 Luke Kenneth Casson Leighton
2020-07-10 17:13             ` Jacob Lifshay
2020-07-10 17:25               ` Luke Kenneth Casson Leighton
2020-07-10 17:59                 ` Jacob Lifshay
2020-07-10 20:44                   ` Luke Kenneth Casson Leighton
2020-07-10 21:13                     ` Jacob Lifshay
2020-07-11  0:46                       ` Jacob Lifshay [this message]
2020-07-11  1:12                         ` [libre-riscv-dev] bisecting nmigen Luke Kenneth Casson Leighton
2020-07-11  3:04                           ` Jacob Lifshay
2020-07-11  8:58                             ` Luke Kenneth Casson Leighton
2020-07-11 11:34                               ` Luke Kenneth Casson Leighton
2020-07-13  1:14                                 ` Jacob Lifshay
2020-07-13  9:43                                   ` Luke Kenneth Casson Leighton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC2bXD5SRhuHW3AOXW66LouBQs6A07b+K0J9QFtDbG1BDj-pyA@mail.gmail.com \
    --to=programmerjake@gmail.com \
    --cc=libre-riscv-dev@lists.libre-riscv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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