Struct InputOutput

Source
pub struct InputOutput { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Eventful for InputOutput

Source§

fn process( &mut self, simulation: &SimulationShared, mutable: &mut SimulationMut, ) -> Vec<EventGeneration>

main routine of the router. Do all things that must be done in a cycle, if any.

Source§

fn schedule( &mut self, current_cycle: Time, delay: Time, ) -> Option<EventGeneration>

We schedule in cycles multiple of the crossbar_frequency_divisor. Note the outputs of the router are instead scheduled by TryLinkTraversal::schedule. *

Source§

fn as_eventful(&self) -> Weak<RefCell<dyn Eventful>>

Extract the eventful from the implementing class. Required since as Rc<RefCell<Eventful>> does not work.
Source§

impl Quantifiable for InputOutput

Source§

fn total_memory(&self) -> usize

Get the total memory currently being employed by the implementing type. Both stack and heap.
Source§

fn print_memory_breakdown(&self)

Prints by stdout how much memory is used per component.
Source§

fn forecast_total_memory(&self) -> usize

Get an estimation on how much memory the type could reach during the simulation.
Source§

impl Router for InputOutput

Source§

fn insert( &mut self, current_cycle: Time, phit: Rc<Phit>, port: usize, rng: &mut StdRng, ) -> Vec<EventGeneration>

Introduces a phit into the router in the specified port. Should return a list of events to push into the event queue. This may include to schedule itself or a subcomponent.
Source§

fn acknowledge( &mut self, current_cycle: Time, port: usize, ack_message: AcknowledgeMessage, ) -> Vec<EventGeneration>

Receive the acknowledge of a phit clear. Generally to increase the credit count. Should return a list of events to push into the event queue. This may include to schedule itself or a subcomponent.
Source§

fn num_virtual_channels(&self) -> usize

To get the number of virtual channels the router uses.
Source§

fn virtual_port_size(&self, _port: usize, _virtual_channel: usize) -> usize

Get the number of phits that fit inside the buffer of a port.
Source§

fn iter_phits(&self) -> Box<dyn Iterator<Item = Rc<Phit>>>

To iterate over the phits managed by the router. Required to account memory.
Source§

fn get_status_at_emisor(&self, port: usize) -> Option<&dyn StatusAtEmissor>

Get a virtual port if any. To be used in some policies, e.g., VirtualChannelPolicy::Shortest.
Source§

fn get_maximum_credits_towards( &self, _port: usize, _virtual_channel: usize, ) -> Option<usize>

Get the maximum number of credits towards the neighbour. To be used in policies such as VirtualChannelPolicy::LowestSinghWeight.
Source§

fn get_index(&self) -> Option<usize>

Get the index of the router in the topology. To be used in policies such as VirtualChannelPolicy::LowestSinghWeight.
Source§

fn aggregate_statistics( &self, statistics: Option<ConfigurationValue>, router_index: usize, total_routers: usize, cycle: Time, ) -> Option<ConfigurationValue>

To optionally write router statistics into the simulation output. Each router receives the aggregate of the statistics of the previous routers. In the frist router we have statistics=None and router_index=0. In the last router we have router_index+1==total_routers==topology.routers.len(), that may be used for final normalizations.
Source§

fn reset_statistics(&mut self, next_cycle: Time)

Clears all collected statistics
Source§

fn build_emissor_status( &self, port: usize, topology: &dyn Topology, ) -> Box<dyn StatusAtEmissor + 'static>

Build a status for an element that sends packets directly to the router ports. This is intended to build the status of the servers.

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
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.
Source§

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

Source§

fn vzip(self) -> V