Skip to content

Real Time Device

Diogo Valadares Reis dos Santos edited this page Aug 20, 2025 · 2 revisions

[← Previous Page | Next Page →]

The Real-Time Device

The Real-Time Device (RTD) is a memory-mapped component responsible for storing the value of the time CSR and generating the Timer Interrupt signal.

image

The RTD contains two 64-bit registers. One, called mtime, keeps track of the current time, while the other, mcmptime, defines the time threshold that triggers a Timer Interrupt signal.

Each 64-bit register is split into two 32-bit segments. These segments can be written using store instructions at the appropriate addresses, and similarly read using load instructions. However, when a CSR read instruction is executed to access the time or timeh CSRs, a system load instruction automatically retrieves the value from these registers.

Inside the Real-Time Device

Due to limitations in the Logisim simulation, the RTD register cannot update faster than the processor's clock. To work around this, a pulse generator was created and connected to the clock input of the mtime counter, allowing it to update twice per clock cycle.

Although the full value is 64 bits, each register is divided into two 32-bit segments. This design simplifies the circuitry required for data exchange.

image

This component was created following the RISC-V Advanced Core Local Interruptor Specification

Clone this wiki locally