state.remap[2].shape = get_field(val, SV_REMAP_SHAPE2);
break;
}
+ case CSR_USHAPE0:
+ case CSR_USHAPE1:
+ case CSR_USHAPE2:
+ {
+ int shapeidx = which - CSR_USHAPE0;
+ state.shape[shapeidx].xsz = get_field(val, SV_SHAPE_XDIM);
+ state.shape[shapeidx].ysz = get_field(val, SV_SHAPE_YDIM);
+ state.shape[shapeidx].zsz = get_field(val, SV_SHAPE_ZDIM);
+ state.shape[shapeidx].offs = (get_field(val, (1<<7 )) ? 0x1 : 0) |
+ (get_field(val, (1<<15)) ? 0x2 : 0) |
+ (get_field(val, (1<<23)) ? 0x4 : 0);
+ state.shape[shapeidx].permute = get_field(val, SV_SHAPE_PERM);
+ break;
+ }
#endif
case CSR_FFLAGS:
dirty_fp_state;
return 0;// XXX TODO: return correct entry
case CSR_UREMAP:
return 0;// XXX TODO: return correct entry
+ case CSR_USHAPE0:
+ case CSR_USHAPE1:
+ case CSR_USHAPE2:
+ return 0;// XXX TODO: return correct entry
#endif
case CSR_FFLAGS:
require_fp;
#define SV_REMAP_SHAPE0 (0x3<<24)
#define SV_REMAP_SHAPE1 (0x3<<26)
#define SV_REMAP_SHAPE2 (0x3<<28)
+#define SV_SHAPE_XDIM (0x7f)
+#define SV_SHAPE_YDIM (0x7f<<8)
+#define SV_SHAPE_ZDIM (0x7f<<16)
+#define SV_SHAPE_PERM (0x7<<24)
#endif