-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchitecture-schema.json
180 lines (180 loc) · 6.45 KB
/
architecture-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{
"$id": "https://example.com/architecture-schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Architecture",
"type": "object",
"properties": {
"$schema": {},
"name": {
"type": "string",
"title": "Architecture Name",
"description": "The architecture's name."
},
"description": {
"type": "string",
"title": "Architecture Description",
"description": "A description of the architecture."
},
"year": {
"type": "integer",
"title": "Founding Date",
"description": "The starting year of the project.",
"minimum": 1900
},
"endian": {
"type": "string",
"title": "Endian-ness",
"description": "Describes wether the architecture is little endian or big endian.",
"enum": [
"little",
"big"
]
},
"bits": {
"type": "integer",
"title": "Number of Bits",
"description": "The number of bits that the architecture supports.",
"minimum": 1,
"maximum": 1024
},
"memoryBytes": {
"type": "integer",
"title": "Number of Bytes in the Memory",
"description": "This is the number of bytes in the entire memory."
},
"registers": {
"type": "array",
"title": "Register Data",
"description": "The registers that the architecture supports.",
"items": {
"$ref": "#/defs/register"
}
},
"instructions": {
"type": "array",
"title": "Instructions",
"description": "The instructions that the architecture supports.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Instruction Type",
"description": "The type of instruction.",
"enum": [
"BREAK",
"ADD",
"OR",
"1B_LEFT_SHIFT",
"PUSH_SR"
]
},
"name": {
"type": "string",
"title": "Instruction Name",
"description": "The name of the instruction."
},
"description": {
"type": "string",
"title": "Instruction Description",
"description": "A description of the instruction."
},
"mode": {
"type": "string",
"title": "Instruction Mode",
"description": "Describes what mode the instruction uses.",
"pattern": "^(implied|immediate|absolute|zeropage|zeropage,[0-9a-zA-Z]+|\\(indirect,[0-9a-zA-Z]+\\))$"
},
"bytes": {
"type": "integer",
"title": "Number of Bytes",
"description": "The number of bytes that the instruction consists of.",
"minimum": 1,
"maximum": 1024
},
"opcode": {
"type": "string",
"title": "Opcode",
"description": "The opcode of the instruction."
},
"assembler": {
"type": "string",
"title": "Assembler String",
"description": "The assembler code for the instruction."
},
"cycles": {
"type": "integer",
"title": "Cycle Length",
"description": "The number of cycles that it takes the instruction to be run.",
"minimum": 0,
"maximum": 1048576
},
"minCycles": {
"type": "integer",
"title": "Minimum Cycle Length",
"description": "The minimum number of cycles that it takes for the instruction to be run.",
"minimum": 0,
"maximum": 1048576
},
"maxCycles": {
"type": "integer",
"title": "Maximum Cycle Length",
"description": "The maximum number of cycles that it takes for the instruction to be run.",
"minimum": 0,
"maximum": 1048576
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/defs/location"
}
},
"output": {
"$ref": "#/defs/location"
}
},
"additionalProperties": false
}
}
},
"required": [
"name",
"registers",
"instructions"
],
"defs": {
"register": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Register Name",
"description": "The name of the register."
},
"description": {
"type": "string",
"title": "Register Description",
"description": "A description of the register."
}
},
"additionalProperties": false
},
"location": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"constant",
"register"
]
},
"registerName": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}