Summary
|
Implementing a micro-code that execute the same steps three times (LOOP command) and then HALT for GC5050, GX5050 or GT2550 boards.
|
|
|
Login to rate article
|
|
|
|
Solution:
The following table shows the control memory content in order to create the sequence of loop three times and then Halt.
Note: All 32 channels direction are set to OUT, i.e. bits 28-31 are low.
When writing commands to the control memory all commands need to be spread on four consecutive steps.
Step # | Control Memory value |
---|
0 | 0x00000002 | 1 | 0x00000002 | 2 | 0x00000002 | 3 | 0x00000002 | 4 | 0x00000000 | 5 | 0x00000000 | 6 | 0x00000000 | 7 | 0x00000004 | 8 | 0x00000004 | 9 | 0x00000004 | 10 | 0x00000004 | 11 | 0x00000000 | 12 | 0x000E0000 | 13 | 0x000E0000 | 14 | 0x000E0000 | 15 | 0x01CE0000 | |
Steps 0-3: Command Sets register A equal to 2 with no conditions in order to loop a total of 3 times we set register A to 2. The first three steps (0 through 2) hold the Register value (bits 0 through 15). The fourth consecutive step (3) has the register number (bits 20-21) ORed with the Loop address value.
Steps 4-6: Command No Operation
Steps 7-11: Command: Loop on A. Loop steps 4 through 10 the number of times register A is set to. The first three steps (7 through 9) hold the Loop address value (bits 0 through 16 for a total of 128K). The fourth consecutive step (10) holds the Operation Code (bits 22 through 24) ORed with the Loop address value.
Step 11: Command No Operation
Steps 7-11: Command: Halt. The first three steps (12 through 14) hold the Halt command condition value (bits 17-19). The fourth consecutive step (15) holds the Operation Code, bits 22 through 24 ORed with Halt command condition value.
Loop command flow chart:
Note: The value of register A at the end of a Loop command is 65535 (0xFFFF).
|
|
Article Date
|
4/17/2003
|
Keywords
|
GC5050, GX5050, GT2550, LOOP command, micro-code, control memory
|
|
|
|
|