(no commit message)
[libreriscv.git] / simple_v_extension / remap.mdwn
index afccb13c39837e4e161295373bb4ebd20a03a114..8447b6907400cf766b1774f0c9d85d77ed8ad856 100644 (file)
@@ -80,10 +80,11 @@ shows this more clearly, and may be executed as a python program:
     idxs = [0,0,0] # starting indices
     order = [1,0,2] # experiment with different permutations, here
     offs = 0        # experiment with different offsets, here
+    modulo = 64     # set different modulus, here
 
     for idx in range(xdim * ydim * zdim):
         new_idx = offs + idxs[0] + idxs[1] * xdim + idxs[2] * xdim * ydim
-        print new_idx,
+        print new_idx % modulo
         for i in range(3):
             idxs[order[i]] = idxs[order[i]] + 1
             if (idxs[order[i]] != lims[order[i]]):