Skip to contentSkip to conversation

Qemu query ( support for new board)

Qemu-devel Fahad Butt 2 participants 2 messages Oct 23, 2017

lore
Share & tools
lore

Fahad Butt

author
#0 lore raw

Greetings qemu community,

I am a master student here in germany and currently doing my master thesis. I want to use qemu for emulation and i just have few questions and will be very happy to get thek all answered by you experts:

1- I want to know whether qemu can be cycle accurate or not? from my search i believe it is not cycle accurate. But is it possible? Cycle accuracy? If not. Can you suggest any emulator for a cortex m4 processor based board?

2- I want to emulate my cortex m4 hardware using qemu. But this discovery board isnt directly supported by qemu. What needs to be done to support another cortex m4 discovery board for emulation?

3- is the Floating point unit and the DSP instructions supported by QEMU?

Please try to answer my questions asap. I will be really thankful and it is a big puzzle in my master thesis. Thank you very much.

Best regards,
Fahad masood

#1 lore raw
Quoted 3 lines · Fahad Butt

1- I want to know whether qemu can be cycle accurate or not? from my search i believe it is not cycle accurate. But is it possible? Cycle accuracy?

You're correct that QEMU is not cycle accurate. In general for modern complex CPUs cycle accurate emulation is pretty much impossible (except for approaches involving running the actual RTL of the CPU), because the level of effort required to create a cycle accurate model approaches the level of effort required to create the CPU in the first place (and you need a lot of information about the internals of the CPU which is not known to anybody outside the company which designed that CPU), so it's just impractical. For something simple like the Cortex-M4 it's probably still possible at least in theory, but QEMU certainly doesn't attempt it and I don't offhand know of any emulators that do.

Quoted 3 lines

2- I want to emulate my cortex m4 hardware using qemu. But this discovery board isnt directly supported by qemu. What needs to be done to support another cortex m4 discovery board for emulation?

You would need to write device models to emulate all the relevant devices on the board, the SoC, etc. You should think of this as about the same amount of work as it would be to write device drivers for all those devices -- it's quite a lot of work.

For many cases, it doesn't actually matter what the exact device and board hardware is, and you can use some other board model that QEMU already implements. This does require your guest RTOS/code to have support for that board, though.

Quoted 1 line

3- is the Floating point unit and the DSP instructions supported by QEMU?

We definitely don't currently implement the FPU. I think we do support the DSP instructions.

thanks
-- PMM