From 8b653a39caddc58a145ec21624ca88ffe317a7ee Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 4 Nov 2018 16:56:38 +0000 Subject: [PATCH] comments on remap csrs --- isa/rv64ud/sv_fadd_remap.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/isa/rv64ud/sv_fadd_remap.S b/isa/rv64ud/sv_fadd_remap.S index c0af566..794c1a5 100644 --- a/isa/rv64ud/sv_fadd_remap.S +++ b/isa/rv64ud/sv_fadd_remap.S @@ -29,6 +29,10 @@ RVTEST_CODE_BEGIN # Start of test code. SET_SV_2CSRS( SV_REG_CSR(0, 1, 0, 1, 1), SV_REG_CSR(0, 7, 0, 7, 1) ) SET_SV_REMAP_CSR(7, 0, 0, 0, 0, 0); + // x=3, y=2, z=1, where remap swaps xy to yx. therefore: + // 0 1 2 -> 0 3 + // 3 4 5 -> 1 4 + // -> 2 5 SET_SV_SHAPE0_CSR(3, 2, 1, 0, SV_SHAPE_PERM_YXZ ); SET_SV_VL(6) -- 2.30.2