ra4e2_pac/
eccmb.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.30.00, with svd2pac 0.4.0 on Sat, 12 Apr 2025 22:15:35 +0000
19
20#![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"ECCMB"]
28unsafe impl ::core::marker::Send for super::Eccmb {}
29unsafe impl ::core::marker::Sync for super::Eccmb {}
30impl super::Eccmb {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36    #[doc = "ECC Control Register"]
37    #[inline(always)]
38    pub const fn ec710ctl(
39        &self,
40    ) -> &'static crate::common::Reg<self::Ec710Ctl_SPEC, crate::common::RW> {
41        unsafe {
42            crate::common::Reg::<self::Ec710Ctl_SPEC, crate::common::RW>::from_ptr(
43                self._svd2pac_as_ptr().add(0usize),
44            )
45        }
46    }
47
48    #[doc = "ECC Test Mode Control Register"]
49    #[inline(always)]
50    pub const fn ec710tmc(
51        &self,
52    ) -> &'static crate::common::Reg<self::Ec710Tmc_SPEC, crate::common::RW> {
53        unsafe {
54            crate::common::Reg::<self::Ec710Tmc_SPEC, crate::common::RW>::from_ptr(
55                self._svd2pac_as_ptr().add(4usize),
56            )
57        }
58    }
59
60    #[doc = "ECC Test Substitute Data Register"]
61    #[inline(always)]
62    pub const fn ec710ted(
63        &self,
64    ) -> &'static crate::common::Reg<self::Ec710Ted_SPEC, crate::common::RW> {
65        unsafe {
66            crate::common::Reg::<self::Ec710Ted_SPEC, crate::common::RW>::from_ptr(
67                self._svd2pac_as_ptr().add(12usize),
68            )
69        }
70    }
71
72    #[doc = "ECC Error Address Register"]
73    #[inline(always)]
74    pub const fn ec710ead0(
75        &self,
76    ) -> &'static crate::common::Reg<self::Ec710Ead0_SPEC, crate::common::R> {
77        unsafe {
78            crate::common::Reg::<self::Ec710Ead0_SPEC, crate::common::R>::from_ptr(
79                self._svd2pac_as_ptr().add(16usize),
80            )
81        }
82    }
83}
84#[doc(hidden)]
85#[derive(Copy, Clone, Eq, PartialEq)]
86pub struct Ec710Ctl_SPEC;
87impl crate::sealed::RegSpec for Ec710Ctl_SPEC {
88    type DataType = u32;
89}
90#[doc = "ECC Control Register"]
91pub type Ec710Ctl = crate::RegValueT<Ec710Ctl_SPEC>;
92
93impl Ec710Ctl {
94    #[doc = "ECC Error Message Flag"]
95    #[inline(always)]
96    pub fn ecemf(
97        self,
98    ) -> crate::common::RegisterField<0, 0x1, 1, 0, ec710ctl::Ecemf, Ec710Ctl_SPEC, crate::common::R>
99    {
100        crate::common::RegisterField::<0,0x1,1,0,ec710ctl::Ecemf, Ec710Ctl_SPEC,crate::common::R>::from_register(self,0)
101    }
102    #[doc = "ECC Error Detection and Correction Flag"]
103    #[inline(always)]
104    pub fn ecer1f(
105        self,
106    ) -> crate::common::RegisterField<1, 0x1, 1, 0, ec710ctl::Ecer1F, Ec710Ctl_SPEC, crate::common::R>
107    {
108        crate::common::RegisterField::<
109            1,
110            0x1,
111            1,
112            0,
113            ec710ctl::Ecer1F,
114            Ec710Ctl_SPEC,
115            crate::common::R,
116        >::from_register(self, 0)
117    }
118    #[doc = "2-bit ECC Error Detection Flag"]
119    #[inline(always)]
120    pub fn ecer2f(
121        self,
122    ) -> crate::common::RegisterField<2, 0x1, 1, 0, ec710ctl::Ecer2F, Ec710Ctl_SPEC, crate::common::R>
123    {
124        crate::common::RegisterField::<
125            2,
126            0x1,
127            1,
128            0,
129            ec710ctl::Ecer2F,
130            Ec710Ctl_SPEC,
131            crate::common::R,
132        >::from_register(self, 0)
133    }
134    #[doc = "ECC 1-bit Error Detection Interrupt Control"]
135    #[inline(always)]
136    pub fn ec1edic(
137        self,
138    ) -> crate::common::RegisterField<
139        3,
140        0x1,
141        1,
142        0,
143        ec710ctl::Ec1Edic,
144        Ec710Ctl_SPEC,
145        crate::common::RW,
146    > {
147        crate::common::RegisterField::<
148            3,
149            0x1,
150            1,
151            0,
152            ec710ctl::Ec1Edic,
153            Ec710Ctl_SPEC,
154            crate::common::RW,
155        >::from_register(self, 0)
156    }
157    #[doc = "ECC 2-bit Error Detection Interrupt Control"]
158    #[inline(always)]
159    pub fn ec2edic(
160        self,
161    ) -> crate::common::RegisterField<
162        4,
163        0x1,
164        1,
165        0,
166        ec710ctl::Ec2Edic,
167        Ec710Ctl_SPEC,
168        crate::common::RW,
169    > {
170        crate::common::RegisterField::<
171            4,
172            0x1,
173            1,
174            0,
175            ec710ctl::Ec2Edic,
176            Ec710Ctl_SPEC,
177            crate::common::RW,
178        >::from_register(self, 0)
179    }
180    #[doc = "ECC 1-bit Error Correction Permission"]
181    #[inline(always)]
182    pub fn ec1ecp(
183        self,
184    ) -> crate::common::RegisterField<
185        5,
186        0x1,
187        1,
188        0,
189        ec710ctl::Ec1Ecp,
190        Ec710Ctl_SPEC,
191        crate::common::RW,
192    > {
193        crate::common::RegisterField::<
194            5,
195            0x1,
196            1,
197            0,
198            ec710ctl::Ec1Ecp,
199            Ec710Ctl_SPEC,
200            crate::common::RW,
201        >::from_register(self, 0)
202    }
203    #[doc = "ECC Error Judgment Enable Flag"]
204    #[inline(always)]
205    pub fn ecervf(
206        self,
207    ) -> crate::common::RegisterField<
208        6,
209        0x1,
210        1,
211        0,
212        ec710ctl::Ecervf,
213        Ec710Ctl_SPEC,
214        crate::common::RW,
215    > {
216        crate::common::RegisterField::<
217            6,
218            0x1,
219            1,
220            0,
221            ec710ctl::Ecervf,
222            Ec710Ctl_SPEC,
223            crate::common::RW,
224        >::from_register(self, 0)
225    }
226    #[doc = "Accumulating ECC Error Detection and Correction Flag Clear"]
227    #[inline(always)]
228    pub fn ecer1c(
229        self,
230    ) -> crate::common::RegisterField<
231        9,
232        0x1,
233        1,
234        0,
235        ec710ctl::Ecer1C,
236        Ec710Ctl_SPEC,
237        crate::common::RW,
238    > {
239        crate::common::RegisterField::<
240            9,
241            0x1,
242            1,
243            0,
244            ec710ctl::Ecer1C,
245            Ec710Ctl_SPEC,
246            crate::common::RW,
247        >::from_register(self, 0)
248    }
249    #[doc = "2-bit ECC Error Detection Flag Clear"]
250    #[inline(always)]
251    pub fn ecer2c(
252        self,
253    ) -> crate::common::RegisterField<
254        10,
255        0x1,
256        1,
257        0,
258        ec710ctl::Ecer2C,
259        Ec710Ctl_SPEC,
260        crate::common::RW,
261    > {
262        crate::common::RegisterField::<
263            10,
264            0x1,
265            1,
266            0,
267            ec710ctl::Ecer2C,
268            Ec710Ctl_SPEC,
269            crate::common::RW,
270        >::from_register(self, 0)
271    }
272    #[doc = "ECC Overflow Detection Flag"]
273    #[inline(always)]
274    pub fn ecovff(
275        self,
276    ) -> crate::common::RegisterField<
277        11,
278        0x1,
279        1,
280        0,
281        ec710ctl::Ecovff,
282        Ec710Ctl_SPEC,
283        crate::common::R,
284    > {
285        crate::common::RegisterField::<
286            11,
287            0x1,
288            1,
289            0,
290            ec710ctl::Ecovff,
291            Ec710Ctl_SPEC,
292            crate::common::R,
293        >::from_register(self, 0)
294    }
295    #[doc = "Access Control to ECC Mode Select bit"]
296    #[inline(always)]
297    pub fn emca(
298        self,
299    ) -> crate::common::RegisterField<14, 0x3, 1, 0, u8, Ec710Ctl_SPEC, crate::common::RW> {
300        crate::common::RegisterField::<14,0x3,1,0,u8, Ec710Ctl_SPEC,crate::common::RW>::from_register(self,0)
301    }
302    #[doc = "ECC Single bit Error Address Detection Flag"]
303    #[inline(always)]
304    pub fn ecsedf0(
305        self,
306    ) -> crate::common::RegisterField<
307        16,
308        0x1,
309        1,
310        0,
311        ec710ctl::Ecsedf0,
312        Ec710Ctl_SPEC,
313        crate::common::R,
314    > {
315        crate::common::RegisterField::<
316            16,
317            0x1,
318            1,
319            0,
320            ec710ctl::Ecsedf0,
321            Ec710Ctl_SPEC,
322            crate::common::R,
323        >::from_register(self, 0)
324    }
325    #[doc = "ECC Dual Bit Error Address Detection Flag"]
326    #[inline(always)]
327    pub fn ecdedf0(
328        self,
329    ) -> crate::common::RegisterField<
330        17,
331        0x1,
332        1,
333        0,
334        ec710ctl::Ecdedf0,
335        Ec710Ctl_SPEC,
336        crate::common::R,
337    > {
338        crate::common::RegisterField::<
339            17,
340            0x1,
341            1,
342            0,
343            ec710ctl::Ecdedf0,
344            Ec710Ctl_SPEC,
345            crate::common::R,
346        >::from_register(self, 0)
347    }
348}
349impl ::core::default::Default for Ec710Ctl {
350    #[inline(always)]
351    fn default() -> Ec710Ctl {
352        <crate::RegValueT<Ec710Ctl_SPEC> as RegisterValue<_>>::new(16)
353    }
354}
355pub mod ec710ctl {
356
357    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
358    pub struct Ecemf_SPEC;
359    pub type Ecemf = crate::EnumBitfieldStruct<u8, Ecemf_SPEC>;
360    impl Ecemf {
361        #[doc = "There is no bit error in present RAM output data"]
362        pub const _0: Self = Self::new(0);
363        #[doc = "There is bit error in present RAM output data"]
364        pub const _1: Self = Self::new(1);
365    }
366    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
367    pub struct Ecer1F_SPEC;
368    pub type Ecer1F = crate::EnumBitfieldStruct<u8, Ecer1F_SPEC>;
369    impl Ecer1F {
370        #[doc = "After clearing this bit, 1-bit error correction has not occurred"]
371        pub const _0: Self = Self::new(0);
372        #[doc = "1-bit error has occurred"]
373        pub const _1: Self = Self::new(1);
374    }
375    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
376    pub struct Ecer2F_SPEC;
377    pub type Ecer2F = crate::EnumBitfieldStruct<u8, Ecer2F_SPEC>;
378    impl Ecer2F {
379        #[doc = "After clearing this bit, 2-bit error has not occurred"]
380        pub const _0: Self = Self::new(0);
381        #[doc = "2-bit error has occurred"]
382        pub const _1: Self = Self::new(1);
383    }
384    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
385    pub struct Ec1Edic_SPEC;
386    pub type Ec1Edic = crate::EnumBitfieldStruct<u8, Ec1Edic_SPEC>;
387    impl Ec1Edic {
388        #[doc = "Disable 1-bit error detection interrupt request"]
389        pub const _0: Self = Self::new(0);
390        #[doc = "Enable 1-bit error detection interrupt request"]
391        pub const _1: Self = Self::new(1);
392    }
393    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
394    pub struct Ec2Edic_SPEC;
395    pub type Ec2Edic = crate::EnumBitfieldStruct<u8, Ec2Edic_SPEC>;
396    impl Ec2Edic {
397        #[doc = "Disable 2-bit error detection interrupt request"]
398        pub const _0: Self = Self::new(0);
399        #[doc = "Enable 2-bit error detection interrupt request"]
400        pub const _1: Self = Self::new(1);
401    }
402    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
403    pub struct Ec1Ecp_SPEC;
404    pub type Ec1Ecp = crate::EnumBitfieldStruct<u8, Ec1Ecp_SPEC>;
405    impl Ec1Ecp {
406        #[doc = "At 1-bit error detection, the error correction is executed"]
407        pub const _0: Self = Self::new(0);
408        #[doc = "At 1-bit error detection, the error correction is not executed"]
409        pub const _1: Self = Self::new(1);
410    }
411    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
412    pub struct Ecervf_SPEC;
413    pub type Ecervf = crate::EnumBitfieldStruct<u8, Ecervf_SPEC>;
414    impl Ecervf {
415        #[doc = "Error judgment disable"]
416        pub const _0: Self = Self::new(0);
417        #[doc = "Error judgment enable"]
418        pub const _1: Self = Self::new(1);
419    }
420    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
421    pub struct Ecer1C_SPEC;
422    pub type Ecer1C = crate::EnumBitfieldStruct<u8, Ecer1C_SPEC>;
423    impl Ecer1C {
424        #[doc = "No effect"]
425        pub const _0: Self = Self::new(0);
426        #[doc = "Clear accumulating ECC error detection and correction flag"]
427        pub const _1: Self = Self::new(1);
428    }
429    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
430    pub struct Ecer2C_SPEC;
431    pub type Ecer2C = crate::EnumBitfieldStruct<u8, Ecer2C_SPEC>;
432    impl Ecer2C {
433        #[doc = "No effect"]
434        pub const _0: Self = Self::new(0);
435        #[doc = "Clear 2-bit ECC error detection flag"]
436        pub const _1: Self = Self::new(1);
437    }
438    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
439    pub struct Ecovff_SPEC;
440    pub type Ecovff = crate::EnumBitfieldStruct<u8, Ecovff_SPEC>;
441    impl Ecovff {
442        #[doc = "No effect"]
443        pub const _0: Self = Self::new(0);
444        #[doc = "ECC overflow detection flag"]
445        pub const _1: Self = Self::new(1);
446    }
447    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
448    pub struct Ecsedf0_SPEC;
449    pub type Ecsedf0 = crate::EnumBitfieldStruct<u8, Ecsedf0_SPEC>;
450    impl Ecsedf0 {
451        #[doc = "There is no bit error in EC710EAD0 after reset or clearing ECER1F bit"]
452        pub const _0: Self = Self::new(0);
453        #[doc = "Address captured in EC710EAD0 shows that 1-bit error occurred and captured"]
454        pub const _1: Self = Self::new(1);
455    }
456    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
457    pub struct Ecdedf0_SPEC;
458    pub type Ecdedf0 = crate::EnumBitfieldStruct<u8, Ecdedf0_SPEC>;
459    impl Ecdedf0 {
460        #[doc = "There is no bit error in EC710EAD0 after reset or clearing ECER2F bit"]
461        pub const _0: Self = Self::new(0);
462        #[doc = "Address captured in EC710EAD0 shows that 2-bit error occurred and captured"]
463        pub const _1: Self = Self::new(1);
464    }
465}
466#[doc(hidden)]
467#[derive(Copy, Clone, Eq, PartialEq)]
468pub struct Ec710Tmc_SPEC;
469impl crate::sealed::RegSpec for Ec710Tmc_SPEC {
470    type DataType = u16;
471}
472#[doc = "ECC Test Mode Control Register"]
473pub type Ec710Tmc = crate::RegValueT<Ec710Tmc_SPEC>;
474
475impl Ec710Tmc {
476    #[doc = "ECC Decode Input Select"]
477    #[inline(always)]
478    pub fn ecdcs(
479        self,
480    ) -> crate::common::RegisterField<1, 0x1, 1, 0, ec710tmc::Ecdcs, Ec710Tmc_SPEC, crate::common::RW>
481    {
482        crate::common::RegisterField::<
483            1,
484            0x1,
485            1,
486            0,
487            ec710tmc::Ecdcs,
488            Ec710Tmc_SPEC,
489            crate::common::RW,
490        >::from_register(self, 0)
491    }
492    #[doc = "ECC Test Mode Control Enable"]
493    #[inline(always)]
494    pub fn ectmce(
495        self,
496    ) -> crate::common::RegisterField<
497        7,
498        0x1,
499        1,
500        0,
501        ec710tmc::Ectmce,
502        Ec710Tmc_SPEC,
503        crate::common::RW,
504    > {
505        crate::common::RegisterField::<
506            7,
507            0x1,
508            1,
509            0,
510            ec710tmc::Ectmce,
511            Ec710Tmc_SPEC,
512            crate::common::RW,
513        >::from_register(self, 0)
514    }
515    #[doc = "ECC Test Mode Bit Access Control"]
516    #[inline(always)]
517    pub fn etma(
518        self,
519    ) -> crate::common::RegisterField<14, 0x3, 1, 0, u8, Ec710Tmc_SPEC, crate::common::RW> {
520        crate::common::RegisterField::<14,0x3,1,0,u8, Ec710Tmc_SPEC,crate::common::RW>::from_register(self,0)
521    }
522}
523impl ::core::default::Default for Ec710Tmc {
524    #[inline(always)]
525    fn default() -> Ec710Tmc {
526        <crate::RegValueT<Ec710Tmc_SPEC> as RegisterValue<_>>::new(0)
527    }
528}
529pub mod ec710tmc {
530
531    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
532    pub struct Ecdcs_SPEC;
533    pub type Ecdcs = crate::EnumBitfieldStruct<u8, Ecdcs_SPEC>;
534    impl Ecdcs {
535        #[doc = "Input lower 32 bits of RAM output data to data area of decode circuit"]
536        pub const _0: Self = Self::new(0);
537        #[doc = "Input ECEDB31-0 in EC710TED register to data area of decode circuit"]
538        pub const _1: Self = Self::new(1);
539    }
540    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
541    pub struct Ectmce_SPEC;
542    pub type Ectmce = crate::EnumBitfieldStruct<u8, Ectmce_SPEC>;
543    impl Ectmce {
544        #[doc = "The access to test mode register and bit is disabled"]
545        pub const _0: Self = Self::new(0);
546        #[doc = "The access to test mode register and bit is enabled"]
547        pub const _1: Self = Self::new(1);
548    }
549}
550#[doc(hidden)]
551#[derive(Copy, Clone, Eq, PartialEq)]
552pub struct Ec710Ted_SPEC;
553impl crate::sealed::RegSpec for Ec710Ted_SPEC {
554    type DataType = u32;
555}
556#[doc = "ECC Test Substitute Data Register"]
557pub type Ec710Ted = crate::RegValueT<Ec710Ted_SPEC>;
558
559impl Ec710Ted {
560    #[doc = "ECC Test Substitute Data"]
561    #[inline(always)]
562    pub fn ecedb(
563        self,
564    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, Ec710Ted_SPEC, crate::common::RW>
565    {
566        crate::common::RegisterField::<0,0xffffffff,1,0,u32, Ec710Ted_SPEC,crate::common::RW>::from_register(self,0)
567    }
568}
569impl ::core::default::Default for Ec710Ted {
570    #[inline(always)]
571    fn default() -> Ec710Ted {
572        <crate::RegValueT<Ec710Ted_SPEC> as RegisterValue<_>>::new(0)
573    }
574}
575
576#[doc(hidden)]
577#[derive(Copy, Clone, Eq, PartialEq)]
578pub struct Ec710Ead0_SPEC;
579impl crate::sealed::RegSpec for Ec710Ead0_SPEC {
580    type DataType = u32;
581}
582#[doc = "ECC Error Address Register"]
583pub type Ec710Ead0 = crate::RegValueT<Ec710Ead0_SPEC>;
584
585impl Ec710Ead0 {
586    #[doc = "ECC Error Address"]
587    #[inline(always)]
588    pub fn ecead(
589        self,
590    ) -> crate::common::RegisterField<0, 0x7ff, 1, 0, u16, Ec710Ead0_SPEC, crate::common::R> {
591        crate::common::RegisterField::<0,0x7ff,1,0,u16, Ec710Ead0_SPEC,crate::common::R>::from_register(self,0)
592    }
593}
594impl ::core::default::Default for Ec710Ead0 {
595    #[inline(always)]
596    fn default() -> Ec710Ead0 {
597        <crate::RegValueT<Ec710Ead0_SPEC> as RegisterValue<_>>::new(0)
598    }
599}