CACHE AND ON-CHIP DATA RAM
4-3
4
The branch-and-link (
bal
and
balx
) instructions do not cause the local registers to be stored.
The entire internal register cache contents can be copied to the external procedure stack through the
flushreg
instruction.
Section 6.2.30, flushreg (pg. 6-54)
explains the instruction and
section 7.2,
“MODIFYING THE PFP REGISTER” (pg. 7-11)
offers a practical example when
flushreg
must be
used.
To decrease interrupt latency, software can reserve a number of frames in the local register cache
solely for high priority interrupts (interrupted state and process priority greater than or equal to 28).
The remaining frames in the cache can be used by all code, including high-priority interrupts.
When a frame is reserved for high-priority interrupts, the local registers of the code interrupted by
a high-priority interrupt can be saved to the local register cache without causing a frame flush to
memory, providing the local register cache is not already full. Thus, the register allocation for the
implicit interrupt call does not incur the latency of a frame flush.
Software can reserve frames for high-priority interrupt code by writing bits 10 through 8 of the
register cache configuration word in the PRCB. This value indicates the number of free frames
within the register cache that can be used by high-priority interrupts only. Any attempt by
non-critical code to reduce the number of free frames below this value results in a frame flush to
external memory. The free frame check is performed only when a frame is pushed, which occurs
only for an implicit or explicit call. The following pseudo-code illustrates the operation of the
register cache when a frame is pushed:
The valid range for the number of reserved free frames is 0 to 7. Setting the value to 0 reserves no
frames for exclusive use by high-priority interrupts. Setting the value to 1 reserves 1 frame for
high-priority interrupts and 6 frames to be shared by all code. Setting the value to 7 causes the register
cache to become disabled for non-critical code. When the number of reserved high-priority frames
exceeds the allocated size of the register cache, the entire cache is reserved for high-priority interrupts.
In that case, all low-priority interrupts and procedure calls cause frame spills to external memory.
Example 4-1. Register Cache Operation
frames_for_non_critical = 7- RCW[10:8];
if (interrupt_request)
set_interrupt_handler_PC;
push_frame;
number_of_frames = number_of_ 1;
if (number_of_frames = 8) {
flush_register_frame(oldest_frame);
number_of_frames = number_of_frames - 1; }
else if ( number_of_frames = (frames_for_non_cr 1) &&
(PC.priority < 28 || PC.state != interrupted) ) {
flush_register_frame(oldest_frame);
number_of_frames = number_of_frames - 1; }
Содержание i960 Jx
Страница 1: ...Release Date December 1997 Order Number 272483 002 i960 Jx Microprocessor Developer s Manual ...
Страница 24: ......
Страница 25: ...1 INTRODUCTION ...
Страница 26: ......
Страница 35: ...2 DATA TYPES AND MEMORY ADDRESSING MODES ...
Страница 36: ......
Страница 46: ......
Страница 47: ...3 PROGRAMMING ENVIRONMENT ...
Страница 48: ......
Страница 73: ...4 CACHE AND ON CHIP DATA RAM ...
Страница 74: ......
Страница 85: ...5 INSTRUCTION SET OVERVIEW ...
Страница 86: ......
Страница 111: ...6 INSTRUCTION SET REFERENCE ...
Страница 112: ......
Страница 195: ...INSTRUCTION SET REFERENCE 6 83 6 Opcode mov 5CCH REG movl 5DCH REG movt 5ECH REG movq 5FCH REG See Also LOAD STORE lda ...
Страница 233: ...7 PROCEDURE CALLS ...
Страница 234: ......
Страница 256: ......
Страница 257: ...8 FAULTS ...
Страница 258: ......
Страница 291: ...9 TRACING AND DEBUGGING ...
Страница 292: ......
Страница 309: ...10 TIMERS ...
Страница 310: ......
Страница 324: ......
Страница 325: ...11 INTERRUPTS ...
Страница 326: ......
Страница 369: ...12 INITIALIZATION AND SYSTEM REQUIREMENTS ...
Страница 370: ......
Страница 412: ......
Страница 413: ...13 MEMORY CONFIGURATION ...
Страница 414: ......
Страница 429: ...14 EXTERNAL BUS ...
Страница 430: ......
Страница 468: ......
Страница 469: ...15 TEST FEATURES ...
Страница 470: ......
Страница 493: ...A CONSIDERATIONS FOR WRITING PORTABLE CODE ...
Страница 494: ......
Страница 502: ......
Страница 503: ...B OPCODES AND EXECUTION TIMES ...
Страница 504: ......
Страница 515: ...C MACHINE LEVEL INSTRUCTION FORMATS ...
Страница 516: ......
Страница 523: ...D REGISTER AND DATA STRUCTURES ...
Страница 524: ......
Страница 550: ......
Страница 551: ...GLOSSARY ...
Страница 552: ......
Страница 561: ...INDEX ...
Страница 562: ......
Страница 578: ......