Delta Tau GEO BRICK LV Reference Manual

Page of 760
Turbo PMAC/PMAC2 Software Reference
 
Turbo PMAC Global I-Variables 
 55 
I37 
Additional Wait States 
Range:   
$000000 - $032403  
Units:   
Instruction cycle wait states (by bit) 
Default: 
$000000 
I37 controls the number of wait states added to the factory default values when the Turbo PMAC 
processor accesses external memory or memory-mapped I/O devices.  Wait states are the number of 
instruction cycles the processor idles when reading from or writing to a register of memory or I/O.  On 
power-up/reset, Turbo PMAC sets the number of wait states automatically based on the programmed 
CPU frequency as set by I52.  Under certain circumstances, particularly in accessing third-party devices, 
more robust operation may be obtained by increasing the number of wait states from the factory default 
values (at the cost of slightly slower operation). 
I37 is divided into four parts, each controlling the wait states for a different area of the memory and I/O 
map.  Bits 0 and 1 control the number of added wait states for I/O devices (such as ASICs and A/D 
converters; dual-ported RAM also counts as an I/O device) mapped into Y-registers.  Bits 16 and 17 
control the number of added wait states for I/O devices mapped into X-registers.  With two bits each, up 
to three wait states can be added to these accesses; generally, these are both set to the same value. 
Bit 10 of I37 controls the number of added wait states for P (program, or machine-code) memory register 
access.  Bit 13 controls the number of added wait states for X and Y (data) memory register access.  As 
single-bit values, they can add only one wait state to these memory accesses.  Generally, these are both 
set to the same value. 
I37 is used at power-up/reset only, so to change the number of I/O wait states, change the value of I37, 
issue a SAVE command, and reset the Turbo PMAC.  At power-up/reset, Turbo PMAC automatically 
adds the value of I37 to the value from its internal look-up table to set the number of I/O wait states.  The 
resulting number of wait states for different areas of the memory and I/O map is in internal CPU register 
X:$FFFFFB. 
Examples: 
I37=$020002 
; Add 2 wait states to X and Y I/O access. 
I37=$002400 
; Add 1 wait state to X/Y and P memory access 
I37=$032403 
; Add 3 wait states for I/O, 1 for memory 
I38 
In-Line CALL Enable 
 
Range:   
0 – 1 
 
Units:   
none 
 
Default: 
I38 controls the timing of the execution of a CALL command that follows motion commands on the same 
program line.  Normally, as soon as the program counter jumps to a new program line, as it does on a 
subprogram call, program calculations are suspended until the start of execution of a new move. 
If I38 is set to 1, the jump to the subprogram does not cause suspension of program calculation.  This 
permits some further calculations to be completed immediately following the calculation of programmed 
motion.  Setting I38 to 1 permits the proper use of a CREAD (coordinate read) command in a called 
subroutine to store the just-computed axis move endpoints with synchronous M-variable assignments, so 
that they are easily available when the move is actually being executed, facilitating calculation of data 
such as “distance to go”. 
All calculations to be completed immediately following the calculation of programmed motion must be 
on the first line of the subroutine.  A jump to a new line in the subroutine will suspend motion program 
calculations.