hwt/simulator/hdlSimulator.py
def _initUnitSignals(self, unit: Unit) -> None:
        """
        * Inject default values to simulation

        * Instantiate IOs for every process
        """
        # set initial value to all signals and propagate it
        for s in unit._ctx.signals:
            if s.defVal.vldMask:
                v = s.defVal.clone()
                s.simUpdateVal(self, mkUpdater(v, False))

        for u in unit._units:
            self._initUnitSignals(u)

        for p in unit._processes:
            self._addHdlProcToRun(None, p)

        for p, outputs in unit._outputs.items():
            # name has to be explicit because it may be possible that signal
            # with has this name was replaced by signal from parent/child
            containerNames = list(map(lambda x: x[0], outputs))

            class SpecificIoContainer(IoContainer):
                __slots__ = containerNames

            self._outputContainers[p] = SpecificIoContainer(outputs)
def _initUnitSignals(self, unit: Unit) -> None:
        """
        * Inject default values to simulation

        * Instantiate IOs for every process
        """
        # set initial value to all signals and propagate it
        for s in unit._ctx.signals:
            if s.defVal.vldMask:
                v = s.defVal.clone()
                s.simUpdateVal(self, mkUpdater(v, False))

        for u in unit._units:
            self._initUnitSignals(u)

        for p in unit._processes:
            self._addHdlProcToRun(None, p)

        for p, outputs in unit._outputs.items():
            # name has to be explicit because it may be possible that signal
            # with has this name was replaced by signal from parent/child
            containerNames = list(map(lambda x: x[0], outputs))

            class SpecificIoContainer(IoContainer):
                __slots__ = containerNames

            self._outputContainers[p] = SpecificIoContainer(outputs)
def _initUnitSignals ( self , unit : Unit ) -> None : # set initial value to all signals and propagate it for s in unit . _ctx . signals : if s . defVal . vldMask : v = s . defVal . clone ( ) s . simUpdateVal ( self , mkUpdater ( v , False ) ) for u in unit . _units : self . _initUnitSignals ( u ) for p in unit . _processes : self . _addHdlProcToRun ( None , p ) for p , outputs in unit . _outputs . items ( ) : # name has to be explicit because it may be possible that signal # with has this name was replaced by signal from parent/child containerNames = list ( map ( lambda x : x [ 0 ] , outputs ) ) class SpecificIoContainer ( IoContainer ) : __slots__ = containerNames self . _outputContainers [ p ] = SpecificIoContainer ( outputs )
* Inject default values to simulation

        * Instantiate IOs for every process
* Inject default values to simulation