Chapter 14: Using Jam STAPL for ISP via an Embedded Processor
14–13
Software Development
1
The memory requirements for the stack and heap are negligible, with respect to the
total amount of memory used by the Jam STAPL Byte-Code Player. The maximum
depth of the stack is set by the JBI_STACK_SIZEparameter in the jbimain.c file.
Estimating Memory Example
The following example uses a 16-bit Motorola 68000 processor to program an
EPM7128AE device and an EPM7064AE device in an IEEE Std. 1149.1 JTAG chain via
a JBC file that uses compressed data. To determine memory usage, first determine the
amount of ROM required and then estimate the RAM usage. Use the following steps
to calculate the amount of DRAM required by the Jam Byte-Code Player:
1. Determine the JBC file size. Use the following multi-device equation to estimate
the JBC file size. Because JBC files use compressed data, use the compressed data
file size information, listed in Table 14–3, to determine Data size.where:
Equation 14–5.
N
JBC File Size = Alg +
Data
∑
k = 1
Notes to Equation 14–5:
(1) Alg =21 Kbytes.
(2) Data =EPM7064AE Data + EPM7128AE Data = 8 + 4 = 12 Kbytes.
Thus, the JBC file size equals 33 Kbytes.
2. Estimate the JBC Player size. This example uses a JBC Player size of
62 Kbytes because this 68000 is a 16-bit processor. Use the following equation to
determine the amount of ROM needed:
Equation 14–6.
ROM Size = JBC File Size + Jam Player Size
ROM Size = 95 Kbytes
3. Estimate the RAM usage with the following equation:
Equation 14–7.
N
RAM Size = 33 Kbytes +
Data (Uncompressed Data Size)k
∑
k = 1
Because the JBC file uses compressed data, the uncompressed data size for each
device must be summed to find the total amount of RAM used. The
Uncompressed Data Size constants are as follows:
■
EPM7064AE = 8 Kbytes
EPM7128AE = 12 Kbytes
■
© October 2008 Altera Corporation
MAX II Device Handbook