pub struct EngineControl {Show 18 fields
pub regs: Registers,
pub running: bool,
pub done: bool,
pub done_unread: bool,
pub gie: bool,
pub ier: bool,
pub isr: bool,
pub ticks: b64,
pub start_tick: b64,
pub done_tick: b64,
pub ticks_hi: b32,
pub aw_addr: b12,
pub aw_have: bool,
pub w_data: b32,
pub w_have: bool,
pub b_valid: bool,
pub r_valid: bool,
pub r_data: b32,
}Expand description
Resettable control state.
This one register holds the configuration, the run state machine, the
timing counters and the AXI4-Lite handshake latches. All of it resets to
zero (see Default for Engine), which is the IDLE state with no
arguments.
Fields§
§regs: RegistersConfiguration (the host-written arguments).
running: boolRunning: set by ap_start, cleared when the last frame is acknowledged.
done: boolFinished (sticky until reset). Blocks a second start and any argument write, enforcing one run per reset.
done_unread: boolap_done not yet read by the host. ap_ctrl_hs makes ap_done clear
on read, so this bit is cleared when AP_CTRL is read.
gie: boolGlobal interrupt enable (GIE, bit 0 of 0x004).
ier: boolInterrupt enable (done) (IER, bit 0 of 0x008).
isr: boolInterrupt status (done) (ISR, bit 0 of 0x00c). Set when the run
finishes; the host toggles it by writing 1.
ticks: b64Free-running cycle counter (64 bits). Counts every clock from reset; the host uses it both to time the run and, by sampling it twice against its own wall clock, to measure the clock frequency.
start_tick: b64Tick at start (64 bits): the value of ticks on the cycle the start
write was handled.
done_tick: b64Tick when the last frame was acknowledged (64 bits).
ticks_hi: b32High half captured when TICKS lo is read. A 64-bit counter is read
as two 32-bit words; capturing the high half at the moment the low
half is read makes the pair consistent even if the low half wraps in
between.
aw_addr: b12Latched write address (12 bits). AXI4-Lite may deliver the address (AW) and the data (W) on different cycles, so each is held until both have arrived.
aw_have: boolA write address is latched.
w_data: b32Latched write data (32 bits).
w_have: boolWrite data is latched.
b_valid: boolWrite response pending (B valid); held until the host’s b_ready.
r_valid: boolRead data pending (R valid); held until the host’s r_ready.
r_data: b32Read data (32 bits), held stable while r_valid waits.
Trait Implementations§
Source§impl Clone for EngineControl
impl Clone for EngineControl
Source§fn clone(&self) -> EngineControl
fn clone(&self) -> EngineControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EngineControl
impl Debug for EngineControl
Source§impl Digital for EngineControl
impl Digital for EngineControl
Source§const BITS: usize
const BITS: usize
Source§fn static_kind() -> Kind
fn static_kind() -> Kind
Source§fn bin(self) -> Box<[BitX]>
fn bin(self) -> Box<[BitX]>
§fn typed_bits(self) -> TypedBits
fn typed_bits(self) -> TypedBits
§fn discriminant(self) -> TypedBits
fn discriminant(self) -> TypedBits
§fn variant_kind(self) -> Kind
fn variant_kind(self) -> Kind
§fn binary_string(self) -> String
fn binary_string(self) -> String
Source§impl PartialEq for EngineControl
impl PartialEq for EngineControl
impl Copy for EngineControl
impl StructuralPartialEq for EngineControl
Auto Trait Implementations§
impl Freeze for EngineControl
impl RefUnwindSafe for EngineControl
impl Send for EngineControl
impl Sync for EngineControl
impl Unpin for EngineControl
impl UnsafeUnpin for EngineControl
impl UnwindSafe for EngineControl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more