Page 1
Combinational Logic and
Verilog
Page 2
Programmable Array Logic
PAL
Page 3
Example of PAL. GAL16V8C
Page 4
Figure 6-26. PAL16L8
PALs 1. SOP
2. Multi-level
3. Flip-flops
4. 10 Inputs
5. 8 Inputs/output
Page 5
Figure 6-28. General CPLD architecture
Complex PLD
Page 6
4*3 PLA in CMOS logic
Page 7
AND plane of EEPLD using floating-gate MOS transistors
EEPLDs•Floating gate
•Non-floating gate
Page 9
General Structure of a Decoder circuit
Page 10
Example 1: Truth table for a 2-to-4 binary decoder.
Example of a decoder circuit
enable
Page 11
2-to-4 decoder inside
enable
Page 12
Verilog for 2-to-4 decoder
Structural type of description in Verilog
Page 13
Example 2:Position encoding for a 3-bit mechanical encoding disk
Page 14
Example 2 continued: Using a 3-to-8 decoder to decode a Gray code.
Page 15
Example 3:74x138 3-to-8
decoder
Page 16
Example 3: 74x138 3-to-8 decoder
Page 17
Example 3 cont: 74X138 3-to-8 decoder
Page 18
Verilog code for 3-to-8 decoder
15..7
Page 19
Verilog for 3-to-8 decoder
A[2]
A[1]
A[0]
Y_L[0]
Y_L[1]
Y_L[2]
Y_L[3]
Y_L[4]
Y_L[5]
Y_L[7]
Page 20
74X138 Decoder:
Active level handling
Page 21
74x138 like decoder with Active level handling
Page 22
Active high 3-to-8 decoder
Page 23
Behavioral Verilog for 3-to-8 decoder
Page 24
Example 3 cont: 74x138 3-to-8 decoder
Default signal names
Page 25
Example 3 cont: Symbols for 74x138
Incorrect because of double negations
Page 26
Example 3 cont: 5-to-32 decoder from 74X138 chips
Global enable goes to inputs G1 and G2A
Chip select goes to input G2B
Page 27
Example 3 cont: 4-to-16 decoder using 74X138
N3
Page 28
Example 3 cont: 74x138 decoder using GAL
74x138 decoder can be built in single GAL 16V8 chip
Page 29
Figure 6-41. 74x138-like decoder
Page 30
Example: Customized decoder function
Page 31
Customized decoder circuit Using 74X138
Page 32
Seven Segment Display and
Decoder
Page 33
Seven Segment Display
Page 34
Seven Segment Decoder
Page 35
EncodersWe already used encoders to design control logic for data path blocks
Page 36
Encoders2n requests
Page 37
Priority Encoders
Page 38
Encoders
Any subset if 2n
requests
Number n of prioritized request
Page 40
8-input Priority Encoder
enable
Page 41
15-input Priority Encoder in PLD
outputsinputs
Page 42
Priority Encoder – handle 32 requests
Page 43
8-input Priority Encoder
Page 44
Three stateBuffers
Page 45
Various three-state buffers
Page 46
Eight sources sharing a three-state party line
Use of three-state buffers
Page 47
Timing diagram for the three-state party line
Page 48
74x541 Octal three-state buffer
Page 49
Three-State buffers in
microprocessors
Page 50
74x541 as a microprocessor input port.
Page 51
Verilog module for a 74x540-like 8-bit three-state driver
Page 52
74x245 octal three-state transceiver
Page 53
Verilog module for a 74x245-like 8-bit transceiver
Page 54
Bidirectional buses and transceiver operation
Page 55
Bus selection codes for a four-way bus transceiver
Page 56
PLD inputs and outputs for a four-way, 2-bit bus transceiver
Page 57
Verilog module for a four-way, 2-bit bus transceiver
Page 59
Multiplexer structure
Page 60
74x151 8-input, 1-bit mux
Page 61
74x151 8-input, 1-bit mux
Page 62
Combining 74x151s to make a 32-to-1 multiplexer
Decoding and enabling
Page 63
74x157 2-input 4-bit mux
Page 64
GAL16V8 used as a 74x157 multiplexer
2 inputs, each 4 bits
Page 65
Buffers to handle large fanout
Page 66
A mux driving a bus and a demux receiving the bus
Page 67
Decoders as demultiplexers
Page 68
3-to-8 binary decoder as a demultiplexer
Page 69
GALs as multiplexers
Page 70
Function table for a SPECIALIZED 4-input, 18-bit
mux.
Page 71
Behavioral Verilog for a specialized 4-input 18-bit mux
Page 72
Dataflow Verilog for a 4-input, 8-bit mux
Page 73
Behavioral Verilog for a 4-input, 8-bit mux.