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
#[doc = "Register `PI_REG_100` reader"]
pub type R = crate::R<PiReg100Spec>;
#[doc = "Register `PI_REG_100` writer"]
pub type W = crate::W<PiReg100Spec>;
#[doc = "Field `PI_CALVL_RESP_MASK` reader - Indicates mask for the dfi_calvl_resp signal during CA training."]
pub type PiCalvlRespMaskR = crate::BitReader;
#[doc = "Field `PI_CALVL_RESP_MASK` writer - Indicates mask for the dfi_calvl_resp signal during CA training."]
pub type PiCalvlRespMaskW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PI_CALVL_EN` reader - Enables the PI CA training module. Bit1 represents the support when non-initialization. Bit0 represents the support when initialization. Set to 1 to enable."]
pub type PiCalvlEnR = crate::FieldReader;
#[doc = "Field `PI_CALVL_EN` writer - Enables the PI CA training module. Bit1 represents the support when non-initialization. Bit0 represents the support when initialization. Set to 1 to enable."]
pub type PiCalvlEnW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `PI_CALVL_ERROR_STATUS` reader - Holds the error that is associated with the CA training error interrupt. Bit0 set indicates a PI_REG_98.pi_tdfi_calvl_resp parameter violation and bit1 set indicates a PI_REG_99.pi_tdfi_calvl_max parameter violation."]
pub type PiCalvlErrorStatusR = crate::FieldReader;
impl R {
    #[doc = "Bit 0 - Indicates mask for the dfi_calvl_resp signal during CA training."]
    #[inline(always)]
    pub fn pi_calvl_resp_mask(&self) -> PiCalvlRespMaskR {
        PiCalvlRespMaskR::new((self.bits & 1) != 0)
    }
    #[doc = "Bits 8:9 - Enables the PI CA training module. Bit1 represents the support when non-initialization. Bit0 represents the support when initialization. Set to 1 to enable."]
    #[inline(always)]
    pub fn pi_calvl_en(&self) -> PiCalvlEnR {
        PiCalvlEnR::new(((self.bits >> 8) & 3) as u8)
    }
    #[doc = "Bits 16:17 - Holds the error that is associated with the CA training error interrupt. Bit0 set indicates a PI_REG_98.pi_tdfi_calvl_resp parameter violation and bit1 set indicates a PI_REG_99.pi_tdfi_calvl_max parameter violation."]
    #[inline(always)]
    pub fn pi_calvl_error_status(&self) -> PiCalvlErrorStatusR {
        PiCalvlErrorStatusR::new(((self.bits >> 16) & 3) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Indicates mask for the dfi_calvl_resp signal during CA training."]
    #[inline(always)]
    #[must_use]
    pub fn pi_calvl_resp_mask(&mut self) -> PiCalvlRespMaskW<PiReg100Spec> {
        PiCalvlRespMaskW::new(self, 0)
    }
    #[doc = "Bits 8:9 - Enables the PI CA training module. Bit1 represents the support when non-initialization. Bit0 represents the support when initialization. Set to 1 to enable."]
    #[inline(always)]
    #[must_use]
    pub fn pi_calvl_en(&mut self) -> PiCalvlEnW<PiReg100Spec> {
        PiCalvlEnW::new(self, 8)
    }
}
#[doc = "DDR PHY Independent Register 100\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pi_reg_100::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 [`pi_reg_100::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PiReg100Spec;
impl crate::RegisterSpec for PiReg100Spec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`pi_reg_100::R`](R) reader structure"]
impl crate::Readable for PiReg100Spec {}
#[doc = "`write(|w| ..)` method takes [`pi_reg_100::W`](W) writer structure"]
impl crate::Writable for PiReg100Spec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets PI_REG_100 to value 0"]
impl crate::Resettable for PiReg100Spec {
    const RESET_VALUE: u32 = 0;
}