Combinatorial Logic Design Practices

Slides:



Advertisements
Similar presentations
컴퓨터구조론 교수 채수환. 교재 Computer Systems Organization & Architecture John D. Carpinelli, 2001, Addison Wesley.
Advertisements

Modular Combinational Logic
Combinational Circuits
Documentation Standards
Functions and Functional Blocks
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Documentation Standards Programmable Logic Devices Decoders
EE365 Adv. Digital Circuit Design Clarkson University Lecture #7 Intro to MSI PLDs and Decoders.
1 Designing with MSI Documentation Standards  Block diagrams first step in hierarchical design  Schematic diagrams  Timing diagrams  Circuit descriptions.
1 EE365 Three-state Outputs Encoders Multiplexers XOR gates.
Chapter 3 Continued Logic Gates Logic Chips Combinational Logic Timing Sequential Logic Flip Flops Registers Memory State Machines.
1 EE 365 Adders Multipliers Read-Only Memories 2 Equality Comparators 1-bit comparator 4-bit comparator EQ_L.
Adders.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #8 Buffers, Drivers, Encoders, MUXs & XORs.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Lecture # 12 University of Tehran
Logic Gates Combinational Circuits
Adders, subtractors, ALUs
Encoders Three-state Outputs Multiplexers XOR gates.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Digital Arithmetic and Arithmetic Circuits
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
Multiplexers XOR gates. Multiplexers A multiplexer is a digital switch - it connects data from one of n sources to its output. An n-input and b-bit multiplexer.
Kuliah Rangkaian Digital Kuliah 6: Blok Pembangun Logika Kombinasional Teknik Komputer Universitas Gunadarma.
1 EE121 John Wakerly Lecture #6 Three-state Outputs Encoders Multiplexers XOR gates.
Chapter
Department of Communication Engineering, NCTU 1 Unit 2 Reviews on Logic Elements.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
Module 1.2 Introduction to Verilog
EE365 Adv. Digital Circuit Design Clarkson University Lecture #9 Math Units ROMs.
EE121 John Wakerly Lecture #6
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 8: Documentation and Timing Diagrams José Nelson Amaral.
Decoders. A decoder is multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs. Input code with fewer bits than the.
1 EE121 John Wakerly Lecture #5 Documentation Standards Programmable Logic Devices Decoders.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices Adders,subtractors, ALUs.
Hardware Description Languages: Verilog
This chapter in the book includes: Objectives Study Guide
Combinational Circuits
ECE 3130 Digital Electronics and Design
Design and Documentation
Combinational Logic Circuits
Hardware Description Languages: Verilog
This chapter in the book includes: Objectives Study Guide
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Decoders.
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
ECE 434 Advanced Digital System L03
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
EEL 3705 / 3705L Digital Logic Design
Basics Combinational Circuits Sequential Circuits
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Chapter 4 Combinational Logic
Behavioral Modeling in Verilog
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
FIGURE 4.1 Block diagram of combinational circuit
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Modeling of Combinational Logic
Programmable Configurations
COE 202: Digital Logic Design Combinational Circuits Part 3
Part I Background and Motivation
Digital System Design Combinational Logic
COMS 361 Computer Organization
Data Flow Description of Combinational-Circuit Building Blocks
Logic Circuits I Lecture 3.
Data Flow Description of Combinational-Circuit Building Blocks
Combinational Circuits
Electronics for Physicists
Arithmetic Circuits.
Presentation transcript:

Combinatorial Logic Design Practices ECGR2181 These are all different interpretations of the same bit string. Reading: Chapter 6 Logic System Design I

Documentation Standards Requirements Block diagrams first step in hierarchical design Schematic diagrams HDL programs (ABEL, Verilog, VHDL) Timing diagrams Circuit descriptions Logic System Design I

Block Diagram Logic System Design I

Flat schematic structure Logic System Design I

Hierarchichal schematic structure Logic System Design I

Other Documentation Timing diagrams Circuit descriptions Output from simulator Specialized timing-diagram drawing tools Circuit descriptions Text (word processing) Can be as big as a book Typically incorporate other elements (block diagrams, timing diagrams, etc.) Logic System Design I

Signal names and active levels Signal names are chosen to be descriptive. Active levels -- HIGH or LOW named condition or action occurs in either the HIGH or the LOW state, according to the active-level designation in the name. Logic System Design I

Example HIGH when error occurs Logic Circuit ERROR OK_L Logic Circuit LOW when error occurs ERROR_L ERROR ERROR1_L Logic System Design I

Logic System Design I

Timing diagram with propagation delay Logic System Design I

Logic System Design I

Example - Requirements You must first identify the requirements of a device before you can design it. Using the requirements to create a timing diagram helps to ensure the requirements are understood. Req. 1: The circuit will have four inputs: A[7:0], B[7:0], choose, valid. Req. 2: The circuit will have two outputs: outbus[7:0] and out_valid. Req. 3: When valid=0, outbus and out_valid will be all zeros. Req. 4: When valid=1, out_valid=1, the value of A will be routed to outbus if choose=0, otherwise B will be routed to outbus. Req. 5: After valid goes from 0 to 1, outbus and out_valid will change anywhere from 2 to 4ns later. Logic System Design I

Example – Timing Diagram Logic System Design I

Programmable Logic Arrays (PLAs) Any combinational logic function can be realized as a sum of products. Idea: Build a large AND-OR array with lots of inputs and product terms, and programmable connections. n inputs AND gates have 2n inputs -- true and complement of each variable. m outputs, driven by large OR gates Each AND gate is programmably connected to each output’s OR gate. p AND gates (p<<2n) Logic System Design I

Example: 4x3 PLA, 6 product terms Logic System Design I

Programmable Array Logic (PALs) How beneficial is product sharing? Not enough to justify the extra AND array PALs ==> fixed OR array Each AND gate is permanently connected to a certain OR gate. Example: PAL16L8 Logic System Design I

8 outputs, with 7 ANDs per output 1 AND for 3-state enable 10 primary inputs 8 outputs, with 7 ANDs per output 1 AND for 3-state enable 6 outputs available as inputs more inputs, at expense of outputs two-pass logic, helper terms Note inversion on outputs output is complement of sum-of-products newer PALs have selectable inversion Logic System Design I

Designing with PALs Compare number of inputs and outputs of the problem with available resources in the PAL. Write equations for each output using HDL. Compile the HDL program, determine whether minimized equations fit in the available AND terms. If no fit, try modifying equations. Logic System Design I

Decoders General decoder structure Typically n inputs, 2n outputs 2-to-4, 3-to-8, 4-to-16, etc. Logic System Design I

Binary 2-to-4 decoder Note “x” (don’t care) notation. Logic System Design I

2-to-4-decoder logic diagram Logic System Design I

Example: 2-to-4 decoder Architecture positional correspondence with entity definition built-in library components Logic System Design I

Decoder Symbol Logic System Design I

MSI 2-to-4 decoder Input buffering (less load) NAND gates (faster) Logic System Design I

Complete 74x139 Decoder Logic System Design I

3-to-8 decoder Logic System Design I

74x138 3-to-8-decoder symbol Logic System Design I

Dataflow-style program for 3-to-8 decoder Logic System Design I

Dataflow-style program for 3-to-8 decoder Logic System Design I

Decoder cascading 4-to-16 decoder Logic System Design I

More cascading 5-to-32 decoder Logic System Design I

Decoder applications Microprocessor memory systems selecting different banks of memory Microprocessor input/output systems selecting different devices Microprocessor instruction decoding enabling different functional units Memory chips enabling different rows of memory depending on address Logic System Design I

Example – Microprocessor Application Logic System Design I

Encoders vs. Decoders Decoder Encoder Logic System Design I

Binary encoders Logic System Design I

Need priority in most applications Logic System Design I

8-input priority encoder Logic System Design I

Priority-encoder logic equations Logic System Design I

74x148 8-input priority encoder Active-low I/O Enable Input “Got Something” Enable Output Logic System Design I

74x148 circuit Logic System Design I

74x148 Truth Table Logic System Design I

Cascading priority encoders 32-input priority encoder Logic System Design I

Multiplexers Logic System Design I

Multiplexer - Gate-Level Modeling - Verilog 2-to-1 Multiplexer // 2-to-1 Multiplexer module module mux_2 (out, i0, i1, sel); // header input i0, i1, sel; // input & output ports output out; wire x1, x2, x3; // internal nets or (out, x2, x3); // form output and (x2, i0, x1); // i0  sel’ and (x3, i1, sel); // i1  sel not (x1, sel); // invert sel endmodule Logic System Design I

Multiplexer - Dataflow Modeling - Verilog 4-bit Multiplexer // Four-bit 2-to-1 multiplexer module mux_4bit (Out, A, B, sel); input [3:0] A, B; input sel; output [3:0] Out; assign Out = sel ? B, A; endmodule Logic System Design I

Multiplexer - Behavioral Modeling - Verilog Conditional Statements module mux4_to_1 (A, B, C, D, OUT, select); input [7:0] A, B, C, D; input [1:0] select; output [7:0] OUT; reg [7:0] OUT; always @ (A or B or C or D or select) case (select) 2’d0: OUT = A; 2’d1: OUT = B; 2’d2: OUT = C; 2’d3: OUT = D; endcase end Logic System Design I

74x151 8-input multiplexer Logic System Design I

74x151 truth table Logic System Design I

CMOS transmission gates 2-input multiplexer Logic System Design I

Other multiplexer varieties 2-input, 4-bit-wide 74x157 4-input, 2-bit-wide 74x153 Logic System Design I

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 Logic System Design I

16 16-to-1 muxes 16-to-1 mux = 2 x 74x151 8-to-1 mux + NAND gate Logic System Design I

4 16-bit 2-to-1 muxes 16-bit 2-to-1 mux = 4 x 74x157 4-bit 2-to-1 mux Logic System Design I

Properties of different approaches Logic System Design I

2-input XOR gates Like an OR gate, but excludes the case where both inputs are 1. XNOR: complement of XOR Logic System Design I

XOR and XNOR symbols Logic System Design I

Gate-level XOR circuits No direct realization with just a few transistors. Logic System Design I

Equality Comparators 1-bit comparator 4-bit comparator EQ_L Logic System Design I

8-bit Magnitude Comparator Logic System Design I

Other conditions Logic System Design I

Adders Basic building block is “full adder” Truth table: 1-bit-wide adder, produces sum and carry outputs Truth table: X Y Cin S Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 Logic System Design I

Full-adder circuit Logic System Design I

Ripple adder Speed limited by carry chain Faster adders eliminate or limit carry chain 2-level AND-OR logic ==> 2n product terms 3 or 4 levels of logic, carry lookahead Logic System Design I

74x283 4-bit adder Uses carry lookahead internally Logic System Design I

carry-in from previous stage “generate” “half sum” carry-in from previous stage “propagate” Logic System Design I

Ripple carry between groups Logic System Design I

Lookahead carry between groups Logic System Design I

Subtraction Subtraction is the same as addition of the two’s complement. The two’s complement is the bit-by-bit complement plus 1. Therefore, X – Y = X + Y + 1 . Complement Y inputs to adder, set Cin to 1. For a borrow, set Cin to 0. Logic System Design I

Full subtractor = full adder, almost Logic System Design I

Multipliers 8x8 multiplier Logic System Design I

Full-adder array Logic System Design I

Faster carry chain Logic System Design I