1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
load s pulse_measure.cod
# Stimulus file for testing 3-tcyc resolution
# pulse measurements.
echo Stimulus file for 3-tcyc pulse measurements
# Define a node to which the pins can attach.
node test_node
# Create an asynchronous stimulus that's 0x10000 cycles long
# and attach it to portb bit 0.
stimulus asynchronous_stimulus # or we could've used asy
# The initial state AND the state the stimulus is when
# it rolls over
initial_state 1
# all times are with respect to the cpu's cycle counter
start_cycle 0x100
# the asynchronous stimulus will roll over in 'period'
# cycles. Delete this line if you don't want a roll over.
period 0x100
# Indicate that this is digital data (default):
digital
# Now the cycles at which stimulus changes states are
# specified. The initial cycle was specified above.
{ 0x40 0
0x80 1
}
# Give the stimulus a name:
name asy1
# Finally, tell the command line interface that we're done
# with the stimulus
end
# Attach the stimulus to the IO port
attach test_node asy1 portb0
# Show all of the stimuli:
stimulus
echo stimulus created
# set an excution break at address 0
break e 0
# run
# x
|