bl61x_pac/mcu_misc/
cpu_mbist.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#[doc = "Register `cpu_mbist` reader"]
pub type R = crate::R<CPU_MBIST_SPEC>;
#[doc = "Register `cpu_mbist` writer"]
pub type W = crate::W<CPU_MBIST_SPEC>;
#[doc = "Field `cpu_mbist_mode` reader - CPU MBIST mode. This field controls the MBIST mode for the CPU."]
pub type CPU_MBIST_MODE_R = crate::BitReader;
#[doc = "Field `cpu_mbist_mode` writer - CPU MBIST mode. This field controls the MBIST mode for the CPU."]
pub type CPU_MBIST_MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `irom_mbist_mode` reader - IROM MBIST mode. This field controls the MBIST mode for the IROM."]
pub type IROM_MBIST_MODE_R = crate::BitReader;
#[doc = "Field `irom_mbist_mode` writer - IROM MBIST mode. This field controls the MBIST mode for the IROM."]
pub type IROM_MBIST_MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `reg_cpu_mbist_rst_n` reader - CPU MBIST reset. Writing 1 to this bit resets the CPU MBIST."]
pub type REG_CPU_MBIST_RST_N_R = crate::BitReader;
#[doc = "Field `reg_cpu_mbist_rst_n` writer - CPU MBIST reset. Writing 1 to this bit resets the CPU MBIST."]
pub type REG_CPU_MBIST_RST_N_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `cpu_mbist_done` reader - CPU MBIST done. This field indicates the status of the CPU MBIST."]
pub type CPU_MBIST_DONE_R = crate::FieldReader;
#[doc = "Field `cpu_mbist_done` writer - CPU MBIST done. This field indicates the status of the CPU MBIST."]
pub type CPU_MBIST_DONE_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
#[doc = "Field `irom_mbist_done` reader - IROM MBIST done. This field indicates the status of the IROM MBIST."]
pub type IROM_MBIST_DONE_R = crate::BitReader;
#[doc = "Field `irom_mbist_done` writer - IROM MBIST done. This field indicates the status of the IROM MBIST."]
pub type IROM_MBIST_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `cpu_mbist_fail` reader - CPU MBIST fail. This field indicates the status of the CPU MBIST."]
pub type CPU_MBIST_FAIL_R = crate::FieldReader;
#[doc = "Field `cpu_mbist_fail` writer - CPU MBIST fail. This field indicates the status of the CPU MBIST."]
pub type CPU_MBIST_FAIL_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
#[doc = "Field `irom_mbist_fail` reader - IROM MBIST fail. This field indicates the status of the IROM MBIST."]
pub type IROM_MBIST_FAIL_R = crate::BitReader;
#[doc = "Field `irom_mbist_fail` writer - IROM MBIST fail. This field indicates the status of the IROM MBIST."]
pub type IROM_MBIST_FAIL_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - CPU MBIST mode. This field controls the MBIST mode for the CPU."]
    #[inline(always)]
    pub fn cpu_mbist_mode(&self) -> CPU_MBIST_MODE_R {
        CPU_MBIST_MODE_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - IROM MBIST mode. This field controls the MBIST mode for the IROM."]
    #[inline(always)]
    pub fn irom_mbist_mode(&self) -> IROM_MBIST_MODE_R {
        IROM_MBIST_MODE_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 8 - CPU MBIST reset. Writing 1 to this bit resets the CPU MBIST."]
    #[inline(always)]
    pub fn reg_cpu_mbist_rst_n(&self) -> REG_CPU_MBIST_RST_N_R {
        REG_CPU_MBIST_RST_N_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bits 16:21 - CPU MBIST done. This field indicates the status of the CPU MBIST."]
    #[inline(always)]
    pub fn cpu_mbist_done(&self) -> CPU_MBIST_DONE_R {
        CPU_MBIST_DONE_R::new(((self.bits >> 16) & 0x3f) as u8)
    }
    #[doc = "Bit 22 - IROM MBIST done. This field indicates the status of the IROM MBIST."]
    #[inline(always)]
    pub fn irom_mbist_done(&self) -> IROM_MBIST_DONE_R {
        IROM_MBIST_DONE_R::new(((self.bits >> 22) & 1) != 0)
    }
    #[doc = "Bits 24:29 - CPU MBIST fail. This field indicates the status of the CPU MBIST."]
    #[inline(always)]
    pub fn cpu_mbist_fail(&self) -> CPU_MBIST_FAIL_R {
        CPU_MBIST_FAIL_R::new(((self.bits >> 24) & 0x3f) as u8)
    }
    #[doc = "Bit 30 - IROM MBIST fail. This field indicates the status of the IROM MBIST."]
    #[inline(always)]
    pub fn irom_mbist_fail(&self) -> IROM_MBIST_FAIL_R {
        IROM_MBIST_FAIL_R::new(((self.bits >> 30) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - CPU MBIST mode. This field controls the MBIST mode for the CPU."]
    #[inline(always)]
    #[must_use]
    pub fn cpu_mbist_mode(&mut self) -> CPU_MBIST_MODE_W<CPU_MBIST_SPEC> {
        CPU_MBIST_MODE_W::new(self, 0)
    }
    #[doc = "Bit 1 - IROM MBIST mode. This field controls the MBIST mode for the IROM."]
    #[inline(always)]
    #[must_use]
    pub fn irom_mbist_mode(&mut self) -> IROM_MBIST_MODE_W<CPU_MBIST_SPEC> {
        IROM_MBIST_MODE_W::new(self, 1)
    }
    #[doc = "Bit 8 - CPU MBIST reset. Writing 1 to this bit resets the CPU MBIST."]
    #[inline(always)]
    #[must_use]
    pub fn reg_cpu_mbist_rst_n(&mut self) -> REG_CPU_MBIST_RST_N_W<CPU_MBIST_SPEC> {
        REG_CPU_MBIST_RST_N_W::new(self, 8)
    }
    #[doc = "Bits 16:21 - CPU MBIST done. This field indicates the status of the CPU MBIST."]
    #[inline(always)]
    #[must_use]
    pub fn cpu_mbist_done(&mut self) -> CPU_MBIST_DONE_W<CPU_MBIST_SPEC> {
        CPU_MBIST_DONE_W::new(self, 16)
    }
    #[doc = "Bit 22 - IROM MBIST done. This field indicates the status of the IROM MBIST."]
    #[inline(always)]
    #[must_use]
    pub fn irom_mbist_done(&mut self) -> IROM_MBIST_DONE_W<CPU_MBIST_SPEC> {
        IROM_MBIST_DONE_W::new(self, 22)
    }
    #[doc = "Bits 24:29 - CPU MBIST fail. This field indicates the status of the CPU MBIST."]
    #[inline(always)]
    #[must_use]
    pub fn cpu_mbist_fail(&mut self) -> CPU_MBIST_FAIL_W<CPU_MBIST_SPEC> {
        CPU_MBIST_FAIL_W::new(self, 24)
    }
    #[doc = "Bit 30 - IROM MBIST fail. This field indicates the status of the IROM MBIST."]
    #[inline(always)]
    #[must_use]
    pub fn irom_mbist_fail(&mut self) -> IROM_MBIST_FAIL_W<CPU_MBIST_SPEC> {
        IROM_MBIST_FAIL_W::new(self, 30)
    }
    #[doc = r" Writes raw bits to the register."]
    #[doc = r""]
    #[doc = r" # Safety"]
    #[doc = r""]
    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.bits = bits;
        self
    }
}
#[doc = "CPU MBIST Register. Controls the CPU memory built-in self-test (MBIST).\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cpu_mbist::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 [`cpu_mbist::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CPU_MBIST_SPEC;
impl crate::RegisterSpec for CPU_MBIST_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`cpu_mbist::R`](R) reader structure"]
impl crate::Readable for CPU_MBIST_SPEC {}
#[doc = "`write(|w| ..)` method takes [`cpu_mbist::W`](W) writer structure"]
impl crate::Writable for CPU_MBIST_SPEC {
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets cpu_mbist to value 0"]
impl crate::Resettable for CPU_MBIST_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}