From: lkcl Date: Wed, 11 Mar 2020 04:50:02 +0000 (+0000) Subject: (no commit message) X-Git-Tag: convert-csv-opcode-to-binary~3140 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1eb523e05f00662be5d429765b2f168fe0609e69;p=libreriscv.git --- diff --git a/3d_gpu/architecture/decoder.mdwn b/3d_gpu/architecture/decoder.mdwn index 4ca718256..f0572f47b 100644 --- a/3d_gpu/architecture/decoder.mdwn +++ b/3d_gpu/architecture/decoder.mdwn @@ -4,9 +4,14 @@ The decoder is in charge of translating the RISCV or POWER instruction stream in Source code: -## POWER +# POWER + +The decoder has been written in python, to parse straight CSV files and othrr information taken directly from the Power ISA Standards PDF files. This significantly reduces the possibility of manual transcription errors and greatly reduces code size. These tables are in [[openpower/isatables]]. + +The top level decoder object recursively drops through progressive levels of case statement groups, covering additional portions of the incoming instruction bits. More on this is outlined here + +## Fixed point instructions -### Fixed point instructions - `addi`, `addis`, `mulli` - fairly straightforward - extract registers and immediate and translate to the appropriate op - `addic`, `addic.`, `subfic` - similar to above, but now carry needs to be saved somewhere - `add[o][.]`, `subf[o][.]`, `adde*`, `subfe*`, `addze*`, `neg*`, `mullw*`, `divw*` - These are more fun. They need to set the carry (if `.` is present) and overflow (if `o` is present) flags, as well as taking in the carry flag for the `e`xtended versions. @@ -16,5 +21,4 @@ Source code: