From: bugzilla-daemon@libre-riscv.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 272] functions needed in POWER simulator which match 3.0B spec
Date: Tue, 31 Mar 2020 20:06:50 +0000
Message-ID: <bug-272-13-r517xJRfTU@http.bugs.libre-riscv.org/> (raw)
In-Reply-To: <bug-272-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=272
--- Comment #9 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #7)
> (In reply to Luke Kenneth Casson Leighton from comment #3)
> > these are the functions, listed in 3.0B section 1.4.3 p6 - p7
> >
> > BCD_TO_DPD(x)
> > DPD_TO_BCD(x)
>
> The instructions that use these pseudocode functions (cbcdtd and cdtbcd)
> cause the qemu power9 machine to trap to an exception handler. Should I
> bother trying to implement them at the moment?
... naah :)
(In reply to Michael Nolan from comment #8)
> Status of each helper function in the document:
> SINGLE(x) - Float - needs softfloat library
let's leave this one for now. i'd like to focus on integer initially.
i am planning to do a "pre-prep" phase (which gets variables set up,
reading in advance from the regfile) and "post-cleanup" phase
(which writes out anything that was modified)
what we will need, however, is an indexable overloaded integer class.
(err, basically, the features of Signal).
in other words, due to the fact that you can do this:
RS[32:64] = product[0:32]
or
RS[0:32] = (RA)[0:32] + (RB)[0:32]
it means basically an integer class with operator overloads on
__add__ *and* it means adding a __getitem__ (in order to be able
to do the slice), and probably changing it to be this:
RS[0:32].eq(RA[0:32] + RB[0:32])
later, we will need a class for SimpleV anyway (so as to be able to change
bit-widths)
do you want to do that? it's basically a class:
class Int:
def __init__(self, value, width):
self.value = value
self.width = width
def __getitem__(self, idx):
if isinstance(idx, slice):
# TODO, convert slice to an &able mask,
# make sure that the length is that of the slice
else:
return Int((self.int & (1<<idx) >> idx, 1)
it will also need an "append" function - again, just like Signal can
use Cat().
it *might* - although performance will be absolutely terrible - be that
we are forced to individually slice bits into lists.
one other alternative, michael, is just... use Signal. it's got everything
needed.
ideas?
--
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: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 17:27 [libre-riscv-dev] [Bug 272] New: " bugzilla-daemon
2020-03-30 19:04 ` [libre-riscv-dev] [Bug 272] " bugzilla-daemon
2020-03-30 19:24 ` bugzilla-daemon
2020-03-31 12:57 ` bugzilla-daemon
2020-03-31 13:06 ` bugzilla-daemon
2020-03-31 14:24 ` bugzilla-daemon
2020-03-31 14:31 ` bugzilla-daemon
2020-03-31 18:35 ` bugzilla-daemon
2020-03-31 18:47 ` bugzilla-daemon
2020-03-31 20:06 ` bugzilla-daemon [this message]
2020-03-31 22:02 ` bugzilla-daemon
2020-03-31 23:07 ` bugzilla-daemon
2020-04-01 15:35 ` bugzilla-daemon
2020-04-01 18:40 ` bugzilla-daemon
2020-04-01 19:06 ` bugzilla-daemon
2020-04-01 21:55 ` bugzilla-daemon
2020-04-01 23:05 ` bugzilla-daemon
2020-04-01 23:44 ` bugzilla-daemon
2020-04-02 10:41 ` bugzilla-daemon
2020-04-05 18:37 ` bugzilla-daemon
[not found] <bug-272-13@https.bugs.libre-soc.org/>
2020-04-27 20:25 ` 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-272-13-r517xJRfTU@http.bugs.libre-riscv.org/ \
--to=bugzilla-daemon@libre-riscv.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