Skip to content

Conversation

@sergev
Copy link

@sergev sergev commented Jan 25, 2015

This pull request consists of eight commits to be applied in series.

(1) This change adds a new feature: option "-d instr". It enables printing of all executed MIPS instructions to log file. It also prints the modified cpu registers, TLB entries and memory load/store transactions. The information is printed in the following format:

bfc00070: 3c088000      lui     t0,0x8000
    Write t0 = 80000000
bfc00074: 25080644      addiu   t0,t0,1604
    Write t0 = 80000644
bfc00078: 3c098000      lui     t1,0x8000
    Write t1 = 80000000
bfc0007c: 25290680      addiu   t1,t1,1664
    Write t1 = 80000680
bfc00080: 10000006      b       bfc0009c
bfc00084: 00000000      nop
bfc0009c: 0109082b      sltu    at,t0,t1
    Write at = 00000001
bfc000a0: 1420fff9      bnez    at,bfc00088
bfc000a4: 00000000      nop
bfc00088: ad000000      sw      zero,0(t0)
    Memory Write [80000644] = 00000000

(2) Make the CPU clock frequency configurable per platform. Currently the clock rate for all MIPS platforms is fixed at 100MHz. Need to make it 40MHz for pic32mx7.

(3) When WAIT instruction is executed with interrupts disabled, the processor is essentially suspended forever. Terminate the simulation in this case.

(4) For TLBWR instruction, the generated random index value has been not quite random and did not take into account the Wired register value. Fixed.

(5) Added support for external interrupt controller mode (EIC). Required for pic32.

(6) Added two processor variants: M4K and microAptivUP. Needed for pic32mx and pic32mz simulation.

(7) Added two machine platforms: Microchip pic32mx7 and pic32mz microcontrollers. Several board types supported for each platform:

pic32mx7-explorer16  PIC32MX7 microcontroller on Microchip Explorer-16 board
pic32mx7-max32       PIC32MX7 microcontroller on chipKIT Max32 board
pic32mx7-maximite    PIC32MX7 microcontroller on Geoff's Maximite board
pic32mz-explorer16   PIC32MZ microcontroller on Microchip Explorer-16 board
pic32mz-meb2         PIC32MZ microcontroller on Microchip MEB-II board
pic32mz-wifire       PIC32MZ microcontroller on chipKIT WiFire board

(8) Ethernet device implemented for pic32mz.

For examples of real pic32 applications running on QEMU, see page: https://github.com/sergev/qemu/wiki

@ConorOG
Copy link

ConorOG commented Feb 16, 2015

(3) Is not correct. There was a specific change in the specification to cover this situation. See CP0 Config7, WII bit.

@sergev
Copy link
Author

sergev commented Feb 17, 2015

Well, none of MIPS cores currently supported by QEMU has Config7.WII bit set, so my change does not break anything. Though I agree that it makes sense to add a condition "! (env->CP0_Config7 & (1 << CP0C7_WII))" to avoid termination of simulate in case WII bit is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants