summaryrefslogtreecommitdiff
path: root/BigGolf
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-10-02 15:32:49 -0700
committerJulian Blake Kongslie2022-10-02 15:32:49 -0700
commit82cc71261d3d32012d33d3bebe56ca5e3b0bcdbd (patch)
treef1358a38d244e27d9740e914c54328d753cb0b4f /BigGolf
downloadbiggolf-82cc71261d3d32012d33d3bebe56ca5e3b0bcdbd.tar.xz
Initial commit.
Diffstat (limited to '')
-rw-r--r--BigGolf135
1 files changed, 135 insertions, 0 deletions
diff --git a/BigGolf b/BigGolf
new file mode 100644
index 0000000..9a308bd
--- /dev/null
+++ b/BigGolf
@@ -0,0 +1,135 @@
1The "Big Golf" Microarchitecture
2
3
4
5Allowed memory combinations:
6 * Any two loads
7 * Any two stores with different addresses (n.b. LLC is limited to 1 eviction per cycle)
8 * Any load with any younger store
9
10Instruction opcodes:
11 0 AND logical AND from memory to accumulator
12 1 TAD Two's-complement ADd from memory to accumulator
13 2 ISZ Increment and Skip if Zero
14 3 DCA Deposit and Clear Accumulator
15 4 JMS JuMp Subroutine
16 5 JMP JuMP
17 6 IOT In-Out Transfer (device accesses)
18 7 OPR microsequenced OPeRations (miscellaneous, like clear/rotate/etc)
19
20Memory transactions: Opcodes that do it: (second set is the indirect versions)
21 * Fetch instruction 01234567 01234567
22 * Indirect address load 0123
23 * Autoincrement store 0123
24 * Execution load 012 012 45
25 * Execution store 234 234
26
27
28
29┌─────┐ ┌──────┐ ┌────┐
30│Fetch├──────►│Decode│ ┌►│Exec│
31└─────┘ └──────┘ │ └────┘
32
33 next_pc ┌──init_indirect_load │ init_execution_store
34 │ init_execution_load──┤ retire
35 │ init_execution_store │
36 │ retire │
37 │ rubberband_stall(1/2)│
38 │ │
39 │ ┌───────┐ │
40 └►│Autoinc│ │
41 └───────┘ │
42
43 ┌──init_autoinc_store │
44 │ init_execution_load──┤
45 │ init_execution_store │
46 │ retire │
47 │ │
48 │ ┌─────┐ │
49 └►│Indir│ │
50 └─────┘ │
51
52 init_execution_load──┘
53 init_execution_store
54 retire
55
56
57
58Possible arbitration techniques:
59 * Rubberband stalling in Decode + positional arbitration
60 * Age/address/operation comparison without rubberbanding
61 * Longer clock cycles, or
62 * Extra cycle
63
64What to do with cache misses?
65 * Stall entire pipeline to maintain simpler ordering constraints
66 * If only loads are missing, allow everything else to proceed?
67 * Always allow Fetch to proceed?
68
69Need separate logic to detect SMC clobbers *anyway*
70
71
72
73OPR opcodes:
74
75 "group 1"
76 _0___1___2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10 _11
77 | | | | | | |RAR|RAL| 0 | |
78 | 1 1 1 | 0 |CLA|CLL|CMA|CML|RTR|RTL| 1 |IAC|
79 |___|___|___|___|___|___|___|___|___|___|___|___|
80
81 CLA CLear Accumulator
82 CLL CLear Link
83 CMA CoMplement Accumulator
84 CML CoMplement Link
85 RAR Rotate Accumulator Right (if bit 10 is 0)
86 RAL Rotate Accumulator Left (if bit 10 is 0)
87 RTR Rotate (Twice) accumulator and link Right (if bit 10 is 1)
88 RTL Rotate (Twice) accumulator and link Left (if bit 10 is 1)
89 IAC Increment ACcumulator
90 BSW Byte Swap word in accumulator (if bits 8 and 9 are 0, and bit 10 is 1)
91
92 Logical order of operations:
93 CLA, CLL
94 CMA, CML
95 IAC
96 RAR, RAL, RTR, RTL, BSW
97
98 "group 2"
99 _0___1___2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10 _11
100 | | | |SMA|SZA|SNL| 0 | | | |
101 | 1 1 1 | 1 |CLA|SPA|SNA|SZL| 1 |OSR|HLT| 0 |
102 |___|___|___|___|___|___|___|___|___|___|___|___|
103
104 SMA Skip on Minus Accumulator (skip if high bit of accumulator is set) (if bit 8 is 0)
105 SPA Skip on Plus Accumulator (skip if high bit of accumulator is clear) (if bit 8 is 1)
106 SZA Skip on Zero Accumulator (if bit 8 is 0)
107 SNA Skip on Nonzero Accumulator (if bit 8 is 1)
108 SNL Skip on Nonzero Link (if bit 8 is 0)
109 SZL Skip on Zero Link (if bit 8 is 1)
110 OSR bitwise Or Switch Register into accumulator
111 HLT HaLT processor
112 CLA CLear Accumulator
113
114 Logical order of operations:
115 SMA, SZA, SNL
116 SPA, SNA, SZL
117 CLA
118 OSR, HLT
119
120 "mq"
121 _0___1___2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10 _11
122 | | | | | | | | | | |
123 | 1 1 1 | 1 |CLA|MQA| |MQL| | | | 1 |
124 |___|___|___|___|___|___|___|___|___|___|___|___|
125
126 CLA CLear Accumulator
127 MQL MQ Loads from Accumulator
128 MQA bitwise or MQ into Accumulator
129
130 bits 6,8,9,10 are used for extended arithmetic instructions
131 see https://homepage.divms.uiowa.edu/~jones/pdp8/refcard/74.html
132
133 Logical order of operations:
134 CLA
135 MQA, MQL (simultaneous parallel assignment)