Skip to content
Snippets Groups Projects
simulation.py 854 B
Newer Older
  • Learn to ignore specific revisions
  • """@package docstring
    
    B-ASIC Simulation Module.
    TODO: More info.
    """
    
    from numbers import Number
    
    class OperationState:
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
        """Simulation state of an operation.
        TODO: More info.
        """
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
        output_values: List[Number]
        iteration: int
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
        def __init__(self):
            self.output_values = []
            self.iteration = 0
    
    class SimulationState:
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
        """Simulation state.
        TODO: More info.
        """
    
        operation_states: Dict[int, OperationState]
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
        iteration: int
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
        def __init__(self):
    
            op_state = OperationState()
            self.operation_states = {1: op_state}
    
    Jacob Wahlman's avatar
    Jacob Wahlman committed
            self.iteration = 0
    
        # @property
        # #def iteration(self):
        #    return self.iteration
        # @iteration.setter
        # def iteration(self, new_iteration: int):
        #    self.iteration = new_iteration
        #
        # TODO: More stuff