-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinterp1_ctrl_lane1.rs
147 lines (146 loc) · 9.23 KB
/
interp1_ctrl_lane1.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
140
141
142
143
144
145
146
147
#[doc = "Register `INTERP1_CTRL_LANE1` reader"]
pub type R = crate::R<INTERP1_CTRL_LANE1_SPEC>;
#[doc = "Register `INTERP1_CTRL_LANE1` writer"]
pub type W = crate::W<INTERP1_CTRL_LANE1_SPEC>;
#[doc = "Field `SHIFT` reader - Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."]
pub type SHIFT_R = crate::FieldReader;
#[doc = "Field `SHIFT` writer - Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."]
pub type SHIFT_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
#[doc = "Field `MASK_LSB` reader - The least-significant bit allowed to pass by the mask (inclusive)"]
pub type MASK_LSB_R = crate::FieldReader;
#[doc = "Field `MASK_LSB` writer - The least-significant bit allowed to pass by the mask (inclusive)"]
pub type MASK_LSB_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
#[doc = "Field `MASK_MSB` reader - The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"]
pub type MASK_MSB_R = crate::FieldReader;
#[doc = "Field `MASK_MSB` writer - The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"]
pub type MASK_MSB_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
#[doc = "Field `SIGNED` reader - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor."]
pub type SIGNED_R = crate::BitReader;
#[doc = "Field `SIGNED` writer - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor."]
pub type SIGNED_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CROSS_INPUT` reader - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)"]
pub type CROSS_INPUT_R = crate::BitReader;
#[doc = "Field `CROSS_INPUT` writer - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)"]
pub type CROSS_INPUT_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CROSS_RESULT` reader - If 1, feed the opposite lane's result into this lane's accumulator on POP."]
pub type CROSS_RESULT_R = crate::BitReader;
#[doc = "Field `CROSS_RESULT` writer - If 1, feed the opposite lane's result into this lane's accumulator on POP."]
pub type CROSS_RESULT_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ADD_RAW` reader - If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."]
pub type ADD_RAW_R = crate::BitReader;
#[doc = "Field `ADD_RAW` writer - If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."]
pub type ADD_RAW_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FORCE_MSB` reader - ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM."]
pub type FORCE_MSB_R = crate::FieldReader;
#[doc = "Field `FORCE_MSB` writer - ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM."]
pub type FORCE_MSB_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[doc = "Bits 0:4 - Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."]
#[inline(always)]
pub fn shift(&self) -> SHIFT_R {
SHIFT_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bits 5:9 - The least-significant bit allowed to pass by the mask (inclusive)"]
#[inline(always)]
pub fn mask_lsb(&self) -> MASK_LSB_R {
MASK_LSB_R::new(((self.bits >> 5) & 0x1f) as u8)
}
#[doc = "Bits 10:14 - The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"]
#[inline(always)]
pub fn mask_msb(&self) -> MASK_MSB_R {
MASK_MSB_R::new(((self.bits >> 10) & 0x1f) as u8)
}
#[doc = "Bit 15 - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor."]
#[inline(always)]
pub fn signed(&self) -> SIGNED_R {
SIGNED_R::new(((self.bits >> 15) & 1) != 0)
}
#[doc = "Bit 16 - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)"]
#[inline(always)]
pub fn cross_input(&self) -> CROSS_INPUT_R {
CROSS_INPUT_R::new(((self.bits >> 16) & 1) != 0)
}
#[doc = "Bit 17 - If 1, feed the opposite lane's result into this lane's accumulator on POP."]
#[inline(always)]
pub fn cross_result(&self) -> CROSS_RESULT_R {
CROSS_RESULT_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 18 - If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."]
#[inline(always)]
pub fn add_raw(&self) -> ADD_RAW_R {
ADD_RAW_R::new(((self.bits >> 18) & 1) != 0)
}
#[doc = "Bits 19:20 - ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM."]
#[inline(always)]
pub fn force_msb(&self) -> FORCE_MSB_R {
FORCE_MSB_R::new(((self.bits >> 19) & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:4 - Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."]
#[inline(always)]
#[must_use]
pub fn shift(&mut self) -> SHIFT_W<INTERP1_CTRL_LANE1_SPEC> {
SHIFT_W::new(self, 0)
}
#[doc = "Bits 5:9 - The least-significant bit allowed to pass by the mask (inclusive)"]
#[inline(always)]
#[must_use]
pub fn mask_lsb(&mut self) -> MASK_LSB_W<INTERP1_CTRL_LANE1_SPEC> {
MASK_LSB_W::new(self, 5)
}
#[doc = "Bits 10:14 - The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"]
#[inline(always)]
#[must_use]
pub fn mask_msb(&mut self) -> MASK_MSB_W<INTERP1_CTRL_LANE1_SPEC> {
MASK_MSB_W::new(self, 10)
}
#[doc = "Bit 15 - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor."]
#[inline(always)]
#[must_use]
pub fn signed(&mut self) -> SIGNED_W<INTERP1_CTRL_LANE1_SPEC> {
SIGNED_W::new(self, 15)
}
#[doc = "Bit 16 - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)"]
#[inline(always)]
#[must_use]
pub fn cross_input(&mut self) -> CROSS_INPUT_W<INTERP1_CTRL_LANE1_SPEC> {
CROSS_INPUT_W::new(self, 16)
}
#[doc = "Bit 17 - If 1, feed the opposite lane's result into this lane's accumulator on POP."]
#[inline(always)]
#[must_use]
pub fn cross_result(&mut self) -> CROSS_RESULT_W<INTERP1_CTRL_LANE1_SPEC> {
CROSS_RESULT_W::new(self, 17)
}
#[doc = "Bit 18 - If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."]
#[inline(always)]
#[must_use]
pub fn add_raw(&mut self) -> ADD_RAW_W<INTERP1_CTRL_LANE1_SPEC> {
ADD_RAW_W::new(self, 18)
}
#[doc = "Bits 19:20 - ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM."]
#[inline(always)]
#[must_use]
pub fn force_msb(&mut self) -> FORCE_MSB_W<INTERP1_CTRL_LANE1_SPEC> {
FORCE_MSB_W::new(self, 19)
}
}
#[doc = "Control register for lane 1
You can [`read`](crate::Reg::read) this register and get [`interp1_ctrl_lane1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`interp1_ctrl_lane1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct INTERP1_CTRL_LANE1_SPEC;
impl crate::RegisterSpec for INTERP1_CTRL_LANE1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [`interp1_ctrl_lane1::R`](R) reader structure"]
impl crate::Readable for INTERP1_CTRL_LANE1_SPEC {}
#[doc = "`write(|w| ..)` method takes [`interp1_ctrl_lane1::W`](W) writer structure"]
impl crate::Writable for INTERP1_CTRL_LANE1_SPEC {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets INTERP1_CTRL_LANE1 to value 0"]
impl crate::Resettable for INTERP1_CTRL_LANE1_SPEC {
const RESET_VALUE: u32 = 0;
}