We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Yes, it does!
yes???????what???
You only asked one question - so I answered it!
I even put that question into the title of my reply!
But, to make it really clear for you:
The answer to your question, "the design of the simulator conseider this?" is, "Yes, it does"
your mean "the same instructions execute different time if the muc type different in device setting
the simulator execute time is the same with the true derive
if select mcu is different, then the same code in simulator run different time.or same time ?
Your question was: "Does design of the simulator consider the different instruction timings in different 8051 cores?"
My answer is: "Yes, the design of the simulator does consider the different instruction timings in different 8051 cores."
All clear now?
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?