How to use the pisa.PisaSemantics.PisaSemantics.IllegalInstruction 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
# CP0 register: status
    if inst.rd == 1:
      s.status = s.R[inst.rt]

    # CP0 register: proc2mngr
    elif inst.rd == 2:
      bits = s.R[inst.rt]
      s.proc2mngr_str = str(bits)
      s.proc2mngr_queue.append( bits )

    # CPO register: stats_en
    elif inst.rd == 10:
      s.stats_en = bool(s.R[inst.rt])

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

    s.PC += 4