Skip to content
Snippets Groups Projects
simulation.py 671 B
Newer Older
  • Learn to ignore specific revisions
  • """
    B-ASIC Simulation Module.
    TODO: More info.
    """
    
    from b_asic.operation import OperationId
    from numbers import Number
    from typing import List, Dict
    
    class OperationState:
    	"""
    	Simulation state of an operation.
    	TODO: More info.
    	"""
    
    	output_values: List[Number]
    	iteration: int
    
    	def __init__(self):
    		"""
    		Construct an OperationState.
    		"""
    		self.output_values = []
    		self.iteration = 0
    
    class SimulationState:
    	"""
    	Simulation state.
    	TODO: More info.
    	"""
    
    	operation_states: Dict[OperationId, OperationState]
    	iteration: int
    
    	def __init__(self):
    		"""
    		Construct a SimulationState.
    		"""
    		self.operation_states = {}
    		self.iteration = 0
    
    	# TODO: More stuff.