How to use the pisa.PisaSemantics.PisaSemantics function in pisa

To help you get started, we’ve selected a few pisa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cornell-brg / pymtl / pisa / PisaSemantics.py View on Github external
def execute_mfc0( s, inst ):

    # CP0 register: mngr2proc
    if inst.rd == 1:
      bits = s.mngr2proc_queue.popleft()
      s.mngr2proc_str = str(bits)
      s.R[inst.rt] = bits

    # CPO register: coreid
    elif inst.rd == 17:
      s.R[inst.rt] = 0

    else:
      raise PisaSemantics.IllegalInstruction(
        "Unrecognized CPO register ({}) for mfc0 at PC={}" \
          .format(inst.rd.uint(),s.PC) )

    s.PC += 4