MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / csr_mtvec_read_write

Function csr_mtvec_read_write

crates/virtual-machine/tests/vm_csr.rs:35–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33fn csr_misa_readonly() {
34 let mut csrs = CsrFile::new();
35 let original = csrs.read(addr::MISA).expect("CSR access should succeed");
36
37 // Writes to MISA should be ignored (WARL)
38 csrs.write(addr::MISA, 0)
39 .expect("CSR access should succeed");
40 assert_eq!(
41 csrs.read(addr::MISA).expect("CSR access should succeed"),
42 original
43 );

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected