1#[doc = "Register `PERFCTR0` reader"]
2pub type R = crate::R<PERFCTR0_SPEC>;
3#[doc = "Register `PERFCTR0` writer"]
4pub type W = crate::W<PERFCTR0_SPEC>;
5#[doc = "Field `PERFCTR0` reader - Busfabric saturating performance counter 0
6 Count some event signal from the busfabric arbiters.
7 Write any value to clear. Select an event to count using PERFSEL0"]
8pub type PERFCTR0_R = crate::FieldReader<u32>;
9#[doc = "Field `PERFCTR0` writer - Busfabric saturating performance counter 0
10 Count some event signal from the busfabric arbiters.
11 Write any value to clear. Select an event to count using PERFSEL0"]
12pub type PERFCTR0_W<'a, REG> = crate::FieldWriter<'a, REG, 24, u32>;
13impl R {
14#[doc = "Bits 0:23 - Busfabric saturating performance counter 0
15 Count some event signal from the busfabric arbiters.
16 Write any value to clear. Select an event to count using PERFSEL0"]
17 #[inline(always)]
18pub fn perfctr0(&self) -> PERFCTR0_R {
19 PERFCTR0_R::new(self.bits & 0x00ff_ffff)
20 }
21}
22impl W {
23#[doc = "Bits 0:23 - Busfabric saturating performance counter 0
24 Count some event signal from the busfabric arbiters.
25 Write any value to clear. Select an event to count using PERFSEL0"]
26 #[inline(always)]
27 #[must_use]
28pub fn perfctr0(&mut self) -> PERFCTR0_W<PERFCTR0_SPEC> {
29 PERFCTR0_W::new(self, 0)
30 }
31#[doc = r" Writes raw bits to the register."]
32 #[doc = r""]
33 #[doc = r" # Safety"]
34 #[doc = r""]
35 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
36 #[inline(always)]
37pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
38self.bits = bits;
39self
40}
41}
42#[doc = "Bus fabric performance counter 0
4344You can [`read`](crate::generic::Reg::read) this register and get [`perfctr0::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 [`perfctr0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct PERFCTR0_SPEC;
46impl crate::RegisterSpec for PERFCTR0_SPEC {
47type Ux = u32;
48}
49#[doc = "`read()` method returns [`perfctr0::R`](R) reader structure"]
50impl crate::Readable for PERFCTR0_SPEC {}
51#[doc = "`write(|w| ..)` method takes [`perfctr0::W`](W) writer structure"]
52impl crate::Writable for PERFCTR0_SPEC {
53const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
54const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x00ff_ffff;
55}
56#[doc = "`reset()` method sets PERFCTR0 to value 0"]
57impl crate::Resettable for PERFCTR0_SPEC {
58const RESET_VALUE: u32 = 0;
59}