summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-06-14 03:19:05 -0400
committerTest_User <hax@andrewyu.org>2023-06-14 03:19:05 -0400
commit523518b60efde6a605a8fbc33f14f9924fd08d69 (patch)
treef660b6c58e2f638800187030541c3d53e33c383e
parent6efc740c4be65bdb7e9d1067d0f4137954732a10 (diff)
downloadspecification-523518b60efde6a605a8fbc33f14f9924fd08d69.tar.gz
specification-523518b60efde6a605a8fbc33f14f9924fd08d69.zip
Bit of change to parameters, and fixing it to actually say what I meant; more assembler progress as well
-rw-r--r--cpu/instructions/overview.txt2
-rw-r--r--cpu/instructions/parameter.txt14
2 files changed, 11 insertions, 5 deletions
diff --git a/cpu/instructions/overview.txt b/cpu/instructions/overview.txt
index 2730593..280c845 100644
--- a/cpu/instructions/overview.txt
+++ b/cpu/instructions/overview.txt
@@ -18,7 +18,7 @@ Dynamic VLIW
If an exception would be generated by attempting to write one value there but not the other, the exception might not occur if the other value is what is written
Format:
- size_of_instructions
+ size_of_instructions // size so it won't have to parse each to find where the immediate references start
for each:
opcode
num_instructions
diff --git a/cpu/instructions/parameter.txt b/cpu/instructions/parameter.txt
index 47cf30a..311c00a 100644
--- a/cpu/instructions/parameter.txt
+++ b/cpu/instructions/parameter.txt
@@ -1,6 +1,6 @@
-n: min number of bits to be able to represent all types
+n: min number of bits to be able to represent all parameter types
y: min size required to represent each power of two value less than or equal to the current mode (in bytes, and greater than or equal to 1)
-x: y + [min size to represent each valid offset into the immediate value array]
+x: n + y + max([min size to represent each valid offset into the immediate value array], [min size to represent all registers])
Binary format:
type[n], data[x]
@@ -11,20 +11,26 @@ Types:
Value is placed directly in the data section
Immediate reference:
- data[0 to x-y-1]:
+ data[n to x-y-1]:
size of immediate value
data[x-y to x-1]:
byte offset into the array of immediate values
Register:
- data just to select which register
+ data[n to x-y-1]:
+ how much of the register to use
+
+ data[x-y to x-1]:
+ which register to use
Memory at immediate reference:
Uses RAM pointed to by the value as obtained in `immediate reference` above
+ Size is specified by data[0 to n-1]
Memory at register:
Uses RAM pointed to by the value as obtained in `register` above
+ Size is specified by data[0 to n-1]
TODO: Will add more later