From: Tobias Platen Date: Mon, 15 Mar 2021 18:49:44 +0000 (+0100) Subject: add rpte bitfields valid and leaf X-Git-Tag: convert-csv-opcode-to-binary~33 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ebe37337daa7d6823c42ca0d17cf3bfe4f37b640;p=soc.git add rpte bitfields valid and leaf --- diff --git a/src/soc/decoder/isa/radixmmu.py b/src/soc/decoder/isa/radixmmu.py index 8b716aa5..34e5d4bb 100644 --- a/src/soc/decoder/isa/radixmmu.py +++ b/src/soc/decoder/isa/radixmmu.py @@ -31,6 +31,18 @@ def genmask(shift, size): res[size-1-i] = SelectableInt(1, 1) return res +# NOTE: POWER 3.0B annotation order! see p4 1.3.2 +# MSB is indexed **LOWEST** (sigh) +# from gem5 radixwalk.hh +# Bitfield<63> valid; 64 - (63 + 1) = 0 +# Bitfield<62> leaf; 64 - (62 + 1) = 1 + +def rpte_valid(r): + return bool(r[0]) + +def rpte_leaf(r): + return bool(r[1]) + """ Get Root Page