regenerate the cramium-soc utralib to contain the additional debug access methods

This commit is contained in:
bunnie 2024-06-06 17:56:52 +08:00
parent ed42ee0be7
commit 397596c8e9

View file

@ -46,6 +46,7 @@ impl Field {
}
pub const fn offset(&self) -> usize { self.offset }
pub const fn mask(&self) -> usize { self.mask }
pub const fn register(&self) -> Register { self.register }
}
#[derive(Debug, Copy, Clone)]
pub struct CSR<T> {
@ -160,6 +161,9 @@ where
base: Arc::new(AtomicPtr::new(base))
}
}
pub unsafe fn base(&self) -> *mut T {
self.base.load(core::sync::atomic::Ordering::SeqCst) as *mut T
}
pub fn clone(&self) -> Self {
AtomicCsr {
base: self.base.clone()