pub enum Protocol {
Registered {
latency: u32,
},
StartDone {
start: String,
done: String,
},
Pipelined {
start: String,
done: String,
ii: u32,
},
GoDone {
go: String,
done: String,
},
EnableDone {
enable: String,
done: String,
clear: String,
},
LoadGoRead {
load: String,
din: String,
go: String,
done: String,
raddr: String,
dout: String,
reset_each_op: bool,
load_slots: Vec<RegSlot>,
read_slots: Vec<RegSlot>,
},
Beats {
period: u32,
drives: Vec<Drive>,
captures: Vec<u32>,
},
Launch {
start: String,
busy: String,
dcr: DcrBus,
setup: Vec<DcrWrite>,
flush: Option<u32>,
bus: LineBus,
},
}Expand description
How the harness hands operands to a candidate and collects its results.
Variants§
Registered
A new operation every cycle; its result is valid latency cycles later (0: combinational).
StartDone
Pulse start with the operands; hold them until done, which marks the result valid.
One idle cycle separates operations.
Pipelined
Pulse start every ii cycles with a new operation; each done marks the next result.
GoDone
Hold go high; each one-cycle done marks a result. A component restarts in the very cycle it
raises done, so from that cycle on the next operation’s operands are presented (a read issued
then answers with them).
EnableDone
Hold enable high with the operands until done, which stays up once raised; then lower enable and
raise clear for one cycle, which takes done down, before the next operation — how Spatial’s Fringe
drives an accelerator (its command and status registers, the accelerator’s own reset between runs).
LoadGoRead
A register-file engine: one load cycle per load slot puts the slot on din, a go pulse
starts it, done marks the results, and one cycle per read slot puts the slot’s index on
raddr and takes it from dout. With reset_each_op the DUT’s reset is pulsed before each
operation’s loads (an engine whose load counter counts from reset).
Fields
Beats
A fixed beat schedule: every period cycles a call begins; beat t of a call drives the
drives of beat t, and the result of the call’s operation j is on the output binds of
slot j exactly captures[j] cycles after its beat 0. A call takes the candidate’s whole batch.
Launch
A device launched like a GPU kernel: after reset the setup writes go out on its DCR port, one
a cycle; then each call raises start for a cycle, waits for busy to rise and to fall, issues
the flush DCR read (if any) and waits for its answer, and takes the call’s results from the
output regions of bus, which the device reads its operands from and writes its results to.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnsafeUnpin for Protocol
impl UnwindSafe for Protocol
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.