110 likes | 543 Views
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Examples. Barrel Shifter. Design examples using combinational building blocks (decoders, encoders, multiplexers, comparators, three-state devices, adders). Barrel shifter Dual-priority encoder
E N D
ECE 3110: Introduction to Digital SystemsChapter 6Combinational Logic Design Examples Barrel Shifter
Design examples using combinational building blocks (decoders, encoders, multiplexers, comparators, three-state devices, adders). • Barrel shifter • Dual-priority encoder • Cascading comparators, mode-dependent comparator
Barrel shifter design example • n data inputs, n data outputs • Control inputs specify number of positions to rotate or shift data inputs • Example: n = 16 • DIN[15:0], DOUT[15:0], S[3:0] (shift amount) • Many possible solutions, all based on multiplexers
Multiplexers (mux) Eg. Put between Processor’s registers and ALU A 16-bit processor where 3-bit field specifies on of 8 registers. The 3-bit field is connected to the select inputs of an 8-input, 16-bit mux. Select one of n sources of data to transmit on a bus.
16 16-to-1 muxes 16-to-1 mux = 2 x 74x151 8-to-1 mux + NAND gate
16 74x157 2-input, 4-bit muxes Each 2-input, 16-bit mux = 4 x 74x157
1 0 0 1 0 1
Next… • Special purpose Encoders • Speical purpose Comparators • Reading Wakerly CH-6.1-6.2