pub struct Sun50iDe2 {
regs: MmioRegion,
power_state: PowerState,
sram_claimed: bool,
sram_config: Option<SramConfig>,
children: Vec<BusChild>,
}Fields§
§regs: MmioRegion§power_state: PowerState§sram_claimed: bool§sram_config: Option<SramConfig>§children: Vec<BusChild>Implementations§
Source§impl Sun50iDe2
impl Sun50iDe2
Sourcepub fn set_sram_config(&mut self, cfg: SramConfig)
pub fn set_sram_config(&mut self, cfg: SramConfig)
Supplies the SRAM-controller configuration required by
Self::claim_sram before BusDriver::init can succeed.
Sourcepub fn claim_sram(&mut self) -> Result<(), BusError>
pub fn claim_sram(&mut self) -> Result<(), BusError>
Claims DE2 ownership of its SRAM region: read-modify-write of the SRAM controller control register to route the region away from the CPU/debug default owner, followed by a read-back verification.
Fails with BusError::InitFailed when no configuration was
supplied, and with BusError::BusFault when the read-back does
not confirm the new ownership (controller absent or wedged).
Sourcepub fn release_sram(&mut self)
pub fn release_sram(&mut self)
Releases DE2 SRAM ownership, restoring the default (CPU) owner.
A missing configuration or failed write leaves the flag cleared so
a later shutdown/claim cycle starts from a known state.
Sourcepub fn sram_claimed(&self) -> bool
pub fn sram_claimed(&self) -> bool
Returns true while this instance owns the DE2 SRAM region.
Trait Implementations§
Source§impl BusDriver for Sun50iDe2
impl BusDriver for Sun50iDe2
Source§fn compatible(&self) -> &[&str]
fn compatible(&self) -> &[&str]
Performs the compatible operation.
Source§fn as_firewall(&self) -> Option<&dyn FirewallController>
fn as_firewall(&self) -> Option<&dyn FirewallController>
FirewallController] capability, if any. Read moreSource§fn probe(&self) -> bool
fn probe(&self) -> bool
true if the driver believes the hardware is present. Read more