[libre-riscv-dev] [Bug 272] functions needed in POWER simulator which match 3.0B spec
bugzilla-daemon at libre-riscv.org
bugzilla-daemon at libre-riscv.org
Wed Apr 1 16:35:42 BST 2020
http://bugs.libre-riscv.org/show_bug.cgi?id=272
--- Comment #12 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #11)
> i will attempt a pre and post process tomorrow which basically duplicates
> what you did to get src1 2 etc out of the opcode.
done - it works (although the code's a dreadful mess)
if you'd like to do that Int class i can use it immediately.
or, if you want to give it a shot, knock yourself out.
for i in range(32):
self[i] = [0] * 64 # TODO: needs to be IntClass(value=0, len=64)
the class needs to be something like:
class IntClass
def __init__(self, value, len):
self.value = value
self.len = len
then __add__ etc. all have to return an object which first asserts that
the len is the same for both operands.
the one thing, assign (now in soc/decoder/pseudo/parser.py) will, instead
of returning ast.Assign(name, expr) will have to return something like
this:
ast.Call(func=ast.Attribute(value=ast.Name(id='x'), attr='eq'),
args=[Num(n=5)],
keywords=[],
starargs=None,
kwargs=None))])
i got that from a little test program, parsing this:
x.eq(5)
so when we see "x <- 5"...
i'll add it to the parser, commented-out.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list