diff options
| author | Nathan Lee <me@nwlee.tech> | 2026-06-12 21:26:58 -0500 |
|---|---|---|
| committer | Nathan Lee <me@nwlee.tech> | 2026-06-12 21:26:58 -0500 |
| commit | 5ebbd6d53b6b4a21178e07fdaaeeeee40941c561 (patch) | |
| tree | dec59b18732942ad309f3a0e49ae747e176c2b4a /src/state.rs | |
| parent | f0007668e61816594734612e7592cbeac1ca5a94 (diff) | |
implement CSR ops
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state.rs b/src/state.rs index 6b1fb81..d4690bb 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,10 +1,10 @@ use crate::mem::Memory; -use std::collections::HashSet; pub struct CpuState { pub memory: Memory, pub registers: [u32; 32], pub f_registers: [f32; 32], + pub csr: [u32; 4096], pub pc: u32, pub reserved_addr: Option<usize>, } @@ -15,6 +15,7 @@ impl CpuState { memory, registers: [0u32; 32], f_registers: [0f32; 32], + csr: [0u32; 4096], pc: 0, reserved_addr: None, } |
