Skip to main content

Simulate clock source when running on trace32 tc399 simulator without board - Community / Debugging - Lauterbach Support

0

Simulate clock source when running on trace32 tc399 simulator without board

Hello all,

I want to simulate running erikaOS on Trace32 simulator for tricore.

I wrote a config file and an cmm file and it seems to run correctly but without clock (no board thus no oscillator)

Iv'e read that I can try to use the trace32 VCO and config my clock to sync with the VCO and then use its internal clock.

1. Does the internal clock work in simulator?

2. How can I configure the VCO in tc399?

3. Is there another way?

Comments (5)

Khaled Jmal
Hello, VCO only affects the trace timestamps in the simulator. To simulate the clock, you can use a peripheral simulation model. An STM example can be found in the TRACE32 installation directory under demo\tricore\simulator\stm_aurix More information under simulator_api.pdf
Ofer Orgal
Hello Khaled, Thank you for your reply. I'm looking at the demo\tricore\simulator\stm_aurix and the pdf file and i'm trying to understand how can I integrate this into my project. Should I replace my clock_init with SIMUL_Interface or SIMUL_Init? what do I use for processor? Its not clear how to use the example. Any clarification would be great.
Houcem Dammak
Hello Ofer, The simulator API functions are not to be integrated into your application code (erikaOS). The peripheral simulation model is an additional software layer to be loaded into the TRACE32 instruction set simulator to mimic the behavior of a certain chip peripheral. For better understanding of the concept, please take a look at the "Overview" paragraph from simulator_api.pdf The demo script ~~\demo\tricore\simulator\stm_aurix\demo_stm_tc3xx.cmm shows how to load a simulation model for STM timers (see SIM.LOAD command). The source code of the simulation model is available in the src folder: ~~\demo\tricore\simulator\stm_aurix\src The model entry point is the function SIMUL_Init in stm_aurix.c
Ofer Orgal
Thank you for your help. I got it working. How can I control the frequency of the ticks? Using: SIMUL_SetClockFrequency or SIMUL_SetClockCycle doesn't really change anything. All the best, Ofer.
Houcem Dammak
Hello Ofer, In the provided example, the mode "SIMUL_TIMER_CLOCKS" is used. This means that the clock is increased with each step of the simulator. Then the VCO command is used to set the simulated clock. e.g. VCO.Frequency 300.MHz

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image