1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"CACHE"]
28unsafe impl ::core::marker::Send for super::Cache {}
29unsafe impl ::core::marker::Sync for super::Cache {}
30impl super::Cache {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "C-Cache Control Register"]
38 #[inline(always)]
39 pub const fn ccactl(
40 &self,
41 ) -> &'static crate::common::Reg<self::Ccactl_SPEC, crate::common::RW> {
42 unsafe {
43 crate::common::Reg::<self::Ccactl_SPEC, crate::common::RW>::from_ptr(
44 self._svd2pac_as_ptr().add(0usize),
45 )
46 }
47 }
48
49 #[doc = "C-Cache Flush Control Register"]
50 #[inline(always)]
51 pub const fn ccafct(
52 &self,
53 ) -> &'static crate::common::Reg<self::Ccafct_SPEC, crate::common::RW> {
54 unsafe {
55 crate::common::Reg::<self::Ccafct_SPEC, crate::common::RW>::from_ptr(
56 self._svd2pac_as_ptr().add(4usize),
57 )
58 }
59 }
60
61 #[doc = "C-Cache Line Configuration Register"]
62 #[inline(always)]
63 pub const fn ccalcf(
64 &self,
65 ) -> &'static crate::common::Reg<self::Ccalcf_SPEC, crate::common::RW> {
66 unsafe {
67 crate::common::Reg::<self::Ccalcf_SPEC, crate::common::RW>::from_ptr(
68 self._svd2pac_as_ptr().add(8usize),
69 )
70 }
71 }
72
73 #[doc = "S-Cache Control Register"]
74 #[inline(always)]
75 pub const fn scactl(
76 &self,
77 ) -> &'static crate::common::Reg<self::Scactl_SPEC, crate::common::RW> {
78 unsafe {
79 crate::common::Reg::<self::Scactl_SPEC, crate::common::RW>::from_ptr(
80 self._svd2pac_as_ptr().add(64usize),
81 )
82 }
83 }
84
85 #[doc = "S-Cache Flush Control Register"]
86 #[inline(always)]
87 pub const fn scafct(
88 &self,
89 ) -> &'static crate::common::Reg<self::Scafct_SPEC, crate::common::RW> {
90 unsafe {
91 crate::common::Reg::<self::Scafct_SPEC, crate::common::RW>::from_ptr(
92 self._svd2pac_as_ptr().add(68usize),
93 )
94 }
95 }
96
97 #[doc = "S-Cache Line Configuration Register"]
98 #[inline(always)]
99 pub const fn scalcf(
100 &self,
101 ) -> &'static crate::common::Reg<self::Scalcf_SPEC, crate::common::RW> {
102 unsafe {
103 crate::common::Reg::<self::Scalcf_SPEC, crate::common::RW>::from_ptr(
104 self._svd2pac_as_ptr().add(72usize),
105 )
106 }
107 }
108
109 #[doc = "Cache Parity Error Operation After Detection Register"]
110 #[inline(always)]
111 pub const fn capoad(
112 &self,
113 ) -> &'static crate::common::Reg<self::Capoad_SPEC, crate::common::RW> {
114 unsafe {
115 crate::common::Reg::<self::Capoad_SPEC, crate::common::RW>::from_ptr(
116 self._svd2pac_as_ptr().add(512usize),
117 )
118 }
119 }
120
121 #[doc = "Cache Protection Register"]
122 #[inline(always)]
123 pub const fn caprcr(
124 &self,
125 ) -> &'static crate::common::Reg<self::Caprcr_SPEC, crate::common::RW> {
126 unsafe {
127 crate::common::Reg::<self::Caprcr_SPEC, crate::common::RW>::from_ptr(
128 self._svd2pac_as_ptr().add(516usize),
129 )
130 }
131 }
132}
133#[doc(hidden)]
134#[derive(Copy, Clone, Eq, PartialEq)]
135pub struct Ccactl_SPEC;
136impl crate::sealed::RegSpec for Ccactl_SPEC {
137 type DataType = u32;
138}
139
140#[doc = "C-Cache Control Register"]
141pub type Ccactl = crate::RegValueT<Ccactl_SPEC>;
142
143impl Ccactl {
144 #[doc = "C-Cache Enable"]
145 #[inline(always)]
146 pub fn enc(
147 self,
148 ) -> crate::common::RegisterField<
149 0,
150 0x1,
151 1,
152 0,
153 ccactl::Enc,
154 ccactl::Enc,
155 Ccactl_SPEC,
156 crate::common::RW,
157 > {
158 crate::common::RegisterField::<
159 0,
160 0x1,
161 1,
162 0,
163 ccactl::Enc,
164 ccactl::Enc,
165 Ccactl_SPEC,
166 crate::common::RW,
167 >::from_register(self, 0)
168 }
169}
170impl ::core::default::Default for Ccactl {
171 #[inline(always)]
172 fn default() -> Ccactl {
173 <crate::RegValueT<Ccactl_SPEC> as RegisterValue<_>>::new(0)
174 }
175}
176pub mod ccactl {
177
178 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
179 pub struct Enc_SPEC;
180 pub type Enc = crate::EnumBitfieldStruct<u8, Enc_SPEC>;
181 impl Enc {
182 #[doc = "Disable C-cache"]
183 pub const _0: Self = Self::new(0);
184
185 #[doc = "Enable C-cache"]
186 pub const _1: Self = Self::new(1);
187 }
188}
189#[doc(hidden)]
190#[derive(Copy, Clone, Eq, PartialEq)]
191pub struct Ccafct_SPEC;
192impl crate::sealed::RegSpec for Ccafct_SPEC {
193 type DataType = u32;
194}
195
196#[doc = "C-Cache Flush Control Register"]
197pub type Ccafct = crate::RegValueT<Ccafct_SPEC>;
198
199impl Ccafct {
200 #[doc = "C-Cache Flush"]
201 #[inline(always)]
202 pub fn fc(
203 self,
204 ) -> crate::common::RegisterField<
205 0,
206 0x1,
207 1,
208 0,
209 ccafct::Fc,
210 ccafct::Fc,
211 Ccafct_SPEC,
212 crate::common::RW,
213 > {
214 crate::common::RegisterField::<
215 0,
216 0x1,
217 1,
218 0,
219 ccafct::Fc,
220 ccafct::Fc,
221 Ccafct_SPEC,
222 crate::common::RW,
223 >::from_register(self, 0)
224 }
225}
226impl ::core::default::Default for Ccafct {
227 #[inline(always)]
228 fn default() -> Ccafct {
229 <crate::RegValueT<Ccafct_SPEC> as RegisterValue<_>>::new(0)
230 }
231}
232pub mod ccafct {
233
234 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
235 pub struct Fc_SPEC;
236 pub type Fc = crate::EnumBitfieldStruct<u8, Fc_SPEC>;
237 impl Fc {
238 #[doc = "No action"]
239 pub const _0: Self = Self::new(0);
240
241 #[doc = "C-cache line flush (all lines invalidated)"]
242 pub const _1: Self = Self::new(1);
243 }
244}
245#[doc(hidden)]
246#[derive(Copy, Clone, Eq, PartialEq)]
247pub struct Ccalcf_SPEC;
248impl crate::sealed::RegSpec for Ccalcf_SPEC {
249 type DataType = u32;
250}
251
252#[doc = "C-Cache Line Configuration Register"]
253pub type Ccalcf = crate::RegValueT<Ccalcf_SPEC>;
254
255impl Ccalcf {
256 #[doc = "C-Cache Line Size"]
257 #[inline(always)]
258 pub fn cc(
259 self,
260 ) -> crate::common::RegisterField<
261 0,
262 0x3,
263 1,
264 0,
265 ccalcf::Cc,
266 ccalcf::Cc,
267 Ccalcf_SPEC,
268 crate::common::RW,
269 > {
270 crate::common::RegisterField::<
271 0,
272 0x3,
273 1,
274 0,
275 ccalcf::Cc,
276 ccalcf::Cc,
277 Ccalcf_SPEC,
278 crate::common::RW,
279 >::from_register(self, 0)
280 }
281}
282impl ::core::default::Default for Ccalcf {
283 #[inline(always)]
284 fn default() -> Ccalcf {
285 <crate::RegValueT<Ccalcf_SPEC> as RegisterValue<_>>::new(1)
286 }
287}
288pub mod ccalcf {
289
290 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
291 pub struct Cc_SPEC;
292 pub type Cc = crate::EnumBitfieldStruct<u8, Cc_SPEC>;
293 impl Cc {
294 #[doc = "Prohibited"]
295 pub const _00: Self = Self::new(0);
296
297 #[doc = "Cache line size 32 bytes"]
298 pub const _01: Self = Self::new(1);
299
300 #[doc = "Cache line size 64 bytes"]
301 pub const _10: Self = Self::new(2);
302
303 #[doc = "Prohibited"]
304 pub const _11: Self = Self::new(3);
305 }
306}
307#[doc(hidden)]
308#[derive(Copy, Clone, Eq, PartialEq)]
309pub struct Scactl_SPEC;
310impl crate::sealed::RegSpec for Scactl_SPEC {
311 type DataType = u32;
312}
313
314#[doc = "S-Cache Control Register"]
315pub type Scactl = crate::RegValueT<Scactl_SPEC>;
316
317impl Scactl {
318 #[doc = "S-Cache Enable"]
319 #[inline(always)]
320 pub fn ens(
321 self,
322 ) -> crate::common::RegisterField<
323 0,
324 0x1,
325 1,
326 0,
327 scactl::Ens,
328 scactl::Ens,
329 Scactl_SPEC,
330 crate::common::RW,
331 > {
332 crate::common::RegisterField::<
333 0,
334 0x1,
335 1,
336 0,
337 scactl::Ens,
338 scactl::Ens,
339 Scactl_SPEC,
340 crate::common::RW,
341 >::from_register(self, 0)
342 }
343}
344impl ::core::default::Default for Scactl {
345 #[inline(always)]
346 fn default() -> Scactl {
347 <crate::RegValueT<Scactl_SPEC> as RegisterValue<_>>::new(0)
348 }
349}
350pub mod scactl {
351
352 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
353 pub struct Ens_SPEC;
354 pub type Ens = crate::EnumBitfieldStruct<u8, Ens_SPEC>;
355 impl Ens {
356 #[doc = "Disable S-cache"]
357 pub const _0: Self = Self::new(0);
358
359 #[doc = "Enable S-cache"]
360 pub const _1: Self = Self::new(1);
361 }
362}
363#[doc(hidden)]
364#[derive(Copy, Clone, Eq, PartialEq)]
365pub struct Scafct_SPEC;
366impl crate::sealed::RegSpec for Scafct_SPEC {
367 type DataType = u32;
368}
369
370#[doc = "S-Cache Flush Control Register"]
371pub type Scafct = crate::RegValueT<Scafct_SPEC>;
372
373impl Scafct {
374 #[doc = "S-Cache Flush"]
375 #[inline(always)]
376 pub fn fs(
377 self,
378 ) -> crate::common::RegisterField<
379 0,
380 0x1,
381 1,
382 0,
383 scafct::Fs,
384 scafct::Fs,
385 Scafct_SPEC,
386 crate::common::RW,
387 > {
388 crate::common::RegisterField::<
389 0,
390 0x1,
391 1,
392 0,
393 scafct::Fs,
394 scafct::Fs,
395 Scafct_SPEC,
396 crate::common::RW,
397 >::from_register(self, 0)
398 }
399}
400impl ::core::default::Default for Scafct {
401 #[inline(always)]
402 fn default() -> Scafct {
403 <crate::RegValueT<Scafct_SPEC> as RegisterValue<_>>::new(0)
404 }
405}
406pub mod scafct {
407
408 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
409 pub struct Fs_SPEC;
410 pub type Fs = crate::EnumBitfieldStruct<u8, Fs_SPEC>;
411 impl Fs {
412 #[doc = "No action"]
413 pub const _0: Self = Self::new(0);
414
415 #[doc = "S-cache line flush (all lines invalidated)"]
416 pub const _1: Self = Self::new(1);
417 }
418}
419#[doc(hidden)]
420#[derive(Copy, Clone, Eq, PartialEq)]
421pub struct Scalcf_SPEC;
422impl crate::sealed::RegSpec for Scalcf_SPEC {
423 type DataType = u32;
424}
425
426#[doc = "S-Cache Line Configuration Register"]
427pub type Scalcf = crate::RegValueT<Scalcf_SPEC>;
428
429impl Scalcf {
430 #[doc = "S-Cache Line Size"]
431 #[inline(always)]
432 pub fn cs(
433 self,
434 ) -> crate::common::RegisterField<
435 0,
436 0x3,
437 1,
438 0,
439 scalcf::Cs,
440 scalcf::Cs,
441 Scalcf_SPEC,
442 crate::common::RW,
443 > {
444 crate::common::RegisterField::<
445 0,
446 0x3,
447 1,
448 0,
449 scalcf::Cs,
450 scalcf::Cs,
451 Scalcf_SPEC,
452 crate::common::RW,
453 >::from_register(self, 0)
454 }
455}
456impl ::core::default::Default for Scalcf {
457 #[inline(always)]
458 fn default() -> Scalcf {
459 <crate::RegValueT<Scalcf_SPEC> as RegisterValue<_>>::new(1)
460 }
461}
462pub mod scalcf {
463
464 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
465 pub struct Cs_SPEC;
466 pub type Cs = crate::EnumBitfieldStruct<u8, Cs_SPEC>;
467 impl Cs {
468 #[doc = "Prohibited"]
469 pub const _00: Self = Self::new(0);
470
471 #[doc = "Cache line size 32 bytes"]
472 pub const _01: Self = Self::new(1);
473
474 #[doc = "Cache line size 64 bytes"]
475 pub const _10: Self = Self::new(2);
476
477 #[doc = "Prohibited"]
478 pub const _11: Self = Self::new(3);
479 }
480}
481#[doc(hidden)]
482#[derive(Copy, Clone, Eq, PartialEq)]
483pub struct Capoad_SPEC;
484impl crate::sealed::RegSpec for Capoad_SPEC {
485 type DataType = u32;
486}
487
488#[doc = "Cache Parity Error Operation After Detection Register"]
489pub type Capoad = crate::RegValueT<Capoad_SPEC>;
490
491impl Capoad {
492 #[doc = "Operation after Detection"]
493 #[inline(always)]
494 pub fn oad(
495 self,
496 ) -> crate::common::RegisterField<
497 0,
498 0x1,
499 1,
500 0,
501 capoad::Oad,
502 capoad::Oad,
503 Capoad_SPEC,
504 crate::common::RW,
505 > {
506 crate::common::RegisterField::<
507 0,
508 0x1,
509 1,
510 0,
511 capoad::Oad,
512 capoad::Oad,
513 Capoad_SPEC,
514 crate::common::RW,
515 >::from_register(self, 0)
516 }
517}
518impl ::core::default::Default for Capoad {
519 #[inline(always)]
520 fn default() -> Capoad {
521 <crate::RegValueT<Capoad_SPEC> as RegisterValue<_>>::new(0)
522 }
523}
524pub mod capoad {
525
526 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
527 pub struct Oad_SPEC;
528 pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
529 impl Oad {
530 #[doc = "Non-maskable interrupt"]
531 pub const _0: Self = Self::new(0);
532
533 #[doc = "Reset"]
534 pub const _1: Self = Self::new(1);
535 }
536}
537#[doc(hidden)]
538#[derive(Copy, Clone, Eq, PartialEq)]
539pub struct Caprcr_SPEC;
540impl crate::sealed::RegSpec for Caprcr_SPEC {
541 type DataType = u32;
542}
543
544#[doc = "Cache Protection Register"]
545pub type Caprcr = crate::RegValueT<Caprcr_SPEC>;
546
547impl Caprcr {
548 #[doc = "Register Write Control"]
549 #[inline(always)]
550 pub fn prcr(
551 self,
552 ) -> crate::common::RegisterField<
553 0,
554 0x1,
555 1,
556 0,
557 caprcr::Prcr,
558 caprcr::Prcr,
559 Caprcr_SPEC,
560 crate::common::RW,
561 > {
562 crate::common::RegisterField::<
563 0,
564 0x1,
565 1,
566 0,
567 caprcr::Prcr,
568 caprcr::Prcr,
569 Caprcr_SPEC,
570 crate::common::RW,
571 >::from_register(self, 0)
572 }
573
574 #[doc = "Write key code"]
575 #[inline(always)]
576 pub fn kw(
577 self,
578 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Caprcr_SPEC, crate::common::RW> {
579 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Caprcr_SPEC,crate::common::RW>::from_register(self,0)
580 }
581}
582impl ::core::default::Default for Caprcr {
583 #[inline(always)]
584 fn default() -> Caprcr {
585 <crate::RegValueT<Caprcr_SPEC> as RegisterValue<_>>::new(0)
586 }
587}
588pub mod caprcr {
589
590 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
591 pub struct Prcr_SPEC;
592 pub type Prcr = crate::EnumBitfieldStruct<u8, Prcr_SPEC>;
593 impl Prcr {
594 #[doc = "Disable writes to protected registers"]
595 pub const _0: Self = Self::new(0);
596
597 #[doc = "Enable writes to protected registers"]
598 pub const _1: Self = Self::new(1);
599 }
600}