1#[doc = "Reader of register REVISION"]
2pub type R = crate::R<u32, super::REVISION>;
3#[doc = "Writer for register REVISION"]
4pub type W = crate::W<u32, super::REVISION>;
5#[doc = "Register REVISION `reset()`'s with value 0"]
6impl crate::ResetValue for super::REVISION {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `SCHEME`"]
14pub type SCHEME_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `SCHEME`"]
16pub struct SCHEME_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> SCHEME_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !(0x03 << 30)) | (((value as u32) & 0x03) << 30);
24 self.w
25 }
26}
27#[doc = "Reader of field `FUNC`"]
28pub type FUNC_R = crate::R<u16, u16>;
29#[doc = "Write proxy for field `FUNC`"]
30pub struct FUNC_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> FUNC_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u16) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0x0fff << 16)) | (((value as u32) & 0x0fff) << 16);
38 self.w
39 }
40}
41#[doc = "Reader of field `R_RTL`"]
42pub type R_RTL_R = crate::R<u8, u8>;
43#[doc = "Write proxy for field `R_RTL`"]
44pub struct R_RTL_W<'a> {
45 w: &'a mut W,
46}
47impl<'a> R_RTL_W<'a> {
48 #[doc = r"Writes raw bits to the field"]
49 #[inline(always)]
50 pub unsafe fn bits(self, value: u8) -> &'a mut W {
51 self.w.bits = (self.w.bits & !(0x1f << 11)) | (((value as u32) & 0x1f) << 11);
52 self.w
53 }
54}
55#[doc = "Reader of field `X_MAJOR`"]
56pub type X_MAJOR_R = crate::R<u8, u8>;
57#[doc = "Write proxy for field `X_MAJOR`"]
58pub struct X_MAJOR_W<'a> {
59 w: &'a mut W,
60}
61impl<'a> X_MAJOR_W<'a> {
62 #[doc = r"Writes raw bits to the field"]
63 #[inline(always)]
64 pub unsafe fn bits(self, value: u8) -> &'a mut W {
65 self.w.bits = (self.w.bits & !(0x07 << 8)) | (((value as u32) & 0x07) << 8);
66 self.w
67 }
68}
69#[doc = "Reader of field `CUSTOM`"]
70pub type CUSTOM_R = crate::R<u8, u8>;
71#[doc = "Write proxy for field `CUSTOM`"]
72pub struct CUSTOM_W<'a> {
73 w: &'a mut W,
74}
75impl<'a> CUSTOM_W<'a> {
76 #[doc = r"Writes raw bits to the field"]
77 #[inline(always)]
78 pub unsafe fn bits(self, value: u8) -> &'a mut W {
79 self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6);
80 self.w
81 }
82}
83#[doc = "Reader of field `Y_MINOR`"]
84pub type Y_MINOR_R = crate::R<u8, u8>;
85#[doc = "Write proxy for field `Y_MINOR`"]
86pub struct Y_MINOR_W<'a> {
87 w: &'a mut W,
88}
89impl<'a> Y_MINOR_W<'a> {
90 #[doc = r"Writes raw bits to the field"]
91 #[inline(always)]
92 pub unsafe fn bits(self, value: u8) -> &'a mut W {
93 self.w.bits = (self.w.bits & !0x3f) | ((value as u32) & 0x3f);
94 self.w
95 }
96}
97impl R {
98 #[doc = "Bits 30:31 - SCHEME"]
99 #[inline(always)]
100 pub fn scheme(&self) -> SCHEME_R {
101 SCHEME_R::new(((self.bits >> 30) & 0x03) as u8)
102 }
103 #[doc = "Bits 16:27 - Function indicates a software compatible module family. If there is no level of software compatibility a new Func number (and hence REVISION) should be assigned."]
104 #[inline(always)]
105 pub fn func(&self) -> FUNC_R {
106 FUNC_R::new(((self.bits >> 16) & 0x0fff) as u16)
107 }
108 #[doc = "Bits 11:15 - RTL Version (R) maintained by IP design owner. RTL follows a numbering such as X.Y.R.Z which are explained in this table. R changes ONLY when: (1) PDS uploads occur which may have been due to spec changes (2) Bug fixes occur (3) Resets to '0' when X or Y changes. Design team has an internal 'Z' (customer invisible) number which increments on every drop that happens due to DV and RTL updates. Z resets to 0 when R increments."]
109 #[inline(always)]
110 pub fn r_rtl(&self) -> R_RTL_R {
111 R_RTL_R::new(((self.bits >> 11) & 0x1f) as u8)
112 }
113 #[doc = "Bits 8:10 - Major Revision (X) maintained by IP specification owner. X changes ONLY when: (1) There is a major feature addition. An example would be adding Master Mode to Utopia Level2. The Func field (or Class/Type in old PID format) will remain the same. X does NOT change due to: (1) Bug fixes (2) Change in feature parameters."]
114 #[inline(always)]
115 pub fn x_major(&self) -> X_MAJOR_R {
116 X_MAJOR_R::new(((self.bits >> 8) & 0x07) as u8)
117 }
118 #[doc = "Bits 6:7 - CUSTOM"]
119 #[inline(always)]
120 pub fn custom(&self) -> CUSTOM_R {
121 CUSTOM_R::new(((self.bits >> 6) & 0x03) as u8)
122 }
123 #[doc = "Bits 0:5 - Minor Revision (Y) maintained by IP specification owner. Y changes ONLY when: (1) Features are scaled (up or down). Flexibility exists in that this feature scalability may either be represented in the Y change or a specific register in the IP that indicates which features are exactly available. (2) When feature creeps from Is-Not list to Is list. But this may not be the case once it sees silicon; in which case X will change. Y does NOT change due to: (1) Bug fixes (2) Typos or clarifications (3) major functional/feature change/addition/deletion. Instead these changes may be reflected via R S X as applicable. Spec owner maintains a customer-invisible number 'S' which changes due to: (1) Typos/clarifications (2) Bug documentation. Note that this bug is not due to a spec change but due to implementation. Nevertheless the spec tracks the IP bugs. An RTL release (say for silicon PG1.1) that occurs due to bug fix should document the corresponding spec number (X.Y.S) in its release notes."]
124 #[inline(always)]
125 pub fn y_minor(&self) -> Y_MINOR_R {
126 Y_MINOR_R::new((self.bits & 0x3f) as u8)
127 }
128}
129impl W {
130 #[doc = "Bits 30:31 - SCHEME"]
131 #[inline(always)]
132 pub fn scheme(&mut self) -> SCHEME_W {
133 SCHEME_W { w: self }
134 }
135 #[doc = "Bits 16:27 - Function indicates a software compatible module family. If there is no level of software compatibility a new Func number (and hence REVISION) should be assigned."]
136 #[inline(always)]
137 pub fn func(&mut self) -> FUNC_W {
138 FUNC_W { w: self }
139 }
140 #[doc = "Bits 11:15 - RTL Version (R) maintained by IP design owner. RTL follows a numbering such as X.Y.R.Z which are explained in this table. R changes ONLY when: (1) PDS uploads occur which may have been due to spec changes (2) Bug fixes occur (3) Resets to '0' when X or Y changes. Design team has an internal 'Z' (customer invisible) number which increments on every drop that happens due to DV and RTL updates. Z resets to 0 when R increments."]
141 #[inline(always)]
142 pub fn r_rtl(&mut self) -> R_RTL_W {
143 R_RTL_W { w: self }
144 }
145 #[doc = "Bits 8:10 - Major Revision (X) maintained by IP specification owner. X changes ONLY when: (1) There is a major feature addition. An example would be adding Master Mode to Utopia Level2. The Func field (or Class/Type in old PID format) will remain the same. X does NOT change due to: (1) Bug fixes (2) Change in feature parameters."]
146 #[inline(always)]
147 pub fn x_major(&mut self) -> X_MAJOR_W {
148 X_MAJOR_W { w: self }
149 }
150 #[doc = "Bits 6:7 - CUSTOM"]
151 #[inline(always)]
152 pub fn custom(&mut self) -> CUSTOM_W {
153 CUSTOM_W { w: self }
154 }
155 #[doc = "Bits 0:5 - Minor Revision (Y) maintained by IP specification owner. Y changes ONLY when: (1) Features are scaled (up or down). Flexibility exists in that this feature scalability may either be represented in the Y change or a specific register in the IP that indicates which features are exactly available. (2) When feature creeps from Is-Not list to Is list. But this may not be the case once it sees silicon; in which case X will change. Y does NOT change due to: (1) Bug fixes (2) Typos or clarifications (3) major functional/feature change/addition/deletion. Instead these changes may be reflected via R S X as applicable. Spec owner maintains a customer-invisible number 'S' which changes due to: (1) Typos/clarifications (2) Bug documentation. Note that this bug is not due to a spec change but due to implementation. Nevertheless the spec tracks the IP bugs. An RTL release (say for silicon PG1.1) that occurs due to bug fix should document the corresponding spec number (X.Y.S) in its release notes."]
156 #[inline(always)]
157 pub fn y_minor(&mut self) -> Y_MINOR_W {
158 Y_MINOR_W { w: self }
159 }
160}