Skip to content

Commit 7bf949c

Browse files
committed
more about cp
1 parent 7df9138 commit 7bf949c

4 files changed

Lines changed: 41 additions & 3 deletions

File tree

book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ title = "cubenotes"
1313
additional-css = ["theme/pagetoc.css", "theme/custom.css"]
1414
additional-js = ["theme/pagetoc.js", "theme/custom.js"]
1515
smart-punctuation = true
16-
git-repository-url = "https://github.com/vxpm/psxnotes"
16+
git-repository-url = "https://github.com/vxpm/cubenotes"

src/command-processor.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,43 @@
33
The command processor is responsible for fetching and processing commands generated by the CPU from
44
a FIFO.
55

6-
## CP FIFO
6+
## Registers
7+
8+
> [!NOTE]
9+
> The FIFO registers are described in the FIFO section next.
10+
11+
### CP Status (`0x0C00_0000`, 2 bytes)
12+
13+
| Bits | Name | Description |
14+
| ----- | ----------------------- | ------------------------------- |
15+
| 0 | CP FIFO Overflow | [Watermark logic](#linked-mode) |
16+
| 1 | CP FIFO Underflow | [Watermark logic](#linked-mode) |
17+
| 2 | CP is idle for reading | |
18+
| 3 | CP is idle for commands | |
19+
| 4 | BP Interrupt | |
20+
| 5..16 | | Unused |
21+
22+
### CP Control (`0x0C00_0002`, 2 bytes)
23+
24+
| Bits | Name | Description |
25+
| ----- | --------------------------- | ----------------------------------------------- |
26+
| 0 | CP FIFO Read Enable | Whether the CP will read commands from the FIFO |
27+
| 1 | BP Enable | |
28+
| 2 | CP FIFO Overflow IRQ Enable | |
29+
| 3 | CP FIFO Overflow IRQ Enable | |
30+
| 4 | CP FIFO Linked Mode | Controls the [FIFO mode](#fifo). On reset is 1 |
31+
| 5 | BP IRQ Enable | |
32+
| 6..16 | | Unused |
33+
34+
### CP Clear (`0x0C00_0004`, 2 bytes, write only)
35+
36+
| Bits | Name | Description |
37+
| ----- | ----------------------- | ----------------------------- |
38+
| 0 | Clear CP FIFO Overflow | Write 1 to clear status bit 0 |
39+
| 1 | Clear CP FIFO Underflow | Write 1 to clear status bit 1 |
40+
| 2..16 | | Unused |
41+
42+
## FIFO
743

844
The command processor has a FIFO mechanism that builds and consumes ring buffers of commands in RAM,
945
controlled by a bunch of registers:

src/introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ Currently, it is not sufficient on it's own - please see [the resources page](re
2424
e.g. `0xDEAD_BEEF`
2525
- Likewise, binary values are always prefixed with `0b` and separated with an underline every 4
2626
digits, e.g. `0b1111_0000_1010_0011`
27+
- Every MMIO register is both readable and writable unless stated otherwise
28+
- Every bit flag is 0 for `false` and 1 for `true` unless stated otherwise

src/processor-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The processor interface is responsible for connecting the CPU to the Flipper.
66

77
The PI receives interrupt requests from Flipper and passes them along to the CPU.
88

9-
## PI FIFO
9+
## FIFO
1010

1111
Within the PI exists a FIFO mechanism that catches burst writes[^wgp] to `0x0C00_8000` and writes
1212
them to a ring buffer in memory. It's controlled by three registers:

0 commit comments

Comments
 (0)