X-Git-Url: https://git.libre-soc.org/?p=soc.git;a=blobdiff_plain;f=src%2Fsoc%2Fdecoder%2Fpower_regspec_map.py;h=05ff4814e2504e3acbc5924b614031b460f8bd7c;hp=241dc94e7a3f0b54d02241e2d0b73a16f48a68b7;hb=5963eef6679f6833b6b8f854868d90480e3753b2;hpb=4250c7e26c9056f86da1338add6cdc7f9a57a128 diff --git a/src/soc/decoder/power_regspec_map.py b/src/soc/decoder/power_regspec_map.py index 241dc94e..05ff4814 100644 --- a/src/soc/decoder/power_regspec_map.py +++ b/src/soc/decoder/power_regspec_map.py @@ -1,69 +1,73 @@ """regspec_decode -function for the relationship between regspecs and Decode2Execute1Type +functions for the relationship between regspecs and Decode2Execute1Type -see https://libre-soc.org/3d_gpu/architecture/regfile/ section on regspecs -""" -from nmigen import Const -from soc.regfile.regfiles import XERRegs, FastRegs -from soc.decoder.power_enums import CryIn +these functions encodes the understanding (relationship) between +Regfiles, Computation Units, and the Power ISA Decoder (PowerDecoder2). +based on the regspec, which contains the register file name and register +name, return a tuple of: -def regspec_decode(e, regfile, name): - """regspec_decode +* how the decoder should determine whether the Function Unit needs + access to a given Regport or not +* which Regfile number on that port should be read to get that data +* when it comes to writing: likewise, which Regfile num should be written - this function encodes the understanding (relationship) between - Regfiles, Computation Units, and the Power ISA Decoder (PowerDecoder2). +Note that some of the port numbering encoding is *unary*. in the case +of "Full Condition Register", it's a full 8-bit mask of read/write-enables. +This actually matches directly with the XFX field in MTCR, and at +some point that 8-bit mask from the instruction could actually be passed +directly through to full_cr (TODO). - based on the regspec, which contains the register file name and register - name, return a tuple of: +For the INT and CR numbering, these are expressed in binary in the +instruction and need to be converted to unary (1<