cancel
Showing results for 
Search instead for 
Did you mean: 

Software simulator.

colin239955_st
Associate II
Posted on August 02, 2011 at 19:30

I'm trying to us the software simulator to simulate the 207S6 but the internal registers don't seem to be working correctly. The reset value are all ff's. The ADC doesn't seem to function as well as the timers anyone have any idea if I need to set something in the STVD?

I was also trying to use a stimulus file but I keep getting an error that the pin is not assigned correctly. Can I use the assignment I'm using my code?
3 REPLIES 3
fggnrc2
Associate II
Posted on August 03, 2011 at 07:22

The reply to your question lies in the STVD release notes where you can find all STVD simulator limitations.

STVD simulator works fine for ST7 devices and peripherals.

It's almost useless for STM8 devices because of the same issues you are asking this forum.

As regards stimulus file format, it's simple as you can see from this example:

PIN PA1 -i 0 0

PIN PA2 -a 1.492 0

PIN PA4 -a 1.425 0

PIN PA5 -a 1.522 0

PIN PA1 -i 1 80000

PIN PA1 -i 0 80032

PIN PA1 -i 1 88000

The first line tells that PA1 is equal to digital value 0 at t = 0.

The second line tells that PA2 is equal to 1.492 V at t=0.

The last three show how PA1 changes 5 ms after the simulation start.

It's one at t = 5.000 ms, it becomes zero at t = 5.002 ms and it returns to one at t = 5.500 ms.

The number at the end of each row is equal to the clock cycles (16 MHz in my example) when a transition happens.

EtaPhi

colin239955_st
Associate II
Posted on August 03, 2011 at 11:36

Thanks, found the release doc and yes no support for the STM8.

Spent as few hours trying to get this working. ST still haven't got back after 2 Weeks.

I still get non-existant pin errors even though my software finds the pins.

I dont see any single pin defs in the header file, probably need to define each pin address.

fggnrc2
Associate II
Posted on August 03, 2011 at 13:12

Excuse me, I misunderstood your question.

My example shows a stimuli file content, which has a '.in' extension and can be loaded after STVD simulator has been started.

There is no header file because STVD simulator knows which device is running.

The STVD simulator can also load an EEPROM (or RAM) image from a ''.s19'' file.

You have however to be carefull when you debug a project, because input stimulation and memory initialization have to be done whenever you start the STVD simulator to have the same debug behaviour.