Digital Signal Processing Reference
In-Depth Information
If (R 4 == 0 ) jump R 5
If (R 4 > 0 ) jump R 5
Call subroutine R 5 and return support
R 1 to R 5 are 8-bit registers. A branch address or subroutine address can be written in R 5 using a load
instruction. As given in the instruction set, jump and subroutine instructions are developed to use the
contents of R 5 as address of the next instruction. The conditions are based on the content of R 4 . Draw
the RTL diagramof the datapath andmicro-programmed state machine. Show all the control signals.
Specify the instruction format and size. The datapath should be optimal using only one carry
propagate adder (CPA) by appropriately using a compression block to compress the number of
operands to two.
Exercise 10.8
Design a micro-coded state-machine based design, with the following features.
1. There are three register files, P, Q and R. Each register file has four 8-bit registers.
2. There is an adder and logic unit to perform addition, subtraction, AND, OR and XOR operations.
3. There is 264 deep micro-code memory.
4. The state machine supports the following instructions:
(a) Load constant into ith register of P or Q:
P i ¼ const
Q i ¼
const
(b) Perform any arithmetic or logic operation given in (2) on operands in register files P and Q,
and store the result in register file R:
R i ¼ P j op Q k
(c) Unconditional branch to any address LABEL in microcode memory:
goto LABEL
(d) Subroutine call support, where subroutine is stored at address LABEL:
call subroutine LABEL
return
(e) Support repeat instruction, for repeating a block of code COUNT times:
repeat (COUNT) LABEL
LABEL is the address of the last instruction in the loop.
Exercise 10.9
Design a micro-programmed state machine to support 4-deep nested loops and conditional jump
instructions with the requirements given in (1) and (2), respectively. Draw an RTL diagram clearly
specifying sizes of instruction register, multiplexers, comparators, micro-PC register, and all other
registers in your design.
1. The loop machine should support conditional loop instructions of the format:
if (COND i) repeat END_LABEL COUNT
The micro-code checks COND i ¼ 0,1,2,3 and, if it is TRUE, the state machine repeats
COUNT times a block of instructions starting from the next instruction to the instruction labeled
with END_LABEL. Assume the size of PM is 256 words and a 6-bit counter that stores the
Search WWH ::




Custom Search