+#define SV_REMAP_CSR(reg0, shape0, reg1, shape1, reg2, shape2) \
+ (reg0 | (reg1<<8) | (reg2<<8) | \
+ (shape0<<24) | (shape0<<26) | (shape0<<28))
+
+#define SV_SHAPE_PERM_XYZ 0
+#define SV_SHAPE_PERM_XZY 1
+#define SV_SHAPE_PERM_YXZ 2
+#define SV_SHAPE_PERM_YZX 3
+#define SV_SHAPE_PERM_ZXY 4
+#define SV_SHAPE_PERM_ZYX 5
+
+#define SV_SHAPE_CSR(xd, yd, zd, offs, perm) \
+ ((xd-1) | ((yd-1)<<8) | ((zd-1)<<16) | (perm<<24) | \
+ ((offs&0x1)<<7) | ((offs&0x2)<<14) | ((offs&0x4)<<21) )
+
+