Download DSTni User Guide
Transcript
Random Number Generator Register The Random Number Generator register provides a random number for use in the TCPIP or MAC as an address. The random-number generator is a counter running at the current CPU clock frequency and continuously updates on each clock. The data read is a 16-bit data field. Writes to this register are to bits [1] and [0]. Writes to this register control which type number is returned. The random numbers are not affected by these writes. The linear version of the random number can also be used to indicate the number of clocks that have passed for timing some code execution. The linear number consists of two 16-bit registers, with RS=1 being the most-significant 16 bits. Table 3-13. Random Number Generator Register BIT OFFSET 15 14 13 12 11 10 8 7 6 5 4 3 2 1 0 RS LI 0 R W 0 R W 6Ah FIELD RESET RW 9 Don’t Care 0 R 0 R 0 R 0 R 0 R 0 R 0 R DATA[15:0] 0 0 R R 0 R 0 R 0 R 0 R 0 R Table 3-14. Random Number Generator Register Definitions Bits Field Name 15:2 1 /// RS 0 LI 15:0 DATA[15:0] Description Don’t Care Register Select 0 = register 0. 1 = register 1. Only used in Linear Number mode. See Table 3-15. Linear 0 = selects Pseudo Random number in a 16-bit register. 1 = selects Linear numbers in a 32-register. See Table 3-15. Random Number Generator Data A counter running at the current CPU clock frequency that continuously updates on each clock. Table 3-15. RS/LI Combinations RS LI 0 0 1 1 0 1 0 1 Description Pseudo Random Number (16 bits) Linear Clock Counter (lower 16 bits) Reserved Linear Clock Counter (Upper 16 bits) 38