From 78ab858783fac7e7f7986446da674e33b2cfbd9c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 15 Oct 2018 20:56:09 +0100 Subject: [PATCH] add example remap table for 2D --- simple_v_extension/specification.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/simple_v_extension/specification.mdwn b/simple_v_extension/specification.mdwn index 068e33c43..fef048cd2 100644 --- a/simple_v_extension/specification.mdwn +++ b/simple_v_extension/specification.mdwn @@ -886,4 +886,11 @@ for element-grouping, if there is unused space within a register idea: have an additional set of register CSRs that indicate that, instead of a straight 1D linear relationship, the element index is put through a (reasonably simple) 2D processing algorithm. in this way, 4x3 blocks -of registers can have the ordering changed to 3x4 for example. +of registers can have the ordering changed to 3x4 for example: + + xdim = CSRtb[reg].x_sz + ydim = CSRtb[reg].y_sz + + for idx in range(VL): + new_idx = (idx % xdim) * ydim + (idx / xdim) + -- 2.30.2