From: bugzilla-daemon@libre-soc.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 335] Formal Correctness Proof for Branch pipeline
Date: Fri, 22 May 2020 18:42:36 +0000
Message-ID: <bug-335-13-jyXv9EkBCx@https.bugs.libre-soc.org/> (raw)
In-Reply-To: <bug-335-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=335
--- Comment #4 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #3)
> mmm... what about when op.lk is zero?
>
> when op.lk is zero, we don't want dut.o.lr.ok to be set.
>
> there's four cases to be covered
>
> * rec.lk true, LK true
> * rec.lk false, LK true
> * rec.lk true, LK false
> * rec.lk false, LK false
>
> i belive dut.o.lr.ok should only be set when rec.lk is true and LK is true
>
> however if i put "Assert lr_ok.ok == 0" the proof fails, indicating
> a potential problem?
>
>
> --- a/src/soc/fu/branch/formal/proof_main_stage.py
> +++ b/src/soc/fu/branch/formal/proof_main_stage.py
> @@ -129,6 +129,8 @@ class Driver(Elaboratable):
> with m.If(LK & rec.lk):
> comb += Assert(lr_o.data == (cia + 4)[0:64])
> comb += Assert(lr_o.ok == 1)
> + with m.Else():
> + comb += Assert(lr_o.ok == rec.lk)
>
> # Check that CTR is decremented
> with m.If(~BO[2]):
Ah, it looks like power_decoder2 already handles this for us. It only sets
dec2.e.lk if the instruction has the lk flag set in the table, and LK is set in
the instruction field.
--
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
next prev parent reply index
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 13:04 [libre-riscv-dev] [Bug 335] New: " bugzilla-daemon
2020-05-21 13:05 ` [libre-riscv-dev] [Bug 335] " bugzilla-daemon
2020-05-22 18:24 ` bugzilla-daemon
2020-05-22 18:29 ` bugzilla-daemon
2020-05-22 18:35 ` bugzilla-daemon
2020-05-22 18:42 ` bugzilla-daemon [this message]
2020-05-22 18:47 ` bugzilla-daemon
2020-05-22 18:50 ` bugzilla-daemon
2020-05-22 18:50 ` bugzilla-daemon
2020-05-22 19:00 ` bugzilla-daemon
2020-05-24 18:33 ` bugzilla-daemon
2020-05-24 19:20 ` bugzilla-daemon
2020-05-25 0:22 ` bugzilla-daemon
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=bug-335-13-jyXv9EkBCx@https.bugs.libre-soc.org/ \
--to=bugzilla-daemon@libre-soc.org \
--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