X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fsoc%2Ffu%2Ftest%2Fcommon.py;h=6489f5a0d6e35aa5125f288cd309368e49ecdbdd;hb=04aad087e4493a4d39cca928c8d2f3a1461b1736;hp=009797dc7e05ab050dec3533ac5eb86881a4233d;hpb=d652efe4157cfc39bc08685a4c7b968a1d9c236e;p=soc.git diff --git a/src/soc/fu/test/common.py b/src/soc/fu/test/common.py index 009797dc..6489f5a0 100644 --- a/src/soc/fu/test/common.py +++ b/src/soc/fu/test/common.py @@ -3,14 +3,119 @@ Bugreports: * https://bugs.libre-soc.org/show_bug.cgi?id=361 """ +import inspect +import functools +import types from soc.decoder.power_enums import XER_bits, CryIn, spr_dict -from soc.regfile.util import fast_reg_to_spr # HACK! -from soc.regfile.regfiles import FastRegs +from soc.regfile.util import fast_reg_to_spr, slow_reg_to_spr # HACK! +from soc.regfile.regfiles import XERRegs, FastRegs + + +# TODO: make this a util routine (somewhere) +def mask_extend(x, nbits, repeat): + res = 0 + extended = (1<