pub struct EpochBlock<'a> {
pub start: Option<fn()>,
pub end: Option<fn()>,
pub blob: Option<&'a [u64]>,
pub streng_mask: u16,
}Expand description
One entry of a network’s epoch list — the Rust equivalent of the generated
EpochBlock_ItemTypeDef.
start runs before an epoch-controller blob (typically MCU/NPU cache
maintenance for the epoch’s inputs) and is the pre-op of a
streaming-engine epoch. end runs after the epoch completes: cache
invalidation, the generated post-op, or the body of a pure software epoch.
Fields§
§start: Option<fn()>Called before an epoch-controller blob, or the pre-op of a
streaming-engine epoch. Npu::run_streaming_epoch calls it only
after the completion wait is armed.
end: Option<fn()>Called after the epoch completes.
blob: Option<&'a [u64]>Epoch controller blob to execute. None for a streaming-engine epoch
or a pure software epoch.
streng_mask: u16Output streaming engines that signal completion of a streaming-engine
epoch. Bit n is engine n. 0 for epoch-controller and software
epochs.
Implementations§
Source§impl<'a> EpochBlock<'a>
impl<'a> EpochBlock<'a>
Sourcepub const fn hw(blob: &'a [u64]) -> Self
pub const fn hw(blob: &'a [u64]) -> Self
A hardware epoch executing blob on the epoch controller.
Sourcepub const fn hw_with(
blob: &'a [u64],
start: Option<fn()>,
end: Option<fn()>,
) -> Self
pub const fn hw_with( blob: &'a [u64], start: Option<fn()>, end: Option<fn()>, ) -> Self
A hardware epoch with cache-maintenance/trace callbacks.
Sourcepub const fn streaming(start: fn(), end: Option<fn()>, streng_mask: u16) -> Self
pub const fn streaming(start: fn(), end: Option<fn()>, streng_mask: u16) -> Self
A streaming-engine epoch.
start is the generated pre-op (LL_ATON_Start_EpochBlock_*). It
programs the units and enables the output streaming engines named by
streng_mask. Npu::run_network calls it after arming the wait, so
the engines must be enabled from start and not before.
end is the generated post-op (LL_ATON_End_EpochBlock_*): it
disables those units and performs cache maintenance. It runs only
after every engine in streng_mask has completed.
streng_mask is the generated epoch’s output-engine wait mask. Bit 0
is streaming engine 0, and only bits 0 through 9 are valid. An empty
mask or a higher bit makes Npu::run_streaming_epoch return
Error::InvalidWaitMask.