Exemplo n.º 1
0
 def get_time(cls, v: core.Vertex) -> Optional[int]:
     if "time" in v.properties:
         return v.properties["time"]
     else:
         if v.has_trait(VertexTrait.WCET):
             return 0
         if v.has_trait(VertexTrait.WCCT):
             return 0
         else:
             return None
Exemplo n.º 2
0
 def get_max_operations(cls, v: core.Vertex) -> Optional[Mapping[str, int]]:
     if "max_operations" in v.properties:
         return v.properties["max_operations"]
     else:
         if v.has_trait(VertexTrait.InstrumentedFunction):
             return {}
         else:
             return None
Exemplo n.º 3
0
 def get_trigger_time(cls, v: core.Vertex) -> Optional[Mapping[int, str]]:
     if "trigger_time" in v.properties:
         return v.properties["trigger_time"]
     else:
         if v.has_trait(VertexTrait.TimeTriggeredScheduler):
             return {}
         else:
             return None
Exemplo n.º 4
0
 def get_max_memory_size_in_bytes(cls, v: core.Vertex) -> Optional[int]:
     if "max_memory_size_in_bytes" in v.properties:
         return v.properties["max_memory_size_in_bytes"]
     else:
         if v.has_trait(VertexTrait.InstrumentedFunction):
             return 1
         else:
             return None
Exemplo n.º 5
0
 def get_slots(cls, v: core.Vertex) -> Optional[int]:
     if "slots" in v.properties:
         return v.properties["slots"]
     else:
         if v.has_trait(VertexTrait.TimeDivisionMultiplexer):
             return 1
         else:
             return None
Exemplo n.º 6
0
 def get_offset_denominator_per_sec(cls, v: core.Vertex) -> Optional[int]:
     if "offset_denominator_per_sec" in v.properties:
         return v.properties["offset_denominator_per_sec"]
     else:
         if v.has_trait(VertexTrait.ReactorTimer):
             return 1
         else:
             return None
Exemplo n.º 7
0
 def get_can_be_explored(cls, v: core.Vertex) -> Optional[bool]:
     if "can_be_explored" in v.properties:
         return v.properties["can_be_explored"]
     else:
         if v.has_trait(VertexTrait.AbstractProcessingComponent):
             return True
         else:
             return None
Exemplo n.º 8
0
 def get_apriori_importance(cls, v: core.Vertex) -> Optional[int]:
     if "apriori_importance" in v.properties:
         return v.properties["apriori_importance"]
     else:
         if v.has_trait(VertexTrait.MinimumThroughput):
             return 1
         else:
             return None
Exemplo n.º 9
0
 def get_max_elem_count(cls, v: core.Vertex) -> Optional[int]:
     if "max_elem_count" in v.properties:
         return v.properties["max_elem_count"]
     else:
         if v.has_trait(VertexTrait.InstrumentedSignal):
             return 1
         else:
             return None
Exemplo n.º 10
0
 def get_production(cls, v: core.Vertex) -> Optional[Mapping[str, int]]:
     if "production" in v.properties:
         return v.properties["production"]
     else:
         if v.has_trait(VertexTrait.SDFComb):
             raise ValueError(
                 "Property production should exist in vertex '" +
                 v.identifier + "' with trait SDFComb, but does not.")
         else:
             return None
Exemplo n.º 11
0
 def get_configurations(cls, v: core.Vertex) -> Optional[Sequence[str]]:
     if "configurations" in v.properties:
         return v.properties["configurations"]
     else:
         if v.has_trait(VertexTrait.Instrumented):
             raise ValueError(
                 "Property configurations should exist in vertex '" +
                 v.identifier + "' with trait Instrumented, but does not.")
         else:
             return None
Exemplo n.º 12
0
 def get_max_memory_internal_bytes(cls, v: core.Vertex) -> Optional[int]:
     if "max_memory_internal_bytes" in v.properties:
         return v.properties["max_memory_internal_bytes"]
     else:
         if v.has_trait(VertexTrait.InstrumentedProcessorTile):
             raise ValueError(
                 "Property max_memory_internal_bytes should exist in vertex '"
                 + v.identifier +
                 "' with trait InstrumentedProcessorTile, but does not.")
         else:
             return None
Exemplo n.º 13
0
 def get_min_frequency_hz(cls, v: core.Vertex) -> Optional[int]:
     if "min_frequency_hz" in v.properties:
         return v.properties["min_frequency_hz"]
     else:
         if v.has_trait(VertexTrait.InstrumentedProcessorTile):
             raise ValueError(
                 "Property min_frequency_hz should exist in vertex '" +
                 v.identifier +
                 "' with trait InstrumentedProcessorTile, but does not.")
         else:
             return None
Exemplo n.º 14
0
 def get_period_numerator_per_sec(cls, v: core.Vertex) -> Optional[int]:
     if "period_numerator_per_sec" in v.properties:
         return v.properties["period_numerator_per_sec"]
     else:
         if v.has_trait(VertexTrait.ReactorTimer):
             raise ValueError(
                 "Property period_numerator_per_sec should exist in vertex '"
                 + v.identifier +
                 "' with trait ReactorTimer, but does not.")
         else:
             return None
Exemplo n.º 15
0
 def get_provides(
         cls, v: core.Vertex) -> Optional[Mapping[str, Mapping[str, int]]]:
     if "provides" in v.properties:
         return v.properties["provides"]
     else:
         if v.has_trait(VertexTrait.Instrumented):
             raise ValueError("Property provides should exist in vertex '" +
                              v.identifier +
                              "' with trait Instrumented, but does not.")
         else:
             return None
Exemplo n.º 16
0
 def get_max_bandwith_bytes_per_sec(cls, v: core.Vertex) -> Optional[int]:
     if "max_bandwith_bytes_per_sec" in v.properties:
         return v.properties["max_bandwith_bytes_per_sec"]
     else:
         if v.has_trait(VertexTrait.InstrumentedCommunicationInterconnect):
             raise ValueError(
                 "Property max_bandwith_bytes_per_sec should exist in vertex '"
                 + v.identifier +
                 "' with trait InstrumentedCommunicationInterconnect, but does not."
             )
         else:
             return None
Exemplo n.º 17
0
 def get_max_clock_cycles_per_op(
         cls, v: core.Vertex) -> Optional[Mapping[str, int]]:
     if "max_clock_cycles_per_op" in v.properties:
         return v.properties["max_clock_cycles_per_op"]
     else:
         if v.has_trait(VertexTrait.InstrumentedProcessorTile):
             raise ValueError(
                 "Property max_clock_cycles_per_op should exist in vertex '"
                 + v.identifier +
                 "' with trait InstrumentedProcessorTile, but does not.")
         else:
             return None