Detailed explanation – Freescale Semiconductor Microcontrollers User Manual

Page 644

Advertising
background image

ColdFire V1 Full Chip Simulation Connection

True Time I/O Stimulation

644

Microcontrollers Debugger Manual

Detailed Explanation

def a = TargetObject.#210.B;

This line of code defines a as byte mapped at address 0x210 in TargetObject.

def x = TargetObject.#212;

This line of code defines x as byte mapped at address 0x212 in TargetObject. Size can be
omitted. .B for byte is default.

def b = TargetObject.#216.W;

This line of code defines b as word (.W) mapped at address 0x216 in TargetObject.

def c = TargetObject.#220.L;

This line of code defines c as long (.L) mapped at address 0x220 in TargetObject.

def pbits = Leds.Port_Register.B[7:3];

This line of code defines pbits as bits 5, 6 and 7 in the byte (.B) register named
Port_Register in LEDs. (You can specify names of target objects when using FCS. In our
example, it is the name of the port register defined by the IO-LED component).

#10000 pbits = 3;

This line of code sets the three bits of LEDs. Port_Register accessed with pbits to binary
011. Other bits are unaffected. The new value of Port_Register is 0x75 if the initial value
was 0x55. Values outside the valid BitRange of pbits are truncated (in this example
only values from 0 to 7 are allowed for pbits). The # means that the time of execution of
the instruction is 10000 cycles after the start of the simulation.

20000 a = 0;

This line of code sets a to 0. Without # or + in front of the time marker, the time refers to
the absolute time after starting execution of the Stimulation file.

NOTE

In a periodical loop, the time marker without operator is interpreted as +.

+20000 b = pbits + 1;

Advertising