From: Luke Kenneth Casson Leighton Date: Wed, 25 Sep 2019 07:10:36 +0000 (+0100) Subject: replace description with table on cbranch X-Git-Tag: convert-csv-opcode-to-binary~3976 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2074986d133b95363f54175fff618f1a2bd50ed;p=libreriscv.git replace description with table on cbranch --- diff --git a/simple_v_extension/appendix.mdwn b/simple_v_extension/appendix.mdwn index aabe557be..8584f4267 100644 --- a/simple_v_extension/appendix.mdwn +++ b/simple_v_extension/appendix.mdwn @@ -210,18 +210,17 @@ are to be stored, as a bitmask. Additionally, the behaviour of the branch "invert" and "zeroing" bits are set. These four combinations result in "consensual branches", cbranch.ifnone (NOR), cbranch.ifany (OR), cbranch.ifall (AND), cbranch.ifnotall (NAND). -* If "invert" is zero, and "zeroing" is zero, the branch will occur if and only - all tests pass (AND, ifall) -* If "invert" is set and "zeroing" is zero, the branch will occur if all - tests *fail* (NAND, ifnotall) -* If "invert" is set and "zeroing" is -zero, the branch will occur if - even *one* test passes (OR, ifany) -* If "invert" is set and "zeroing" is set, the branch will occur if - even *one* test fails (NOR, ifnone) - -This inversion capability covers AND, OR, NAND and NOR branching based -on multiple element comparisons. Without the full set of four, it is necessary to have two-sequence branches: one conditional, one unconditional. +| invert | zeroing | description | operation | cbranch | +| ------ | ------- | --------------------------- | --------- | ------- | +| 0 | 0 | branch if all pass | AND | ifall | +| 1 | 0 | branch if one fails | NAND | ifnall | +| 0 | 1 | branch if one passes | OR | ifany | +| 1 | 1 | branch if all fail | NOR | ifnone | + +This inversion capability covers AND, OR, NAND and NOR branching +based on multiple element comparisons. Without the full set of four, +it is necessary to have two-sequence branch operations: one conditional, one +unconditional. Note that unlike normal computer programming early-termination of chains of AND or OR conditional tests,