diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-06-26 23:34:38 -0500 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-06-26 23:34:38 -0500 |
| commit | 338a12a1382afebc6c82e0b40768d87bcab3d8d1 (patch) | |
| tree | 445a6dc22c2c9ddb99b0f831d68fb1999f0ceebc /doc/mmio.txt | |
| parent | 3a46ab5b8691e72098e3c43f5e25ca84385a5de6 (diff) | |
| download | rvcontroller-main.tar rvcontroller-main.tar.gz rvcontroller-main.tar.bz2 rvcontroller-main.tar.xz rvcontroller-main.zip | |
Diffstat (limited to 'doc/mmio.txt')
| -rw-r--r-- | doc/mmio.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/mmio.txt b/doc/mmio.txt new file mode 100644 index 0000000..b4c384b --- /dev/null +++ b/doc/mmio.txt @@ -0,0 +1,41 @@ +RVController Memory-Mapped I/O +============================== + +Base address is configurable, see csr.txt. + +Base + 0: Mesecons I/O Direction + + 31 4 3 2 1 0 ++---------------------------------------------+ +| Reserved |MDRD|MDRC|MDRB|MDRA| ++---------------------------------------------+ + +MDRA: Mesecons I/O Direction, pin A +MDRB: Mesecons I/O Direction, pin B +MDRC: Mesecons I/O Direction, pin C +MDRD: Mesecons I/O Direction, pin D + +When a bit in this register is set to 0, the corresponding pin is an input. +When set to 1, the corresponding pin is an output. +Changing a pin from output to input while the output is active may cause unusual behavior due to Luacontroller limitations. + +Base + 1: Mesecons I/O Data + + 31 4 3 2 1 0 ++---------------------------------------------+ +| Reserved |MDTD|MDTC|MDTB|MDTA| ++---------------------------------------------+ + +MDTA: Mesecons I/O Data, pin A +MDTB: Mesecons I/O Data, pin B +MDTC: Mesecons I/O Data, pin C +MDTD: Mesecons I/O Data, pin D +For inputs: Each bit contains the state of the corresponding input. Writes are ignored. +For outputs: Each bit contains the state of the corresponding output. Writing to these bits turns the output on/off. +Fields are read-only for inputs and read/write for outputs. + +Base + 2: mtime (see RISC-V Machine Level ISA specification) + +Base + 10: mtimecmp (see RISC-V Machine Level ISA specification) + +Base + 18 - Base + 255: Reserved |
