summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md37
-rw-r--r--sv/soc/bus/dmactl.sv8
-rw-r--r--sv/soc/irq/pimc.sv4
-rw-r--r--tb/soc/irq/tb_pimc.cpp4
4 files changed, 45 insertions, 8 deletions
diff --git a/README.md b/README.md
index def3aff..2ed13ce 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,45 @@ Only accessed by the CPU for certain instructions. Cannot be directly read/writt
| `rp` | 64 bits | Return pointer for branches |
| `ins` | 64 bits | Current instruction at `pc` |
+## Special Registers
+
+OSMX64 provides "special" control registers that may vary depending on the chip
+revision. These registers typically include chip-specific mode/control bits to
+configure the processor for certain modes of operations, etc. These registers
+cannot be accessed via the "mov" instruction and instead rely on independent wrs/rrs
+(i.e., special register write / special register read) instructions.
+
+### Common Special Registers
+
+| Name | Size | Purpose |
+| --------- | ------- | --------------------------- |
+| `SR_STATE`| 64 bits | Processor state bits |
+
+
+### SR\_STATE
+
+| Bit | Meaning | Purpose
+|------|---------------------- | ---------------------- |
+| 0 | Reserved | Must be zero |
+| 1 | Supervisor | Supervisor mode enable |
+| 2-31 | Reserved (must be 0) | Must be zero |
+
+
+
## Instructions
+
+### Special Register Access
+
+Special registers are identified with a 16-bit Special Register ID (SRID)
+and can be accessed through two special instructions.
+
+| Mnemonic | Effect |
+| -------------------------------- | ----------------------- |
+| `wrs` srid: r/imm, val: r | `SREGS[srid]` = `val` |
+| `rrs` dest: r, srid: r/imm | `dest` = `SREGS[srid]` |
+
+
### Bitwise Instructions
Bitwise logic operations can write to all registers except `v0`-`v7`, `x0` and `pc`. Can read from all registers except `v0`-`v7`.
diff --git a/sv/soc/bus/dmactl.sv b/sv/soc/bus/dmactl.sv
index c0851c1..27a13ec 100644
--- a/sv/soc/bus/dmactl.sv
+++ b/sv/soc/bus/dmactl.sv
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024 Athena Systems LLC and Ian Marco Moffett
+ * Copyright (c) 2024-2025 Ian Marco Moffett and the Osmora Team.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
+ * 3. Neither the name of Hyra nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -36,8 +36,8 @@ module dmactl #(
/* MMIO bases for DMA channels */
parameter C0_MMIO_BASE = 48'h1000140,
parameter C1_MMIO_BASE = 48'h1000153,
- parameter C2_MMIO_BASE = 48'h1000153,
- parameter C3_MMIO_BASE = 48'h1000166,
+ parameter C2_MMIO_BASE = 48'h1000166,
+ parameter C3_MMIO_BASE = 48'h100016E,
/* Channel control bits */
parameter CCTL_START = 0,
diff --git a/sv/soc/irq/pimc.sv b/sv/soc/irq/pimc.sv
index 15b82c9..21d5dde 100644
--- a/sv/soc/irq/pimc.sv
+++ b/sv/soc/irq/pimc.sv
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024 Athena Systems LLC and Ian Marco Moffett
+ * Copyright (c) 2024-2025 Ian Marco Moffett and the Osmora Team.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
+ * 3. Neither the name of Hyra nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
diff --git a/tb/soc/irq/tb_pimc.cpp b/tb/soc/irq/tb_pimc.cpp
index ec06a5d..7365649 100644
--- a/tb/soc/irq/tb_pimc.cpp
+++ b/tb/soc/irq/tb_pimc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024 Athena Systems LLC and Ian Marco Moffett
+ * Copyright (c) 2024-2025 Ian Marco Moffett and the Osmora Team.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
+ * 3. Neither the name of Hyra nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*