hwt/simulator/hdlSimulator.py
def _applyValues(self) -> Generator[None, None, None]:
        """
        Perform delta step by writing stacked values to signals
        """
        va = self._valuesToApply
        self._applyValPlaned = False

        # log if there are items to log
        lav = self.config.logApplyingValues
        if va and lav:
            lav(self, va)
        self._valuesToApply = []

        # apply values to signals, values can overwrite each other
        # but each signal should be driven by only one process and
        # it should resolve value collision
        addSp = self._seqProcsToRun.append
        for s, vUpdater, isEventDependent, comesFrom in va:
            if isEventDependent:
                # now=0 and this was process initialization or async reg
                addSp(comesFrom)
            else:
                # regular combinational process
                s.simUpdateVal(self, vUpdater)

        self._runCombProcesses()

        # processes triggered from simUpdateVal can add new values
        if self._valuesToApply and not self._applyValPlaned:
            self._scheduleApplyValues()

        return
        yield
def _applyValues(self) -> Generator[None, None, None]:
        va = self._valuesToApply
        self._applyValPlaned = False

        # log if there are items to log
        lav = self.config.logApplyingValues
        if va and lav:
            lav(self, va)
        self._valuesToApply = []

        # apply values to signals, values can overwrite each other
        # but each signal should be driven by only one process and
        # it should resolve value collision
        addSp = self._seqProcsToRun.append
        for s, vUpdater, isEventDependent, comesFrom in va:
            if isEventDependent:
                # now=0 and this was process initialization or async reg
                addSp(comesFrom)
            else:
                # regular combinational process
                s.simUpdateVal(self, vUpdater)

        self._runCombProcesses()

        # processes triggered from simUpdateVal can add new values
        if self._valuesToApply and not self._applyValPlaned:
            self._scheduleApplyValues()

        return
        yield
def _applyValues ( self ) -> Generator [ None , None , None ] : va = self . _valuesToApply self . _applyValPlaned = False # log if there are items to log lav = self . config . logApplyingValues if va and lav : lav ( self , va ) self . _valuesToApply = [ ] # apply values to signals, values can overwrite each other # but each signal should be driven by only one process and # it should resolve value collision addSp = self . _seqProcsToRun . append for s , vUpdater , isEventDependent , comesFrom in va : if isEventDependent : # now=0 and this was process initialization or async reg addSp ( comesFrom ) else : # regular combinational process s . simUpdateVal ( self , vUpdater ) self . _runCombProcesses ( ) # processes triggered from simUpdateVal can add new values if self . _valuesToApply and not self . _applyValPlaned : self . _scheduleApplyValues ( ) return yield
Perform delta step by writing stacked values to signals
Perform delta step by writing stacked values to signals