Skip to main content

Protocol

Enum Protocol 

Source
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).

Fields

§latency: u32
§

StartDone

Pulse start with the operands; hold them until done, which marks the result valid. One idle cycle separates operations.

Fields

§start: String
§done: String
§

Pipelined

Pulse start every ii cycles with a new operation; each done marks the next result.

Fields

§start: String
§done: String
§ii: u32
§

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).

Fields

§done: String
§

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).

Fields

§enable: String
§done: String
§clear: String
§

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

§load: String
§done: String
§raddr: String
§dout: String
§reset_each_op: bool
§load_slots: Vec<RegSlot>
§read_slots: Vec<RegSlot>
§

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.

Fields

§period: u32
§drives: Vec<Drive>
§captures: Vec<u32>
§

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.

Fields

§start: String
§busy: String
§setup: Vec<DcrWrite>
§flush: Option<u32>

Implementations§

Source§

impl Protocol

Source

pub fn label(&self) -> String

Trait Implementations§

Source§

impl Clone for Protocol

Source§

fn clone(&self) -> Protocol

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Protocol

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Protocol

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Protocol

Source§

fn eq(&self, other: &Protocol) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Protocol

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Protocol

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,