Example #1
0
    def __init__(self, env, network_fabric):
        super().__init__()

        self.__logger = LOGGER.bind(component=self.ENDPOINT_NAME)

        self.__env = env
        self.__cryptogen = SystemRandom()
        self.__network_fabric = network_fabric

        self.__processor = Processor(
            env,
            self.ENDPOINT_NAME,
            24,
            2.6 * Processor.FREQUENCY_GHZ,
            step_cycles=min(self._CPU_CYCLES_PER_KILOBYTE_GENERATE,
                            self._CPU_CYCLES_PER_KILOBYTE_COMPUTE,
                            self._CPU_CYCLES_PER_KILOBYTE_SEND,
                            self._CPU_CYCLES_PER_KILOBYTE_RECEIVE))

        self.submission_queues = []
        self.completion_queues = []

        self.__all_command_submitted = None
        self.__shutdown_hook = None
        self.summary = {
            "num_commands_submitted": 0,
            "num_commands_completed": 0,
            "total_data_bytes": 0
        }
    def __init__(self, env, gbps):
        self.__logger = LOGGER.bind(component="network-fabric")

        self.__env = env

        # capacity is in the unit of kilobyte
        self.__cable = simpy.Container(env, capacity=gbps * 1e9 / 8 / 1e3)

        self.__endpoints = {}
Example #3
0
    def __init__(self, env, network_fabric, submission_queues,
                 completion_queues):
        super().__init__()

        self.__logger = LOGGER.bind(component=self.ENDPOINT_NAME)

        self.__env = env
        self.__network_fabric = network_fabric

        self.__processor = Processor(
            env,
            self.ENDPOINT_NAME,
            2,
            self._CORE_FREQUENCY,
            step_cycles=min(self._CPU_CYCLES_PER_KILOBYTE_COMPUTE,
                            self._CPU_CYCLES_PER_KILOBYTE_SEND,
                            self._CPU_CYCLES_PER_KILOBYTE_RECEIVE))

        self.__submission_queues = submission_queues
        self.__completion_queues = completion_queues