Skip to main content

SeqItemIf

Trait SeqItemIf 

Source
pub trait SeqItemIf<REQ: 'static, RSP: 'static>: 'static {
    // Required methods
    fn get_next_item(&self) -> Pin<Box<dyn Future<Output = SeqItem<REQ>> + '_>>;
    fn try_next_item(&self) -> Option<SeqItem<REQ>>;
    fn item_done(&self, rsp: Option<RSP>);
    fn put_response(&self, id: TxnId, rsp: RSP);
}
Expand description

What a sequencer’s export offers a driver. Behind dyn, so the port can hold it without knowing which sequencer it came from.

Required Methods§

Source

fn get_next_item(&self) -> Pin<Box<dyn Future<Output = SeqItem<REQ>> + '_>>

Source

fn try_next_item(&self) -> Option<SeqItem<REQ>>

Take an item only if one is waiting. The UVM’s try_next_item (clause 15.2.1.2.2, present since 1.1d); pyuvm has no equivalent. A driver that must do something else on this clock edge cannot afford to block, and this is the call for it.

Source

fn item_done(&self, rsp: Option<RSP>)

Source

fn put_response(&self, id: TxnId, rsp: RSP)

Answer a request whose item_done has already been called — the pipelined case, where the response is not ready when the sequencer is released. The UVM’s put_response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§