pub struct InputOutput { /* private fields */ }
Implementations§
Source§impl InputOutput
impl InputOutput
pub fn new(arg: RouterBuilderArgument<'_>) -> Rc<RefCell<InputOutput>>
Trait Implementations§
Source§impl Eventful for InputOutput
impl Eventful for InputOutput
Source§fn process(
&mut self,
simulation: &SimulationShared,
mutable: &mut SimulationMut,
) -> Vec<EventGeneration>
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§impl Quantifiable for InputOutput
impl Quantifiable for InputOutput
Source§fn total_memory(&self) -> usize
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)
fn print_memory_breakdown(&self)
Prints by stdout how much memory is used per component.
Source§fn forecast_total_memory(&self) -> usize
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
impl Router for InputOutput
Source§fn insert(
&mut self,
current_cycle: Time,
phit: Rc<Phit>,
port: usize,
rng: &mut StdRng,
) -> Vec<EventGeneration>
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>
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
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
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>>>
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>
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>
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>
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>
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)
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>
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§
impl Freeze for InputOutput
impl !RefUnwindSafe for InputOutput
impl !Send for InputOutput
impl !Sync for InputOutput
impl Unpin for InputOutput
impl !UnwindSafe for InputOutput
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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