pub struct Icache { /* private fields */ }Expand description
The 16 KiB instruction cache.
Implementations§
Source§impl Icache
impl Icache
Sourcepub const fn read_word(&self, addr: u32) -> u32
pub const fn read_word(&self, addr: u32) -> u32
The instruction word at addr from a resident line.
Sourcepub const fn install(&mut self, addr: u32, data: [u8; 32])
pub const fn install(&mut self, addr: u32, data: [u8; 32])
Install a freshly filled line.
The I-cache is read-only to the CPU, so a fill never evicts anything that
needs writing back — only Hit_Write_Back can move data outward, and it
is explicitly requested.
Sourcepub const fn store_tag(&mut self, addr: u32, tag_lo: u32)
pub const fn store_tag(&mut self, addr: u32, tag_lo: u32)
Index_Store_Tag: overwrite the tag at the index addr selects.
Sourcepub const fn invalidate_index(&mut self, addr: u32)
pub const fn invalidate_index(&mut self, addr: u32)
Clear the valid bit at the index addr selects, keeping the tag.
Sourcepub const fn hit_invalidate(&mut self, addr: u32)
pub const fn hit_invalidate(&mut self, addr: u32)
Invalidate the line covering addr, but only if it is resident.
Sourcepub const fn flush_hit(&self, addr: u32) -> Option<Writeback<32>>
pub const fn flush_hit(&self, addr: u32) -> Option<Writeback<32>>
Hit_Write_Back: push a resident line’s contents out to memory.
The I-cache has no dirty bit and the CPU never writes it, so on hardware this can only ever rewrite memory with what it already held — unless memory was changed underneath it, which is exactly the case n64-systemtest constructs.