From 529cdcc67dc17162054f2c8481b5615edcaf9126 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 6 Jun 2024 18:07:08 +0800 Subject: [PATCH] regenerate svd files for other targets --- utralib/src/generated/precursor_pvt.rs | 4 ++++ utralib/src/generated/renode.rs | 4 ++++ 2 files changed, 8 insertions(+) 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()