the origin 8051 is 12 clock cycles a machine cycles.
but my mcu is slilab.
most instructions execute in the same number of clock cycles as there are program bytes in the instruction
the design of the simulator conseider this ?
i think not.
why do you care? The simulator does not run real time anyhow.
Erik
True (but see below); but it does accurately report the number of cycles consumed - and, if you have correctly configured the clock frequency setting, it will convert this to the corresponding time value.
I think there is (now) an option to restrict certain things to "real time"...?
Knowing the number of cycles can be useful when calculating small software delays - In assembler of course ;)
in my project, configured the clock frequency setting same with device
but, timer period is not correct
If you keep making vague statements like that, how can you expect to get precise answers?!
What "timer" are you talking about?
In what way, precisely, is the period "incorrect"?
Note that the Hardware Timers have nothing to do with instruction execution cycle times!
My question is to ask for instruction execute cycle is to follow the hardware setting
I was used to Calculation delay
Simulator shows the execution time, is equal to the actual hardware execution time????
"My question is to ask for instruction execute cycle is to follow the hardware setting"
No, the Keil simulator is not a "real-time" simulator.
If you need a "real-time" simulator, then you will need to buy one from somewhere else - and it will probably be significantly more expensive!
A cheaper alternative may be to use a chip with on-board debug; so that you don't simulate at all - you run in the actual target!
In my project, the same simulator and real device。
Even if I modify the oscillator frequency and device, corresponding changes in the length of delay time。
my mcu is Cygnal C8051F330
Again, the simulator does not work in real-time - it simply counts cycles.
You can not simulate the real timing using the Keil simulator - that is not what it does, and it does not claim to do it!
"my mcu is Cygnal C8051F330"
That has on-chip debug.
to get reliable timing is to set a port pin on the way in and clear it on the way out and then scope on it.
A simulator can get the timing for a pass through a routine but can never show you the jitter occurring from other events or different states of variables.
Since you are using SILabs (i.e. free emulation) why on earth are you even fiddeling with the error prone simulation?
"A simulator can never show you the jitter occurring from other events or different states of variables."
Yes, it can; but the Keil simulator will show you in terms of cycles - it will not actually run in real time.
what about interrupts?
Can be simulated.
Some from simulated timers etc.
Some from simulated external hardware.
Some from mapping the serial ports to debugger or real live serial ports.
Thank for all
As my poor English ,I can not make it clear.
But in my project, simulator is the same with chip, maybe as my chip's machine cycle is same with pulse cycle (instead of the traditional 12-pulse one machine cycle)
Problems end, once again thank all