va416xx/
trng.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    _reserved0: [u8; 0x0100],
5    imr: Imr,
6    isr: Isr,
7    icr: Icr,
8    config: Config,
9    valid: Valid,
10    ehr_data0: EhrData0,
11    ehr_data1: EhrData1,
12    ehr_data2: EhrData2,
13    ehr_data3: EhrData3,
14    ehr_data4: EhrData4,
15    ehr_data5: EhrData5,
16    rnd_source_enable: RndSourceEnable,
17    sample_cnt1: SampleCnt1,
18    autocorr_statistic: AutocorrStatistic,
19    debug_control: DebugControl,
20    _reserved15: [u8; 0x04],
21    sw_reset: SwReset,
22    _reserved16: [u8; 0x74],
23    busy: Busy,
24    rst_bits_counter: RstBitsCounter,
25    _reserved18: [u8; 0x20],
26    bist_cntr0: BistCntr0,
27    bist_cntr1: BistCntr1,
28    bist_cntr2: BistCntr2,
29}
30impl RegisterBlock {
31    #[doc = "0x100 - Interrupt Mask Register"]
32    #[inline(always)]
33    pub const fn imr(&self) -> &Imr {
34        &self.imr
35    }
36    #[doc = "0x104 - Interrupt Status Register"]
37    #[inline(always)]
38    pub const fn isr(&self) -> &Isr {
39        &self.isr
40    }
41    #[doc = "0x108 - Interrupt Clear Register"]
42    #[inline(always)]
43    pub const fn icr(&self) -> &Icr {
44        &self.icr
45    }
46    #[doc = "0x10c - Configuration Register"]
47    #[inline(always)]
48    pub const fn config(&self) -> &Config {
49        &self.config
50    }
51    #[doc = "0x110 - Valid Register"]
52    #[inline(always)]
53    pub const fn valid(&self) -> &Valid {
54        &self.valid
55    }
56    #[doc = "0x114 - Entropy Holding Register Data Register"]
57    #[inline(always)]
58    pub const fn ehr_data0(&self) -> &EhrData0 {
59        &self.ehr_data0
60    }
61    #[doc = "0x118 - Entropy Holding Register Data Register"]
62    #[inline(always)]
63    pub const fn ehr_data1(&self) -> &EhrData1 {
64        &self.ehr_data1
65    }
66    #[doc = "0x11c - Entropy Holding Register Data Register"]
67    #[inline(always)]
68    pub const fn ehr_data2(&self) -> &EhrData2 {
69        &self.ehr_data2
70    }
71    #[doc = "0x120 - Entropy Holding Register Data Register"]
72    #[inline(always)]
73    pub const fn ehr_data3(&self) -> &EhrData3 {
74        &self.ehr_data3
75    }
76    #[doc = "0x124 - Entropy Holding Register Data Register"]
77    #[inline(always)]
78    pub const fn ehr_data4(&self) -> &EhrData4 {
79        &self.ehr_data4
80    }
81    #[doc = "0x128 - Entropy Holding Register Data Register"]
82    #[inline(always)]
83    pub const fn ehr_data5(&self) -> &EhrData5 {
84        &self.ehr_data5
85    }
86    #[doc = "0x12c - Random Source Enable Register"]
87    #[inline(always)]
88    pub const fn rnd_source_enable(&self) -> &RndSourceEnable {
89        &self.rnd_source_enable
90    }
91    #[doc = "0x130 - Section TBD"]
92    #[inline(always)]
93    pub const fn sample_cnt1(&self) -> &SampleCnt1 {
94        &self.sample_cnt1
95    }
96    #[doc = "0x134 - Auto-correlator Statistic Register"]
97    #[inline(always)]
98    pub const fn autocorr_statistic(&self) -> &AutocorrStatistic {
99        &self.autocorr_statistic
100    }
101    #[doc = "0x138 - Section TBD"]
102    #[inline(always)]
103    pub const fn debug_control(&self) -> &DebugControl {
104        &self.debug_control
105    }
106    #[doc = "0x140 - Reset Register"]
107    #[inline(always)]
108    pub const fn sw_reset(&self) -> &SwReset {
109        &self.sw_reset
110    }
111    #[doc = "0x1b8 - Busy Register"]
112    #[inline(always)]
113    pub const fn busy(&self) -> &Busy {
114        &self.busy
115    }
116    #[doc = "0x1bc - Reset Bits Counter Register"]
117    #[inline(always)]
118    pub const fn rst_bits_counter(&self) -> &RstBitsCounter {
119        &self.rst_bits_counter
120    }
121    #[doc = "0x1e0 - BIST Counter Register"]
122    #[inline(always)]
123    pub const fn bist_cntr0(&self) -> &BistCntr0 {
124        &self.bist_cntr0
125    }
126    #[doc = "0x1e4 - BIST Counter Register"]
127    #[inline(always)]
128    pub const fn bist_cntr1(&self) -> &BistCntr1 {
129        &self.bist_cntr1
130    }
131    #[doc = "0x1e8 - BIST Counter Register"]
132    #[inline(always)]
133    pub const fn bist_cntr2(&self) -> &BistCntr2 {
134        &self.bist_cntr2
135    }
136}
137#[doc = "IMR (rw) register accessor: Interrupt Mask Register\n\nYou can [`read`](crate::Reg::read) this register and get [`imr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`imr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@imr`] module"]
138#[doc(alias = "IMR")]
139pub type Imr = crate::Reg<imr::ImrSpec>;
140#[doc = "Interrupt Mask Register"]
141pub mod imr;
142#[doc = "ISR (r) register accessor: Interrupt Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`isr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@isr`] module"]
143#[doc(alias = "ISR")]
144pub type Isr = crate::Reg<isr::IsrSpec>;
145#[doc = "Interrupt Status Register"]
146pub mod isr;
147#[doc = "ICR (rw) register accessor: Interrupt Clear Register\n\nYou can [`read`](crate::Reg::read) this register and get [`icr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`icr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@icr`] module"]
148#[doc(alias = "ICR")]
149pub type Icr = crate::Reg<icr::IcrSpec>;
150#[doc = "Interrupt Clear Register"]
151pub mod icr;
152#[doc = "CONFIG (rw) register accessor: Configuration Register\n\nYou can [`read`](crate::Reg::read) this register and get [`config::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`config::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@config`] module"]
153#[doc(alias = "CONFIG")]
154pub type Config = crate::Reg<config::ConfigSpec>;
155#[doc = "Configuration Register"]
156pub mod config;
157#[doc = "VALID (r) register accessor: Valid Register\n\nYou can [`read`](crate::Reg::read) this register and get [`valid::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@valid`] module"]
158#[doc(alias = "VALID")]
159pub type Valid = crate::Reg<valid::ValidSpec>;
160#[doc = "Valid Register"]
161pub mod valid;
162#[doc = "EHR_DATA0 (r) register accessor: Entropy Holding Register Data Register\n\nYou can [`read`](crate::Reg::read) this register and get [`ehr_data0::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ehr_data0`] module"]
163#[doc(alias = "EHR_DATA0")]
164pub type EhrData0 = crate::Reg<ehr_data0::EhrData0Spec>;
165#[doc = "Entropy Holding Register Data Register"]
166pub mod ehr_data0;
167pub use ehr_data0 as ehr_data1;
168pub use ehr_data0 as ehr_data2;
169pub use ehr_data0 as ehr_data3;
170pub use ehr_data0 as ehr_data4;
171pub use ehr_data0 as ehr_data5;
172pub use EhrData0 as EhrData1;
173pub use EhrData0 as EhrData2;
174pub use EhrData0 as EhrData3;
175pub use EhrData0 as EhrData4;
176pub use EhrData0 as EhrData5;
177#[doc = "RND_SOURCE_ENABLE (rw) register accessor: Random Source Enable Register\n\nYou can [`read`](crate::Reg::read) this register and get [`rnd_source_enable::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rnd_source_enable::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rnd_source_enable`] module"]
178#[doc(alias = "RND_SOURCE_ENABLE")]
179pub type RndSourceEnable = crate::Reg<rnd_source_enable::RndSourceEnableSpec>;
180#[doc = "Random Source Enable Register"]
181pub mod rnd_source_enable;
182#[doc = "SAMPLE_CNT1 (rw) register accessor: Section TBD\n\nYou can [`read`](crate::Reg::read) this register and get [`sample_cnt1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sample_cnt1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sample_cnt1`] module"]
183#[doc(alias = "SAMPLE_CNT1")]
184pub type SampleCnt1 = crate::Reg<sample_cnt1::SampleCnt1Spec>;
185#[doc = "Section TBD"]
186pub mod sample_cnt1;
187#[doc = "AUTOCORR_STATISTIC (rw) register accessor: Auto-correlator Statistic Register\n\nYou can [`read`](crate::Reg::read) this register and get [`autocorr_statistic::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`autocorr_statistic::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@autocorr_statistic`] module"]
188#[doc(alias = "AUTOCORR_STATISTIC")]
189pub type AutocorrStatistic = crate::Reg<autocorr_statistic::AutocorrStatisticSpec>;
190#[doc = "Auto-correlator Statistic Register"]
191pub mod autocorr_statistic;
192#[doc = "DEBUG_CONTROL (rw) register accessor: Section TBD\n\nYou can [`read`](crate::Reg::read) this register and get [`debug_control::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`debug_control::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@debug_control`] module"]
193#[doc(alias = "DEBUG_CONTROL")]
194pub type DebugControl = crate::Reg<debug_control::DebugControlSpec>;
195#[doc = "Section TBD"]
196pub mod debug_control;
197#[doc = "SW_RESET (rw) register accessor: Reset Register\n\nYou can [`read`](crate::Reg::read) this register and get [`sw_reset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sw_reset::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sw_reset`] module"]
198#[doc(alias = "SW_RESET")]
199pub type SwReset = crate::Reg<sw_reset::SwResetSpec>;
200#[doc = "Reset Register"]
201pub mod sw_reset;
202#[doc = "BUSY (r) register accessor: Busy Register\n\nYou can [`read`](crate::Reg::read) this register and get [`busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@busy`] module"]
203#[doc(alias = "BUSY")]
204pub type Busy = crate::Reg<busy::BusySpec>;
205#[doc = "Busy Register"]
206pub mod busy;
207#[doc = "RST_BITS_COUNTER (rw) register accessor: Reset Bits Counter Register\n\nYou can [`read`](crate::Reg::read) this register and get [`rst_bits_counter::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rst_bits_counter::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rst_bits_counter`] module"]
208#[doc(alias = "RST_BITS_COUNTER")]
209pub type RstBitsCounter = crate::Reg<rst_bits_counter::RstBitsCounterSpec>;
210#[doc = "Reset Bits Counter Register"]
211pub mod rst_bits_counter;
212#[doc = "BIST_CNTR0 (r) register accessor: BIST Counter Register\n\nYou can [`read`](crate::Reg::read) this register and get [`bist_cntr0::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@bist_cntr0`] module"]
213#[doc(alias = "BIST_CNTR0")]
214pub type BistCntr0 = crate::Reg<bist_cntr0::BistCntr0Spec>;
215#[doc = "BIST Counter Register"]
216pub mod bist_cntr0;
217pub use bist_cntr0 as bist_cntr1;
218pub use bist_cntr0 as bist_cntr2;
219pub use BistCntr0 as BistCntr1;
220pub use BistCntr0 as BistCntr2;