def __init__(self, name: str, memory_name: str):
        super(MemoryBoundProcessor, self).__init__(name,
                                                   "memory_bound_processor")
        # Our Port
        self.ports["doorbell"] = Port("doorbell", PortType.READ, self)
        self.ports["instruction_request"] = Port("instruction_request",
                                                 PortType.WRITE, self)
        self.ports["instruction_response"] = Port("instruction_response",
                                                  PortType.READ, self)
        self.ports["data_request"] = Port("data_request", PortType.WRITE, self)
        self.ports["data_response"] = Port("data_response", PortType.READ,
                                           self)

        # Internal Connections

        self.internal_connections["decoded_instruction"] = InternalConnection(
            "decoded_instruction", self, InternalConnectionType.FIFO,
            ConnectionParameters())

        # Parameters

        self.parameters["memory_name"] = Parameter("memory_name",
                                                   ParameterType.STRING,
                                                   memory_name)
        self.parameters["num_registers"] = Parameter("num_registers",
                                                     ParameterType.UINT,
                                                     str(10))
    def __init__(self, name: str, memory_name: str):
        super(Memory, self).__init__(name, "memory")
        # Our Port
        self.ports["requests"] = Port("requests", PortType.READ_ARRAY, self)
        self.ports["responses"] = Port("responses", PortType.WRITE_ARRAY, self)

        self.parameters["memory_name"] = Parameter("memory_name",
                                                   ParameterType.STRING,
                                                   memory_name)
    def __init__(self, name: str, memory_name: str):
        super(SimpleApplication, self).__init__(name, "simple_driver")
        # Our Port
        self.ports["doorbell"] = Port("doorbell", PortType.READ, self)

        self.parameters["memory_name"] = Parameter("memory_name",
                                                   ParameterType.STRING,
                                                   memory_name)
 def __init__(self, name: str):
     super(Producer, self).__init__(name, "number_producer")
     # Our Port
     self.ports["out"] = Port("out", PortType.WRITE, self)
     # Our Parameters with reasonable default values
     self.parameters["num_transactions"] = Parameter("num_transactions", ParameterType.UINT, str(100))
     self.parameters["min_number"] = Parameter("min_number", ParameterType.UINT, str(0))
     self.parameters["max_number"] = Parameter("max_number", ParameterType.UINT, str(100))
    def __init__(self, name: str, memory_name: str):
        super(FunctionalProcessor, self).__init__(name, "functional_processor")
        # Our Port
        self.ports["doorbell"] = Port("doorbell", PortType.READ, self)

        self.parameters["memory_name"] = Parameter("memory_name",
                                                   ParameterType.STRING,
                                                   memory_name)
        self.parameters["num_registers"] = Parameter("num_registers",
                                                     ParameterType.UINT,
                                                     str(10))
    def __init__(self, name: str, domain: str, memory_name: str):
        super(PerformantProcessor, self).__init__(name, "performant_processor")
        # Our Port
        self.ports["doorbell"] = Port("doorbell", PortType.READ, self)
        self.ports["instruction_request"] = Port("instruction_request",
                                                 PortType.WRITE, self)
        self.ports["instruction_response"] = Port("instruction_response",
                                                  PortType.READ, self)
        self.ports["data_request"] = Port("data_request", PortType.WRITE, self)
        self.ports["data_response"] = Port("data_response", PortType.READ,
                                           self)

        # Internal Connections
        connection_parameters = ConnectionParameters()
        connection_parameters.is_timed = True
        connection_parameters.domain = domain.encode("utf-8")
        self.internal_connections["fetcher"] = InternalConnection(
            "fetcher", self, InternalConnectionType.PIPELINE,
            connection_parameters)
        self.internal_connections["decoder"] = InternalConnection(
            "decoder", self, InternalConnectionType.PIPELINE,
            connection_parameters)
        self.internal_connections["executor"] = InternalConnection(
            "executor", self, InternalConnectionType.PIPELINE,
            connection_parameters)
        self.internal_connections["write_back"] = InternalConnection(
            "write_back", self, InternalConnectionType.PIPELINE,
            connection_parameters)

        # Parameters

        self.parameters["memory_name"] = Parameter("memory_name",
                                                   ParameterType.STRING,
                                                   memory_name)
        self.parameters["num_registers"] = Parameter("num_registers",
                                                     ParameterType.UINT,
                                                     str(10))
    def __init__(self, name: str, memory_name: str):
        super(LoopApplication, self).__init__(name, "loop_driver")
        # Our Port
        self.ports["doorbell"] = Port("doorbell", PortType.READ, self)

        self.parameters["memory_name"] = Parameter("memory_name",
                                                   ParameterType.STRING,
                                                   memory_name)
        self.parameters["num_iterations"] = Parameter("num_iterations",
                                                      ParameterType.STRING,
                                                      str(100))
        self.parameters["num_ops_per_iteration"] = Parameter(
            "num_ops_per_iteration", ParameterType.STRING, str(100))
        self.parameters["mode"] = Parameter("mode", ParameterType.STRING,
                                            "alu")
 def __init__(self, name: str):
     super(Consumer, self).__init__(name, "number_consumer")
     # Our Port
     self.ports["in"] = Port("in", PortType.READ, self)