cyt4dn_b/m0/videoss0/subss/gfx2d/cmdseq/
status.rs1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `TASKBUFFERDONE` reader - Each bit corresponds to one task buffer. '1' means that the ExecOffset equals to the StopOffset"]
17pub type TASKBUFFERDONE_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `TASKBUFFERSYNC` reader - Each bit corresponds to one task buffer. '1' means that the scheduling of corresponding TB is blocked until some SW or HW state is reached."]
19pub type TASKBUFFERSYNC_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `SCHEDULERACTIVETB` reader - Task buffer being executed in scheduler. If scheduler is in idle state, the value of this field is not valid."]
21pub type SCHEDULERACTIVETB_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `SCHEDULERIDLE` reader - Scheduler is not processing any instructions and there are no outstanding AXI transactions."]
23pub type SCHEDULERIDLE_R = crate::BitReader<bool>;
24#[doc = "Field `FETCHEDACTIVETB` reader - Task buffer being fetch last in programmer. If programmer is in idle state, the value of this field is not valid."]
25pub type FETCHEDACTIVETB_R = crate::FieldReader<u8, u8>;
26#[doc = "Field `REQUESTEDAXITRANSACTIONS` reader - There are some outstanding axi transactions that have been requested but are not received yet."]
27pub type REQUESTEDAXITRANSACTIONS_R = crate::BitReader<bool>;
28#[doc = "Field `PROGRAMMERSTATE` reader - Execution state of programmer"]
29pub type PROGRAMMERSTATE_R = crate::FieldReader<u8, PROGRAMMERSTATE_A>;
30#[doc = "Execution state of programmer\n\nValue on reset: 0"]
31#[derive(Clone, Copy, Debug, PartialEq, Eq)]
32#[repr(u8)]
33pub enum PROGRAMMERSTATE_A {
34 #[doc = "0: When all fetched instructions have been executed and there are no functions scheduled for the execution"]
35 IDLE = 0,
36 #[doc = "1: During execution of the SYNC instruction"]
37 SYNC = 1,
38 #[doc = "2: Execution of instructions"]
39 ACTIVE = 2,
40 #[doc = "3: There is function scheduled for the execution, but the internal instruction buffer is empty."]
41 AXI_WAIT = 3,
42}
43impl From<PROGRAMMERSTATE_A> for u8 {
44 #[inline(always)]
45 fn from(variant: PROGRAMMERSTATE_A) -> Self {
46 variant as _
47 }
48}
49impl PROGRAMMERSTATE_R {
50 #[doc = "Get enumerated values variant"]
51 #[inline(always)]
52 pub fn variant(&self) -> PROGRAMMERSTATE_A {
53 match self.bits {
54 0 => PROGRAMMERSTATE_A::IDLE,
55 1 => PROGRAMMERSTATE_A::SYNC,
56 2 => PROGRAMMERSTATE_A::ACTIVE,
57 3 => PROGRAMMERSTATE_A::AXI_WAIT,
58 _ => unreachable!(),
59 }
60 }
61 #[doc = "Checks if the value of the field is `IDLE`"]
62 #[inline(always)]
63 pub fn is_idle(&self) -> bool {
64 *self == PROGRAMMERSTATE_A::IDLE
65 }
66 #[doc = "Checks if the value of the field is `SYNC`"]
67 #[inline(always)]
68 pub fn is_sync(&self) -> bool {
69 *self == PROGRAMMERSTATE_A::SYNC
70 }
71 #[doc = "Checks if the value of the field is `ACTIVE`"]
72 #[inline(always)]
73 pub fn is_active(&self) -> bool {
74 *self == PROGRAMMERSTATE_A::ACTIVE
75 }
76 #[doc = "Checks if the value of the field is `AXI_WAIT`"]
77 #[inline(always)]
78 pub fn is_axi_wait(&self) -> bool {
79 *self == PROGRAMMERSTATE_A::AXI_WAIT
80 }
81}
82#[doc = "Field `CMDSEQIDLE` reader - CmdSeq is not processing any instructions and there are no outstanding AXI transactions."]
83pub type CMDSEQIDLE_R = crate::BitReader<bool>;
84impl R {
85 #[doc = "Bits 0:7 - Each bit corresponds to one task buffer. '1' means that the ExecOffset equals to the StopOffset"]
86 #[inline(always)]
87 pub fn taskbufferdone(&self) -> TASKBUFFERDONE_R {
88 TASKBUFFERDONE_R::new((self.bits & 0xff) as u8)
89 }
90 #[doc = "Bits 8:15 - Each bit corresponds to one task buffer. '1' means that the scheduling of corresponding TB is blocked until some SW or HW state is reached."]
91 #[inline(always)]
92 pub fn taskbuffersync(&self) -> TASKBUFFERSYNC_R {
93 TASKBUFFERSYNC_R::new(((self.bits >> 8) & 0xff) as u8)
94 }
95 #[doc = "Bits 16:18 - Task buffer being executed in scheduler. If scheduler is in idle state, the value of this field is not valid."]
96 #[inline(always)]
97 pub fn scheduleractivetb(&self) -> SCHEDULERACTIVETB_R {
98 SCHEDULERACTIVETB_R::new(((self.bits >> 16) & 7) as u8)
99 }
100 #[doc = "Bit 19 - Scheduler is not processing any instructions and there are no outstanding AXI transactions."]
101 #[inline(always)]
102 pub fn scheduleridle(&self) -> SCHEDULERIDLE_R {
103 SCHEDULERIDLE_R::new(((self.bits >> 19) & 1) != 0)
104 }
105 #[doc = "Bits 20:22 - Task buffer being fetch last in programmer. If programmer is in idle state, the value of this field is not valid."]
106 #[inline(always)]
107 pub fn fetchedactivetb(&self) -> FETCHEDACTIVETB_R {
108 FETCHEDACTIVETB_R::new(((self.bits >> 20) & 7) as u8)
109 }
110 #[doc = "Bit 23 - There are some outstanding axi transactions that have been requested but are not received yet."]
111 #[inline(always)]
112 pub fn requestedaxitransactions(&self) -> REQUESTEDAXITRANSACTIONS_R {
113 REQUESTEDAXITRANSACTIONS_R::new(((self.bits >> 23) & 1) != 0)
114 }
115 #[doc = "Bits 24:25 - Execution state of programmer"]
116 #[inline(always)]
117 pub fn programmerstate(&self) -> PROGRAMMERSTATE_R {
118 PROGRAMMERSTATE_R::new(((self.bits >> 24) & 3) as u8)
119 }
120 #[doc = "Bit 26 - CmdSeq is not processing any instructions and there are no outstanding AXI transactions."]
121 #[inline(always)]
122 pub fn cmdseqidle(&self) -> CMDSEQIDLE_R {
123 CMDSEQIDLE_R::new(((self.bits >> 26) & 1) != 0)
124 }
125}
126#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](index.html) module"]
127pub struct STATUS_SPEC;
128impl crate::RegisterSpec for STATUS_SPEC {
129 type Ux = u32;
130}
131#[doc = "`read()` method returns [status::R](R) reader structure"]
132impl crate::Readable for STATUS_SPEC {
133 type Reader = R;
134}
135#[doc = "`reset()` method sets STATUS to value 0"]
136impl crate::Resettable for STATUS_SPEC {
137 const RESET_VALUE: Self::Ux = 0;
138}