GXemul: Components: mips_cpu

# GXemul: Components: `mips_cpu`

Back to the index.

Back to the component index.

## `mips_cpu` component

This component represents a MIPS-like CPU component.

Features that have been implemented:

- Some instruction disassembly.

TODO: Almost everything.

The following example shows, in addition to starting GXemul with a template machine, how to add `mips_cpu` components to the configuration. To add a specific CPU model, e.g. R4400, type `mips_cpu(model=R4400)` instead of just `mips_cpu`.

    $ gxemul -V -e testmips
    GXemul (unknown version)      Copyright (C) 2003-2009  Anders Gavare

      mainbus0
      |-- ram0  (32 MB at offset 0)
      |-- rom0  (16 MB at offset 0x1fc00000)
      \-- cpu0  (5KE, 100 MHz)

    GXemul> add mips_cpu mainbus0
    GXemul> root
      root
      \-- machine0  [testmips]
          \-- mainbus0
              |-- ram0  (32 MB at offset 0)
              |-- rom0  (16 MB at offset 0x1fc00000)
              |-- cpu0  (5KE, 100 MHz)
              \-- cpu1  (5KE, 100 MHz)

      accuracy = cycle
      step     = 0
    GXemul> add mips_cpu(model=R4400) mainbus0
    GXemul> root
      root
      \-- machine0  [testmips]
          \-- mainbus0
              |-- ram0  (32 MB at offset 0)
              |-- rom0  (16 MB at offset 0x1fc00000)
              |-- cpu0  (5KE, 100 MHz)
              |-- cpu1  (5KE, 100 MHz)
              \-- cpu2  (R4400, 100 MHz)

      accuracy = cycle
      step     = 0
    GXemul>

Source code documentation for this component can be found here.