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 `PI_REG_116` reader"]
pub type R = crate::R<PiReg116Spec>;
#[doc = "Register `PI_REG_116` writer"]
pub type W = crate::W<PiReg116Spec>;
#[doc = "Indicates dfi_dram_clk_disable deassert following dfi_init_start deassert or dfi_init_complete assert.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PiDramClkDisableDeassertSel {
    #[doc = "0: dfi_dram_clk_disable deassert following dfi_init_complete assert."]
    B0 = 0,
    #[doc = "1: dfi_dram_clk_disable deassert following dfi_init_complete assert."]
    B1 = 1,
}
impl From<PiDramClkDisableDeassertSel> for bool {
    #[inline(always)]
    fn from(variant: PiDramClkDisableDeassertSel) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PI_DRAM_CLK_DISABLE_DEASSERT_SEL` reader - Indicates dfi_dram_clk_disable deassert following dfi_init_start deassert or dfi_init_complete assert."]
pub type PiDramClkDisableDeassertSelR = crate::BitReader<PiDramClkDisableDeassertSel>;
impl PiDramClkDisableDeassertSelR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> PiDramClkDisableDeassertSel {
        match self.bits {
            false => PiDramClkDisableDeassertSel::B0,
            true => PiDramClkDisableDeassertSel::B1,
        }
    }
    #[doc = "dfi_dram_clk_disable deassert following dfi_init_complete assert."]
    #[inline(always)]
    pub fn is_b0(&self) -> bool {
        *self == PiDramClkDisableDeassertSel::B0
    }
    #[doc = "dfi_dram_clk_disable deassert following dfi_init_complete assert."]
    #[inline(always)]
    pub fn is_b1(&self) -> bool {
        *self == PiDramClkDisableDeassertSel::B1
    }
}
#[doc = "Field `PI_DRAM_CLK_DISABLE_DEASSERT_SEL` writer - Indicates dfi_dram_clk_disable deassert following dfi_init_start deassert or dfi_init_complete assert."]
pub type PiDramClkDisableDeassertSelW<'a, REG> =
    crate::BitWriter<'a, REG, PiDramClkDisableDeassertSel>;
impl<'a, REG> PiDramClkDisableDeassertSelW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "dfi_dram_clk_disable deassert following dfi_init_complete assert."]
    #[inline(always)]
    pub fn b0(self) -> &'a mut crate::W<REG> {
        self.variant(PiDramClkDisableDeassertSel::B0)
    }
    #[doc = "dfi_dram_clk_disable deassert following dfi_init_complete assert."]
    #[inline(always)]
    pub fn b1(self) -> &'a mut crate::W<REG> {
        self.variant(PiDramClkDisableDeassertSel::B1)
    }
}
#[doc = "Field `PI_REFRESH_BETWEEN_SEGMENT_DISABLE` reader - Disables the refresh between CA first and second segment training. Defaut is set to 1."]
pub type PiRefreshBetweenSegmentDisableR = crate::BitReader;
#[doc = "Field `PI_REFRESH_BETWEEN_SEGMENT_DISABLE` writer - Disables the refresh between CA first and second segment training. Defaut is set to 1."]
pub type PiRefreshBetweenSegmentDisableW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PI_TCKEHDQS_F0` reader - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f0\" of the parameter name is omitted when in non-DFS mode."]
pub type PiTckehdqsF0R = crate::FieldReader;
#[doc = "Field `PI_TCKEHDQS_F0` writer - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f0\" of the parameter name is omitted when in non-DFS mode."]
pub type PiTckehdqsF0W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
#[doc = "Field `PI_TCKEHDQS_F1` reader - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f1\" of the parameter name is omitted when in non-DFS mode."]
pub type PiTckehdqsF1R = crate::FieldReader;
#[doc = "Field `PI_TCKEHDQS_F1` writer - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f1\" of the parameter name is omitted when in non-DFS mode."]
pub type PiTckehdqsF1W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
impl R {
    #[doc = "Bit 0 - Indicates dfi_dram_clk_disable deassert following dfi_init_start deassert or dfi_init_complete assert."]
    #[inline(always)]
    pub fn pi_dram_clk_disable_deassert_sel(&self) -> PiDramClkDisableDeassertSelR {
        PiDramClkDisableDeassertSelR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 8 - Disables the refresh between CA first and second segment training. Defaut is set to 1."]
    #[inline(always)]
    pub fn pi_refresh_between_segment_disable(&self) -> PiRefreshBetweenSegmentDisableR {
        PiRefreshBetweenSegmentDisableR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bits 16:21 - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f0\" of the parameter name is omitted when in non-DFS mode."]
    #[inline(always)]
    pub fn pi_tckehdqs_f0(&self) -> PiTckehdqsF0R {
        PiTckehdqsF0R::new(((self.bits >> 16) & 0x3f) as u8)
    }
    #[doc = "Bits 24:29 - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f1\" of the parameter name is omitted when in non-DFS mode."]
    #[inline(always)]
    pub fn pi_tckehdqs_f1(&self) -> PiTckehdqsF1R {
        PiTckehdqsF1R::new(((self.bits >> 24) & 0x3f) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Indicates dfi_dram_clk_disable deassert following dfi_init_start deassert or dfi_init_complete assert."]
    #[inline(always)]
    #[must_use]
    pub fn pi_dram_clk_disable_deassert_sel(
        &mut self,
    ) -> PiDramClkDisableDeassertSelW<PiReg116Spec> {
        PiDramClkDisableDeassertSelW::new(self, 0)
    }
    #[doc = "Bit 8 - Disables the refresh between CA first and second segment training. Defaut is set to 1."]
    #[inline(always)]
    #[must_use]
    pub fn pi_refresh_between_segment_disable(
        &mut self,
    ) -> PiRefreshBetweenSegmentDisableW<PiReg116Spec> {
        PiRefreshBetweenSegmentDisableW::new(self, 8)
    }
    #[doc = "Bits 16:21 - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f0\" of the parameter name is omitted when in non-DFS mode."]
    #[inline(always)]
    #[must_use]
    pub fn pi_tckehdqs_f0(&mut self) -> PiTckehdqsF0W<PiReg116Spec> {
        PiTckehdqsF0W::new(self, 16)
    }
    #[doc = "Bits 24:29 - Indicates the DRAM timing TCKEHDQS, minimum delay from CKE high to strobe high impedance. The suffix \"_f1\" of the parameter name is omitted when in non-DFS mode."]
    #[inline(always)]
    #[must_use]
    pub fn pi_tckehdqs_f1(&mut self) -> PiTckehdqsF1W<PiReg116Spec> {
        PiTckehdqsF1W::new(self, 24)
    }
}
#[doc = "DDR PHY Independent Register 116\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pi_reg_116::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_116::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PiReg116Spec;
impl crate::RegisterSpec for PiReg116Spec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`pi_reg_116::R`](R) reader structure"]
impl crate::Readable for PiReg116Spec {}
#[doc = "`write(|w| ..)` method takes [`pi_reg_116::W`](W) writer structure"]
impl crate::Writable for PiReg116Spec {
    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_116 to value 0"]
impl crate::Resettable for PiReg116Spec {
    const RESET_VALUE: u32 = 0;
}