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"Error Correction Circuit for MBRAMn"]
28unsafe impl ::core::marker::Send for super::Eccmb0 {}
29unsafe impl ::core::marker::Sync for super::Eccmb0 {}
30impl super::Eccmb0 {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "ECC Control Register"]
38 #[inline(always)]
39 pub const fn ec710ctl(
40 &self,
41 ) -> &'static crate::common::Reg<self::Ec710Ctl_SPEC, crate::common::RW> {
42 unsafe {
43 crate::common::Reg::<self::Ec710Ctl_SPEC, crate::common::RW>::from_ptr(
44 self._svd2pac_as_ptr().add(0usize),
45 )
46 }
47 }
48
49 #[doc = "ECC Test Mode Control Register"]
50 #[inline(always)]
51 pub const fn ec710tmc(
52 &self,
53 ) -> &'static crate::common::Reg<self::Ec710Tmc_SPEC, crate::common::RW> {
54 unsafe {
55 crate::common::Reg::<self::Ec710Tmc_SPEC, crate::common::RW>::from_ptr(
56 self._svd2pac_as_ptr().add(4usize),
57 )
58 }
59 }
60
61 #[doc = "ECC Test Substitute Data Register"]
62 #[inline(always)]
63 pub const fn ec710ted(
64 &self,
65 ) -> &'static crate::common::Reg<self::Ec710Ted_SPEC, crate::common::RW> {
66 unsafe {
67 crate::common::Reg::<self::Ec710Ted_SPEC, crate::common::RW>::from_ptr(
68 self._svd2pac_as_ptr().add(12usize),
69 )
70 }
71 }
72
73 #[doc = "ECC Error Address Register"]
74 #[inline(always)]
75 pub const fn ec710ead0(
76 &self,
77 ) -> &'static crate::common::Reg<self::Ec710Ead0_SPEC, crate::common::R> {
78 unsafe {
79 crate::common::Reg::<self::Ec710Ead0_SPEC, crate::common::R>::from_ptr(
80 self._svd2pac_as_ptr().add(16usize),
81 )
82 }
83 }
84}
85#[doc(hidden)]
86#[derive(Copy, Clone, Eq, PartialEq)]
87pub struct Ec710Ctl_SPEC;
88impl crate::sealed::RegSpec for Ec710Ctl_SPEC {
89 type DataType = u32;
90}
91
92#[doc = "ECC Control Register"]
93pub type Ec710Ctl = crate::RegValueT<Ec710Ctl_SPEC>;
94
95impl Ec710Ctl {
96 #[doc = "ECC Error Message Flag"]
97 #[inline(always)]
98 pub fn ecemf(
99 self,
100 ) -> crate::common::RegisterField<
101 0,
102 0x1,
103 1,
104 0,
105 ec710ctl::Ecemf,
106 ec710ctl::Ecemf,
107 Ec710Ctl_SPEC,
108 crate::common::R,
109 > {
110 crate::common::RegisterField::<
111 0,
112 0x1,
113 1,
114 0,
115 ec710ctl::Ecemf,
116 ec710ctl::Ecemf,
117 Ec710Ctl_SPEC,
118 crate::common::R,
119 >::from_register(self, 0)
120 }
121
122 #[doc = "ECC Error Detection and Correction Flag"]
123 #[inline(always)]
124 pub fn ecer1f(
125 self,
126 ) -> crate::common::RegisterField<
127 1,
128 0x1,
129 1,
130 0,
131 ec710ctl::Ecer1F,
132 ec710ctl::Ecer1F,
133 Ec710Ctl_SPEC,
134 crate::common::R,
135 > {
136 crate::common::RegisterField::<
137 1,
138 0x1,
139 1,
140 0,
141 ec710ctl::Ecer1F,
142 ec710ctl::Ecer1F,
143 Ec710Ctl_SPEC,
144 crate::common::R,
145 >::from_register(self, 0)
146 }
147
148 #[doc = "2-bit ECC Error Detection Flag"]
149 #[inline(always)]
150 pub fn ecer2f(
151 self,
152 ) -> crate::common::RegisterField<
153 2,
154 0x1,
155 1,
156 0,
157 ec710ctl::Ecer2F,
158 ec710ctl::Ecer2F,
159 Ec710Ctl_SPEC,
160 crate::common::R,
161 > {
162 crate::common::RegisterField::<
163 2,
164 0x1,
165 1,
166 0,
167 ec710ctl::Ecer2F,
168 ec710ctl::Ecer2F,
169 Ec710Ctl_SPEC,
170 crate::common::R,
171 >::from_register(self, 0)
172 }
173
174 #[doc = "ECC 1-bit Error Detection Interrupt Control"]
175 #[inline(always)]
176 pub fn ec1edic(
177 self,
178 ) -> crate::common::RegisterField<
179 3,
180 0x1,
181 1,
182 0,
183 ec710ctl::Ec1Edic,
184 ec710ctl::Ec1Edic,
185 Ec710Ctl_SPEC,
186 crate::common::RW,
187 > {
188 crate::common::RegisterField::<
189 3,
190 0x1,
191 1,
192 0,
193 ec710ctl::Ec1Edic,
194 ec710ctl::Ec1Edic,
195 Ec710Ctl_SPEC,
196 crate::common::RW,
197 >::from_register(self, 0)
198 }
199
200 #[doc = "ECC 2-bit Error Detection Interrupt Control"]
201 #[inline(always)]
202 pub fn ec2edic(
203 self,
204 ) -> crate::common::RegisterField<
205 4,
206 0x1,
207 1,
208 0,
209 ec710ctl::Ec2Edic,
210 ec710ctl::Ec2Edic,
211 Ec710Ctl_SPEC,
212 crate::common::RW,
213 > {
214 crate::common::RegisterField::<
215 4,
216 0x1,
217 1,
218 0,
219 ec710ctl::Ec2Edic,
220 ec710ctl::Ec2Edic,
221 Ec710Ctl_SPEC,
222 crate::common::RW,
223 >::from_register(self, 0)
224 }
225
226 #[doc = "ECC 1-bit Error Correction Permission"]
227 #[inline(always)]
228 pub fn ec1ecp(
229 self,
230 ) -> crate::common::RegisterField<
231 5,
232 0x1,
233 1,
234 0,
235 ec710ctl::Ec1Ecp,
236 ec710ctl::Ec1Ecp,
237 Ec710Ctl_SPEC,
238 crate::common::RW,
239 > {
240 crate::common::RegisterField::<
241 5,
242 0x1,
243 1,
244 0,
245 ec710ctl::Ec1Ecp,
246 ec710ctl::Ec1Ecp,
247 Ec710Ctl_SPEC,
248 crate::common::RW,
249 >::from_register(self, 0)
250 }
251
252 #[doc = "ECC Error Judgment Enable Flag"]
253 #[inline(always)]
254 pub fn ecervf(
255 self,
256 ) -> crate::common::RegisterField<
257 6,
258 0x1,
259 1,
260 0,
261 ec710ctl::Ecervf,
262 ec710ctl::Ecervf,
263 Ec710Ctl_SPEC,
264 crate::common::RW,
265 > {
266 crate::common::RegisterField::<
267 6,
268 0x1,
269 1,
270 0,
271 ec710ctl::Ecervf,
272 ec710ctl::Ecervf,
273 Ec710Ctl_SPEC,
274 crate::common::RW,
275 >::from_register(self, 0)
276 }
277
278 #[doc = "Accumulating ECC Error Detection and Correction Flag Clear"]
279 #[inline(always)]
280 pub fn ecer1c(
281 self,
282 ) -> crate::common::RegisterField<
283 9,
284 0x1,
285 1,
286 0,
287 ec710ctl::Ecer1C,
288 ec710ctl::Ecer1C,
289 Ec710Ctl_SPEC,
290 crate::common::RW,
291 > {
292 crate::common::RegisterField::<
293 9,
294 0x1,
295 1,
296 0,
297 ec710ctl::Ecer1C,
298 ec710ctl::Ecer1C,
299 Ec710Ctl_SPEC,
300 crate::common::RW,
301 >::from_register(self, 0)
302 }
303
304 #[doc = "2-bit ECC Error Detection Flag Clear"]
305 #[inline(always)]
306 pub fn ecer2c(
307 self,
308 ) -> crate::common::RegisterField<
309 10,
310 0x1,
311 1,
312 0,
313 ec710ctl::Ecer2C,
314 ec710ctl::Ecer2C,
315 Ec710Ctl_SPEC,
316 crate::common::RW,
317 > {
318 crate::common::RegisterField::<
319 10,
320 0x1,
321 1,
322 0,
323 ec710ctl::Ecer2C,
324 ec710ctl::Ecer2C,
325 Ec710Ctl_SPEC,
326 crate::common::RW,
327 >::from_register(self, 0)
328 }
329
330 #[doc = "ECC Overflow Detection Flag"]
331 #[inline(always)]
332 pub fn ecovff(
333 self,
334 ) -> crate::common::RegisterField<
335 11,
336 0x1,
337 1,
338 0,
339 ec710ctl::Ecovff,
340 ec710ctl::Ecovff,
341 Ec710Ctl_SPEC,
342 crate::common::R,
343 > {
344 crate::common::RegisterField::<
345 11,
346 0x1,
347 1,
348 0,
349 ec710ctl::Ecovff,
350 ec710ctl::Ecovff,
351 Ec710Ctl_SPEC,
352 crate::common::R,
353 >::from_register(self, 0)
354 }
355
356 #[doc = "Access Control to ECC Mode Select bit"]
357 #[inline(always)]
358 pub fn emca(
359 self,
360 ) -> crate::common::RegisterField<14, 0x3, 1, 0, u8, u8, Ec710Ctl_SPEC, crate::common::RW> {
361 crate::common::RegisterField::<14,0x3,1,0,u8,u8,Ec710Ctl_SPEC,crate::common::RW>::from_register(self,0)
362 }
363
364 #[doc = "ECC Single bit Error Address Detection Flag"]
365 #[inline(always)]
366 pub fn ecsedf0(
367 self,
368 ) -> crate::common::RegisterField<
369 16,
370 0x1,
371 1,
372 0,
373 ec710ctl::Ecsedf0,
374 ec710ctl::Ecsedf0,
375 Ec710Ctl_SPEC,
376 crate::common::R,
377 > {
378 crate::common::RegisterField::<
379 16,
380 0x1,
381 1,
382 0,
383 ec710ctl::Ecsedf0,
384 ec710ctl::Ecsedf0,
385 Ec710Ctl_SPEC,
386 crate::common::R,
387 >::from_register(self, 0)
388 }
389
390 #[doc = "ECC Dual Bit Error Address Detection Flag"]
391 #[inline(always)]
392 pub fn ecdedf0(
393 self,
394 ) -> crate::common::RegisterField<
395 17,
396 0x1,
397 1,
398 0,
399 ec710ctl::Ecdedf0,
400 ec710ctl::Ecdedf0,
401 Ec710Ctl_SPEC,
402 crate::common::R,
403 > {
404 crate::common::RegisterField::<
405 17,
406 0x1,
407 1,
408 0,
409 ec710ctl::Ecdedf0,
410 ec710ctl::Ecdedf0,
411 Ec710Ctl_SPEC,
412 crate::common::R,
413 >::from_register(self, 0)
414 }
415}
416impl ::core::default::Default for Ec710Ctl {
417 #[inline(always)]
418 fn default() -> Ec710Ctl {
419 <crate::RegValueT<Ec710Ctl_SPEC> as RegisterValue<_>>::new(16)
420 }
421}
422pub mod ec710ctl {
423
424 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
425 pub struct Ecemf_SPEC;
426 pub type Ecemf = crate::EnumBitfieldStruct<u8, Ecemf_SPEC>;
427 impl Ecemf {
428 #[doc = "There is no bit error in present RAM output data"]
429 pub const _0: Self = Self::new(0);
430
431 #[doc = "There is bit error in present RAM output data"]
432 pub const _1: Self = Self::new(1);
433 }
434 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
435 pub struct Ecer1F_SPEC;
436 pub type Ecer1F = crate::EnumBitfieldStruct<u8, Ecer1F_SPEC>;
437 impl Ecer1F {
438 #[doc = "After clearing this bit, 1-bit error correction has not occurred"]
439 pub const _0: Self = Self::new(0);
440
441 #[doc = "1-bit error has occurred"]
442 pub const _1: Self = Self::new(1);
443 }
444 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
445 pub struct Ecer2F_SPEC;
446 pub type Ecer2F = crate::EnumBitfieldStruct<u8, Ecer2F_SPEC>;
447 impl Ecer2F {
448 #[doc = "After clearing this bit, 2-bit error has not occurred"]
449 pub const _0: Self = Self::new(0);
450
451 #[doc = "2-bit error has occurred"]
452 pub const _1: Self = Self::new(1);
453 }
454 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
455 pub struct Ec1Edic_SPEC;
456 pub type Ec1Edic = crate::EnumBitfieldStruct<u8, Ec1Edic_SPEC>;
457 impl Ec1Edic {
458 #[doc = "Disable 1-bit error detection interrupt request"]
459 pub const _0: Self = Self::new(0);
460
461 #[doc = "Enable 1-bit error detection interrupt request"]
462 pub const _1: Self = Self::new(1);
463 }
464 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
465 pub struct Ec2Edic_SPEC;
466 pub type Ec2Edic = crate::EnumBitfieldStruct<u8, Ec2Edic_SPEC>;
467 impl Ec2Edic {
468 #[doc = "Disable 2-bit error detection interrupt request"]
469 pub const _0: Self = Self::new(0);
470
471 #[doc = "Enable 2-bit error detection interrupt request"]
472 pub const _1: Self = Self::new(1);
473 }
474 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
475 pub struct Ec1Ecp_SPEC;
476 pub type Ec1Ecp = crate::EnumBitfieldStruct<u8, Ec1Ecp_SPEC>;
477 impl Ec1Ecp {
478 #[doc = "At 1-bit error detection, the error correction is executed"]
479 pub const _0: Self = Self::new(0);
480
481 #[doc = "At 1-bit error detection, the error correction is not executed"]
482 pub const _1: Self = Self::new(1);
483 }
484 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
485 pub struct Ecervf_SPEC;
486 pub type Ecervf = crate::EnumBitfieldStruct<u8, Ecervf_SPEC>;
487 impl Ecervf {
488 #[doc = "Error judgment disable"]
489 pub const _0: Self = Self::new(0);
490
491 #[doc = "Error judgment enable"]
492 pub const _1: Self = Self::new(1);
493 }
494 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
495 pub struct Ecer1C_SPEC;
496 pub type Ecer1C = crate::EnumBitfieldStruct<u8, Ecer1C_SPEC>;
497 impl Ecer1C {
498 #[doc = "No effect"]
499 pub const _0: Self = Self::new(0);
500
501 #[doc = "Clear accumulating ECC error detection and correction flag"]
502 pub const _1: Self = Self::new(1);
503 }
504 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
505 pub struct Ecer2C_SPEC;
506 pub type Ecer2C = crate::EnumBitfieldStruct<u8, Ecer2C_SPEC>;
507 impl Ecer2C {
508 #[doc = "No effect"]
509 pub const _0: Self = Self::new(0);
510
511 #[doc = "Clear 2-bit ECC error detection flag"]
512 pub const _1: Self = Self::new(1);
513 }
514 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
515 pub struct Ecovff_SPEC;
516 pub type Ecovff = crate::EnumBitfieldStruct<u8, Ecovff_SPEC>;
517 impl Ecovff {
518 #[doc = "No effect"]
519 pub const _0: Self = Self::new(0);
520
521 #[doc = "ECC overflow detection flag"]
522 pub const _1: Self = Self::new(1);
523 }
524 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
525 pub struct Ecsedf0_SPEC;
526 pub type Ecsedf0 = crate::EnumBitfieldStruct<u8, Ecsedf0_SPEC>;
527 impl Ecsedf0 {
528 #[doc = "There is no bit error in EC710EAD0 after reset or clearing ECER1F bit"]
529 pub const _0: Self = Self::new(0);
530
531 #[doc = "Address captured in EC710EAD0 shows that 1-bit error occurred and captured"]
532 pub const _1: Self = Self::new(1);
533 }
534 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
535 pub struct Ecdedf0_SPEC;
536 pub type Ecdedf0 = crate::EnumBitfieldStruct<u8, Ecdedf0_SPEC>;
537 impl Ecdedf0 {
538 #[doc = "There is no bit error in EC710EAD0 after reset or clearing ECER2F bit"]
539 pub const _0: Self = Self::new(0);
540
541 #[doc = "Address captured in EC710EAD0 shows that 2-bit error occurred and captured"]
542 pub const _1: Self = Self::new(1);
543 }
544}
545#[doc(hidden)]
546#[derive(Copy, Clone, Eq, PartialEq)]
547pub struct Ec710Tmc_SPEC;
548impl crate::sealed::RegSpec for Ec710Tmc_SPEC {
549 type DataType = u16;
550}
551
552#[doc = "ECC Test Mode Control Register"]
553pub type Ec710Tmc = crate::RegValueT<Ec710Tmc_SPEC>;
554
555impl Ec710Tmc {
556 #[doc = "ECC Decode Input Select"]
557 #[inline(always)]
558 pub fn ecdcs(
559 self,
560 ) -> crate::common::RegisterField<
561 1,
562 0x1,
563 1,
564 0,
565 ec710tmc::Ecdcs,
566 ec710tmc::Ecdcs,
567 Ec710Tmc_SPEC,
568 crate::common::RW,
569 > {
570 crate::common::RegisterField::<
571 1,
572 0x1,
573 1,
574 0,
575 ec710tmc::Ecdcs,
576 ec710tmc::Ecdcs,
577 Ec710Tmc_SPEC,
578 crate::common::RW,
579 >::from_register(self, 0)
580 }
581
582 #[doc = "ECC Test Mode Control Enable"]
583 #[inline(always)]
584 pub fn ectmce(
585 self,
586 ) -> crate::common::RegisterField<
587 7,
588 0x1,
589 1,
590 0,
591 ec710tmc::Ectmce,
592 ec710tmc::Ectmce,
593 Ec710Tmc_SPEC,
594 crate::common::RW,
595 > {
596 crate::common::RegisterField::<
597 7,
598 0x1,
599 1,
600 0,
601 ec710tmc::Ectmce,
602 ec710tmc::Ectmce,
603 Ec710Tmc_SPEC,
604 crate::common::RW,
605 >::from_register(self, 0)
606 }
607
608 #[doc = "ECC Test Mode Bit Access Control"]
609 #[inline(always)]
610 pub fn etma(
611 self,
612 ) -> crate::common::RegisterField<14, 0x3, 1, 0, u8, u8, Ec710Tmc_SPEC, crate::common::RW> {
613 crate::common::RegisterField::<14,0x3,1,0,u8,u8,Ec710Tmc_SPEC,crate::common::RW>::from_register(self,0)
614 }
615}
616impl ::core::default::Default for Ec710Tmc {
617 #[inline(always)]
618 fn default() -> Ec710Tmc {
619 <crate::RegValueT<Ec710Tmc_SPEC> as RegisterValue<_>>::new(0)
620 }
621}
622pub mod ec710tmc {
623
624 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
625 pub struct Ecdcs_SPEC;
626 pub type Ecdcs = crate::EnumBitfieldStruct<u8, Ecdcs_SPEC>;
627 impl Ecdcs {
628 #[doc = "Input lower 32 bits of RAM output data to data area of decode circuit"]
629 pub const _0: Self = Self::new(0);
630
631 #[doc = "Input ECEDB31-0 in EC710TED register to data area of decode circuit"]
632 pub const _1: Self = Self::new(1);
633 }
634 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
635 pub struct Ectmce_SPEC;
636 pub type Ectmce = crate::EnumBitfieldStruct<u8, Ectmce_SPEC>;
637 impl Ectmce {
638 #[doc = "The access to test mode register and bit is disabled"]
639 pub const _0: Self = Self::new(0);
640
641 #[doc = "The access to test mode register and bit is enabled"]
642 pub const _1: Self = Self::new(1);
643 }
644}
645#[doc(hidden)]
646#[derive(Copy, Clone, Eq, PartialEq)]
647pub struct Ec710Ted_SPEC;
648impl crate::sealed::RegSpec for Ec710Ted_SPEC {
649 type DataType = u32;
650}
651
652#[doc = "ECC Test Substitute Data Register"]
653pub type Ec710Ted = crate::RegValueT<Ec710Ted_SPEC>;
654
655impl Ec710Ted {
656 #[doc = "ECC Test Substitute Data"]
657 #[inline(always)]
658 pub fn ecedb(
659 self,
660 ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Ec710Ted_SPEC, crate::common::RW>
661 {
662 crate::common::RegisterField::<
663 0,
664 0xffffffff,
665 1,
666 0,
667 u32,
668 u32,
669 Ec710Ted_SPEC,
670 crate::common::RW,
671 >::from_register(self, 0)
672 }
673}
674impl ::core::default::Default for Ec710Ted {
675 #[inline(always)]
676 fn default() -> Ec710Ted {
677 <crate::RegValueT<Ec710Ted_SPEC> as RegisterValue<_>>::new(0)
678 }
679}
680
681#[doc(hidden)]
682#[derive(Copy, Clone, Eq, PartialEq)]
683pub struct Ec710Ead0_SPEC;
684impl crate::sealed::RegSpec for Ec710Ead0_SPEC {
685 type DataType = u32;
686}
687
688#[doc = "ECC Error Address Register"]
689pub type Ec710Ead0 = crate::RegValueT<Ec710Ead0_SPEC>;
690
691impl Ec710Ead0 {
692 #[doc = "ECC Error Address"]
693 #[inline(always)]
694 pub fn ecead(
695 self,
696 ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, Ec710Ead0_SPEC, crate::common::R>
697 {
698 crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,Ec710Ead0_SPEC,crate::common::R>::from_register(self,0)
699 }
700}
701impl ::core::default::Default for Ec710Ead0 {
702 #[inline(always)]
703 fn default() -> Ec710Ead0 {
704 <crate::RegValueT<Ec710Ead0_SPEC> as RegisterValue<_>>::new(0)
705 }
706}