From 523518b60efde6a605a8fbc33f14f9924fd08d69 Mon Sep 17 00:00:00 2001 From: Test_User Date: Wed, 14 Jun 2023 03:19:05 -0400 Subject: Bit of change to parameters, and fixing it to actually say what I meant; more assembler progress as well --- cpu/instructions/overview.txt | 2 +- cpu/instructions/parameter.txt | 14 ++++++++++---- 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 -- cgit v1.2.3