diff --git a/utralib/src/generated/precursor_pvt.rs b/utralib/src/generated/precursor_pvt.rs index a6ecb0d89..2c35e17c0 100644 --- a/utralib/src/generated/precursor_pvt.rs +++ b/utralib/src/generated/precursor_pvt.rs @@ -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 { @@ -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() diff --git a/utralib/src/generated/renode.rs b/utralib/src/generated/renode.rs index f461cd1c2..d8467154a 100644 --- a/utralib/src/generated/renode.rs +++ b/utralib/src/generated/renode.rs @@ -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 { @@ -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()