Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions architecture/RISCV/RV32IMFD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4171,3 +4171,22 @@ timer:
registers.mie |= 2n ** 7n; // MTIE = 1
disable: |
registers.mie &= ~(2n ** 7n); // MTIE = 0

devices:
- id: console
cls: ConsoleDevice
ctrl_addr: 0xf0000000
status_addr: 0xf0000004
data:
start: 0xf0000008
end: 0xf000000f
enabled: true

- id: os
cls: OSDriver
ctrl_addr: 0xf0000010
status_addr: 0xf0000014
data:
start: 0xf0000018
end: 0xf000001f
enabled: true
19 changes: 19 additions & 0 deletions architecture/RISCV/RV64IMFD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4373,3 +4373,22 @@ timer:
registers.mie |= 2n ** 7n; // MTIE = 1
disable: |
registers.mie &= ~(2n ** 7n); // MTIE = 0

devices:
- id: console
cls: ConsoleDevice
ctrl_addr: 0xf0000000
status_addr: 0xf0000004
data:
start: 0xf0000008
end: 0xf000000f
enabled: true

- id: os
cls: OSDriver
ctrl_addr: 0xf0000010
status_addr: 0xf0000014
data:
start: 0xf0000018
end: 0xf000001f
enabled: true
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion creator-assembler
3 changes: 1 addition & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

195 changes: 120 additions & 75 deletions docs/schema/architecture.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"description": "Architecture version",
"type": "string"
},
"register_files": {
"description": "Register files of the architecture",
"type": "array",
"items": {
"$ref": "#/definitions/RegisterFile"
}
},
"config": {
"description": "Metadata about the architecture",
"allOf": [
Expand All @@ -32,6 +25,13 @@
}
]
},
"devices": {
"description": "Device configuration",
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/Device"
}
},
"directives": {
"description": "Directives allowed",
"type": "array",
Expand Down Expand Up @@ -106,6 +106,13 @@
}
}
},
"register_files": {
"description": "Register files of the architecture",
"type": "array",
"items": {
"$ref": "#/definitions/RegisterFile"
}
},
"timer": {
"description": "Timer configuration",
"anyOf": [
Expand Down Expand Up @@ -154,70 +161,11 @@
}
]
},
"RegisterFile": {
"description": "Register file",
"type": "object",
"required": ["double_precision", "registers", "name", "type"],
"properties": {
"double_precision": {
"description": "Whether the registers have double the word size",
"type": "boolean"
},
"registers": {
"description": "Registers in this file",
"type": "array",
"items": {
"$ref": "#/definitions/Register"
}
},
"name": {
"description": "Name of the register file",
"type": "string"
},
"type": {
"description": "Type of the registers",
"allOf": [
{
"$ref": "#/definitions/RegisterType"
}
]
}
}
},
"RegisterType": {
"description": "Types of register files allowed",
"oneOf": [
{
"description": "Control registers",
"type": "string",
"enum": ["ctrl"]
},
{
"description": "Integer registers",
"type": "string",
"enum": ["int"]
},
{
"description": "Floating point registers",
"type": "string",
"enum": ["float"]
},
{
"description": "Vector registers",
"type": "string",
"enum": ["v_registers"]
},
{
"description": "Control state registers",
"type": "string",
"enum": ["csr_registers"]
}
]
},
"Config": {
"description": "Architecture metadata attributes",
"type": "object",
"required": [
"comment_prefix",
"description",
"endianness",
"main_function",
Expand Down Expand Up @@ -310,6 +258,50 @@
}
}
},
"Device": {
"type": "object",
"required": ["cls", "ctrl_addr", "data", "id", "status_addr"],
"properties": {
"cls": {
"description": "Device class",
"allOf": [
{
"$ref": "#/definitions/DeviceClasses"
}
]
},
"ctrl_addr": {
"description": "Device's control register's address",
"type": "integer",
"minimum": 0.0
},
"data": {
"description": "Device's data segment",
"allOf": [
{
"$ref": "#/definitions/Range_of_Integer"
}
]
},
"enabled": {
"description": "Device's default status (default: enabled)",
"type": ["boolean", "null"]
},
"id": {
"description": "Device ID",
"type": "string"
},
"status_addr": {
"description": "Device's status register's address",
"type": "integer",
"minimum": 0.0
}
}
},
"DeviceClasses": {
"type": "string",
"enum": ["ConsoleDevice", "OSDriver"]
},
"Assembler": {
"description": "CREATOR Assembler",
"type": "object",
Expand Down Expand Up @@ -523,6 +515,7 @@
"nwords": {
"description": "Size of the instruction",
"type": "integer",

"minimum": 0.0
},
"properties": {
Expand Down Expand Up @@ -1164,7 +1157,6 @@
"Function call",
"Transfer between registers",
"Memory access",
"Vector Set Length Instruction with an inmediate",
"Other"
]
},
Expand Down Expand Up @@ -1199,7 +1191,7 @@
],
"properties": {
"check": {
"description": "JS code to be executed in order to check what type of interrupt ocurred. It must return an `InterruptType` (if an interrupt happened) or `null` (if it didn't)",
"description": "JS code to be executed in order to check what type of interrupt occurred. It must return an `InterruptType` (if an interrupt happened) or `null` (if it didn't)",
"type": "string"
},
"clear": {
Expand Down Expand Up @@ -1375,14 +1367,10 @@
"required": ["end", "start"],
"properties": {
"end": {
"type": "integer",
"minimum": 0,
"maximum": 18446744073709551615
"type": "integer"
},
"start": {
"type": "integer",
"minimum": 0,
"maximum": 18446744073709551615
"type": "integer"
}
}
},
Expand Down Expand Up @@ -1424,6 +1412,63 @@
}
}
},
"RegisterFile": {
"description": "Register file",
"type": "object",
"oneOf": [
{
"description": "Control registers",
"type": "object",
"required": ["type"],
"properties": {
"type": {
"type": "string",
"enum": ["ctrl"]
}
}
},
{
"description": "Integer registers",
"type": "object",
"required": ["type"],
"properties": {
"type": {
"type": "string",
"enum": ["int"]
}
}
},
{
"description": "Floating point registers",
"type": "object",
"required": ["double_precision", "type"],
"properties": {
"double_precision": {
"description": "Whether the registers have double the word size",
"type": "boolean"
},
"type": {
"type": "string",
"enum": ["float"]
}
}
}
],
"required": ["name", "registers"],
"properties": {
"name": {
"description": "Name of the register file",
"type": "string"
},
"registers": {
"description": "Registers in this file",
"type": "array",
"items": {
"$ref": "#/definitions/Register"
}
}
}
},
"RegisterProperty": {
"description": "Properties of a register",
"oneOf": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@uiw/codemirror-themes": "^4.25.1",
"@xterm/addon-fit": "^0.10.0",
"@xterm/addon-web-links": "^0.11.0",
"ajv": "^8.17.1",
"ajv": "^8.20.0",
"ansicolor": "^2.0.3",
"bootstrap": "^5.3.8",
"bootstrap-vue-next": "^0.40.6",
Expand Down
Loading
Loading