1#[doc = "Register `iommu_tlb_flush_enable` reader"]
2pub type R = crate::R<IOMMU_TLB_FLUSH_ENABLE_SPEC>;
3#[doc = "Register `iommu_tlb_flush_enable` writer"]
4pub type W = crate::W<IOMMU_TLB_FLUSH_ENABLE_SPEC>;
5#[doc = "Field `mi_tlb_fs[0-6]` reader - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
6pub type MI_TLB_FS_R = crate::BitReader<MI_TLB_FS_A>;
7#[doc = "Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically.\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9pub enum MI_TLB_FS_A {
10 #[doc = "0: No clear operation or clear operation is completed"]
11 NO_CLEAR_OR_COMPLETED = 0,
12 #[doc = "1: Enable clear operation"]
13 ENABLE = 1,
14}
15impl From<MI_TLB_FS_A> for bool {
16 #[inline(always)]
17 fn from(variant: MI_TLB_FS_A) -> Self {
18 variant as u8 != 0
19 }
20}
21impl MI_TLB_FS_R {
22 #[doc = "Get enumerated values variant"]
23 #[inline(always)]
24 pub const fn variant(&self) -> MI_TLB_FS_A {
25 match self.bits {
26 false => MI_TLB_FS_A::NO_CLEAR_OR_COMPLETED,
27 true => MI_TLB_FS_A::ENABLE,
28 }
29 }
30 #[doc = "No clear operation or clear operation is completed"]
31 #[inline(always)]
32 pub fn is_no_clear_or_completed(&self) -> bool {
33 *self == MI_TLB_FS_A::NO_CLEAR_OR_COMPLETED
34 }
35 #[doc = "Enable clear operation"]
36 #[inline(always)]
37 pub fn is_enable(&self) -> bool {
38 *self == MI_TLB_FS_A::ENABLE
39 }
40}
41#[doc = "Field `mi_tlb_fs[0-6]` writer - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
42pub type MI_TLB_FS_W<'a, REG> = crate::BitWriter<'a, REG, MI_TLB_FS_A>;
43impl<'a, REG> MI_TLB_FS_W<'a, REG>
44where
45 REG: crate::Writable + crate::RegisterSpec,
46{
47 #[doc = "No clear operation or clear operation is completed"]
48 #[inline(always)]
49 pub fn no_clear_or_completed(self) -> &'a mut crate::W<REG> {
50 self.variant(MI_TLB_FS_A::NO_CLEAR_OR_COMPLETED)
51 }
52 #[doc = "Enable clear operation"]
53 #[inline(always)]
54 pub fn enable(self) -> &'a mut crate::W<REG> {
55 self.variant(MI_TLB_FS_A::ENABLE)
56 }
57}
58#[doc = "Field `ma_tlb_fs` reader - Macro TLB Flush\n\nClear Macro TLB\n\nAfter the Flush operation is completed, the bit can clear automatically."]
59pub type MA_TLB_FS_R = crate::BitReader<MA_TLB_FS_A>;
60#[doc = "Macro TLB Flush\n\nClear Macro TLB\n\nAfter the Flush operation is completed, the bit can clear automatically.\n\nValue on reset: 0"]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum MA_TLB_FS_A {
63 #[doc = "0: No clear operation or clear operation is completed"]
64 NO_CLEAR_OR_COMPLETED = 0,
65 #[doc = "1: Enable clear operation"]
66 ENABLE = 1,
67}
68impl From<MA_TLB_FS_A> for bool {
69 #[inline(always)]
70 fn from(variant: MA_TLB_FS_A) -> Self {
71 variant as u8 != 0
72 }
73}
74impl MA_TLB_FS_R {
75 #[doc = "Get enumerated values variant"]
76 #[inline(always)]
77 pub const fn variant(&self) -> MA_TLB_FS_A {
78 match self.bits {
79 false => MA_TLB_FS_A::NO_CLEAR_OR_COMPLETED,
80 true => MA_TLB_FS_A::ENABLE,
81 }
82 }
83 #[doc = "No clear operation or clear operation is completed"]
84 #[inline(always)]
85 pub fn is_no_clear_or_completed(&self) -> bool {
86 *self == MA_TLB_FS_A::NO_CLEAR_OR_COMPLETED
87 }
88 #[doc = "Enable clear operation"]
89 #[inline(always)]
90 pub fn is_enable(&self) -> bool {
91 *self == MA_TLB_FS_A::ENABLE
92 }
93}
94#[doc = "Field `ma_tlb_fs` writer - Macro TLB Flush\n\nClear Macro TLB\n\nAfter the Flush operation is completed, the bit can clear automatically."]
95pub type MA_TLB_FS_W<'a, REG> = crate::BitWriter<'a, REG, MA_TLB_FS_A>;
96impl<'a, REG> MA_TLB_FS_W<'a, REG>
97where
98 REG: crate::Writable + crate::RegisterSpec,
99{
100 #[doc = "No clear operation or clear operation is completed"]
101 #[inline(always)]
102 pub fn no_clear_or_completed(self) -> &'a mut crate::W<REG> {
103 self.variant(MA_TLB_FS_A::NO_CLEAR_OR_COMPLETED)
104 }
105 #[doc = "Enable clear operation"]
106 #[inline(always)]
107 pub fn enable(self) -> &'a mut crate::W<REG> {
108 self.variant(MA_TLB_FS_A::ENABLE)
109 }
110}
111#[doc = "Field `pc_fs` reader - PTW Cache Flush Clear PTW Cache\n\nAfter the Flush operation is completed, the bit can clear automatically."]
112pub type PC_FS_R = crate::BitReader<PC_FS_A>;
113#[doc = "PTW Cache Flush Clear PTW Cache\n\nAfter the Flush operation is completed, the bit can clear automatically.\n\nValue on reset: 0"]
114#[derive(Clone, Copy, Debug, PartialEq, Eq)]
115pub enum PC_FS_A {
116 #[doc = "0: No clear operation or clear operation is completed"]
117 NO_CLEAR_OR_COMPLETED = 0,
118 #[doc = "1: Enable clear operation"]
119 ENABLE = 1,
120}
121impl From<PC_FS_A> for bool {
122 #[inline(always)]
123 fn from(variant: PC_FS_A) -> Self {
124 variant as u8 != 0
125 }
126}
127impl PC_FS_R {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> PC_FS_A {
131 match self.bits {
132 false => PC_FS_A::NO_CLEAR_OR_COMPLETED,
133 true => PC_FS_A::ENABLE,
134 }
135 }
136 #[doc = "No clear operation or clear operation is completed"]
137 #[inline(always)]
138 pub fn is_no_clear_or_completed(&self) -> bool {
139 *self == PC_FS_A::NO_CLEAR_OR_COMPLETED
140 }
141 #[doc = "Enable clear operation"]
142 #[inline(always)]
143 pub fn is_enable(&self) -> bool {
144 *self == PC_FS_A::ENABLE
145 }
146}
147#[doc = "Field `pc_fs` writer - PTW Cache Flush Clear PTW Cache\n\nAfter the Flush operation is completed, the bit can clear automatically."]
148pub type PC_FS_W<'a, REG> = crate::BitWriter<'a, REG, PC_FS_A>;
149impl<'a, REG> PC_FS_W<'a, REG>
150where
151 REG: crate::Writable + crate::RegisterSpec,
152{
153 #[doc = "No clear operation or clear operation is completed"]
154 #[inline(always)]
155 pub fn no_clear_or_completed(self) -> &'a mut crate::W<REG> {
156 self.variant(PC_FS_A::NO_CLEAR_OR_COMPLETED)
157 }
158 #[doc = "Enable clear operation"]
159 #[inline(always)]
160 pub fn enable(self) -> &'a mut crate::W<REG> {
161 self.variant(PC_FS_A::ENABLE)
162 }
163}
164impl R {
165 #[doc = "Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically.\n\nNOTE: `n` is number of field in register. `n == 0` corresponds to `mi_tlb0_fs` field"]
166 #[inline(always)]
167 pub fn mi_tlb_fs(&self, n: u8) -> MI_TLB_FS_R {
168 #[allow(clippy::no_effect)]
169 [(); 7][n as usize];
170 MI_TLB_FS_R::new(((self.bits >> n) & 1) != 0)
171 }
172 #[doc = "Bit 0 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
173 #[inline(always)]
174 pub fn mi_tlb0_fs(&self) -> MI_TLB_FS_R {
175 MI_TLB_FS_R::new((self.bits & 1) != 0)
176 }
177 #[doc = "Bit 1 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
178 #[inline(always)]
179 pub fn mi_tlb1_fs(&self) -> MI_TLB_FS_R {
180 MI_TLB_FS_R::new(((self.bits >> 1) & 1) != 0)
181 }
182 #[doc = "Bit 2 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
183 #[inline(always)]
184 pub fn mi_tlb2_fs(&self) -> MI_TLB_FS_R {
185 MI_TLB_FS_R::new(((self.bits >> 2) & 1) != 0)
186 }
187 #[doc = "Bit 3 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
188 #[inline(always)]
189 pub fn mi_tlb3_fs(&self) -> MI_TLB_FS_R {
190 MI_TLB_FS_R::new(((self.bits >> 3) & 1) != 0)
191 }
192 #[doc = "Bit 4 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
193 #[inline(always)]
194 pub fn mi_tlb4_fs(&self) -> MI_TLB_FS_R {
195 MI_TLB_FS_R::new(((self.bits >> 4) & 1) != 0)
196 }
197 #[doc = "Bit 5 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
198 #[inline(always)]
199 pub fn mi_tlb5_fs(&self) -> MI_TLB_FS_R {
200 MI_TLB_FS_R::new(((self.bits >> 5) & 1) != 0)
201 }
202 #[doc = "Bit 6 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
203 #[inline(always)]
204 pub fn mi_tlb6_fs(&self) -> MI_TLB_FS_R {
205 MI_TLB_FS_R::new(((self.bits >> 6) & 1) != 0)
206 }
207 #[doc = "Bit 16 - Macro TLB Flush\n\nClear Macro TLB\n\nAfter the Flush operation is completed, the bit can clear automatically."]
208 #[inline(always)]
209 pub fn ma_tlb_fs(&self) -> MA_TLB_FS_R {
210 MA_TLB_FS_R::new(((self.bits >> 16) & 1) != 0)
211 }
212 #[doc = "Bit 17 - PTW Cache Flush Clear PTW Cache\n\nAfter the Flush operation is completed, the bit can clear automatically."]
213 #[inline(always)]
214 pub fn pc_fs(&self) -> PC_FS_R {
215 PC_FS_R::new(((self.bits >> 17) & 1) != 0)
216 }
217}
218impl W {
219 #[doc = "Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically.\n\nNOTE: `n` is number of field in register. `n == 0` corresponds to `mi_tlb0_fs` field"]
220 #[inline(always)]
221 #[must_use]
222 pub fn mi_tlb_fs(&mut self, n: u8) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
223 #[allow(clippy::no_effect)]
224 [(); 7][n as usize];
225 MI_TLB_FS_W::new(self, n)
226 }
227 #[doc = "Bit 0 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
228 #[inline(always)]
229 #[must_use]
230 pub fn mi_tlb0_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
231 MI_TLB_FS_W::new(self, 0)
232 }
233 #[doc = "Bit 1 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
234 #[inline(always)]
235 #[must_use]
236 pub fn mi_tlb1_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
237 MI_TLB_FS_W::new(self, 1)
238 }
239 #[doc = "Bit 2 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
240 #[inline(always)]
241 #[must_use]
242 pub fn mi_tlb2_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
243 MI_TLB_FS_W::new(self, 2)
244 }
245 #[doc = "Bit 3 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
246 #[inline(always)]
247 #[must_use]
248 pub fn mi_tlb3_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
249 MI_TLB_FS_W::new(self, 3)
250 }
251 #[doc = "Bit 4 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
252 #[inline(always)]
253 #[must_use]
254 pub fn mi_tlb4_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
255 MI_TLB_FS_W::new(self, 4)
256 }
257 #[doc = "Bit 5 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
258 #[inline(always)]
259 #[must_use]
260 pub fn mi_tlb5_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
261 MI_TLB_FS_W::new(self, 5)
262 }
263 #[doc = "Bit 6 - Micro TLB\\[i\\] Flush Clear Micro TLB6\n\nAfter the Flush operation is completed, the bit can clear automatically."]
264 #[inline(always)]
265 #[must_use]
266 pub fn mi_tlb6_fs(&mut self) -> MI_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
267 MI_TLB_FS_W::new(self, 6)
268 }
269 #[doc = "Bit 16 - Macro TLB Flush\n\nClear Macro TLB\n\nAfter the Flush operation is completed, the bit can clear automatically."]
270 #[inline(always)]
271 #[must_use]
272 pub fn ma_tlb_fs(&mut self) -> MA_TLB_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
273 MA_TLB_FS_W::new(self, 16)
274 }
275 #[doc = "Bit 17 - PTW Cache Flush Clear PTW Cache\n\nAfter the Flush operation is completed, the bit can clear automatically."]
276 #[inline(always)]
277 #[must_use]
278 pub fn pc_fs(&mut self) -> PC_FS_W<IOMMU_TLB_FLUSH_ENABLE_SPEC> {
279 PC_FS_W::new(self, 17)
280 }
281 #[doc = r" Writes raw bits to the register."]
282 #[doc = r""]
283 #[doc = r" # Safety"]
284 #[doc = r""]
285 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
286 #[inline(always)]
287 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
288 self.bits = bits;
289 self
290 }
291}
292#[doc = "IOMMU TLB Flush Enable Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`iommu_tlb_flush_enable::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`iommu_tlb_flush_enable::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
293pub struct IOMMU_TLB_FLUSH_ENABLE_SPEC;
294impl crate::RegisterSpec for IOMMU_TLB_FLUSH_ENABLE_SPEC {
295 type Ux = u32;
296}
297#[doc = "`read()` method returns [`iommu_tlb_flush_enable::R`](R) reader structure"]
298impl crate::Readable for IOMMU_TLB_FLUSH_ENABLE_SPEC {}
299#[doc = "`write(|w| ..)` method takes [`iommu_tlb_flush_enable::W`](W) writer structure"]
300impl crate::Writable for IOMMU_TLB_FLUSH_ENABLE_SPEC {
301 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
302 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
303}
304#[doc = "`reset()` method sets iommu_tlb_flush_enable to value 0"]
305impl crate::Resettable for IOMMU_TLB_FLUSH_ENABLE_SPEC {
306 const RESET_VALUE: Self::Ux = 0;
307}