corrections to predicate fn
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 28 Jun 2018 09:09:24 +0000 (10:09 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 28 Jun 2018 09:09:24 +0000 (10:09 +0100)
simple_v_extension/simple_v_chennai_2018.tex

index bc69edf9e3f844042cfc8e5b62cc6452f8e500bf..902f7cc22a4ca9583b362fa488bdd1fff3d17c54 100644 (file)
@@ -370,9 +370,9 @@ for (i = 0; i < 16; i++) // 16 CSRs?
 \begin{semiverbatim}
 def get\_pred\_val(bool is\_fp\_op, int reg):
    tb = int\_pred if is\_fp\_op else fp\_pred
-   if (!tb[reg].enabled):
-      return ~0x0              // all ops enabled
-   predidx = tb[reg].predidx   // redirection occurs HERE
+   if (!tb[reg].enabled): return ~0x0 // all ops enabled
+   predidx  = tb[reg].predidx  // redirection occurs HERE
+   predidx += tb[reg].bank << 5 // 0 (1=rsvd)
    predicate = intreg[predidx] // actual predicate HERE
    if (tb[reg].inv):
       predicate = ~predicate   // invert ALL bits