12.07.2015 Views

Rabbit 2000™ Microprocessor - UTN

Rabbit 2000™ Microprocessor - UTN

Rabbit 2000™ Microprocessor - UTN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix B.Wait State BugB.1 Overview of the BugA bug associated with the use of memory wait states was discovered in the <strong>Rabbit</strong> 2000 processorapproximately 13 months after the product was introduced. This bug was not discovered previouslybecause the use of wait states in situations that evoke the problem is unusual. A number ofmodifications to Dynamic C starting with version 7.05 have been made to make it easy, or in somecases automatic, to avoid problems created by the bug. The bug manifests when memory waitstates are used during certain instruction fetches or during certain read operations. The data readinstructions are the simpler case and we will describe them first.Wait states for I/O devices work normally and are not associated with this problem.B.2 Wait States In Data MemoryThe two instructions LDDR and LDIR are repeating instructions that move a block of data in memory.If wait states are enabled, then one wait state less than specified is used on every data readexcept the first one in the block. This can be corrected in either of two ways.An additional wait state can be specified, which will cause there to still be sufficient wait stateswhen one is lost, or a directive can be issued to the Dynamic C compiler to automatically substitutedifferent instructions for LDDR or LDIR which accomplish the same operation.The directive is:#pragma DATAWAITSUSED on#pragma DATAWAITSUSED offThis will cause Dynamic C to substitute code as follows:ldirbecomescall ldir_funcandlddrbecomescall lddr_funcThis change causes the block move to proceed at 11 clock cycles per byte (on average) rather than7 clock cycles per byte.For small memory blocks (

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!