 Seattle Pacific University EE 1210 - Logic System DesignCADNumbers-1 Arithmetic and CAD Tools CAD tools work great with arithmetic functions Adding,subtracting,multiplying,

Slides:



Advertisements
Similar presentations
Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.
Advertisements

Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Arithmetic Operations and Circuits
ECE 331 – Digital System Design
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
CSE140L – Lab4 Overall picture of Lab4 Tutorial on Bus & Memory Tutorial on Truth table.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #12) The slides included herein were taken from the materials.
ECE 331 – Digital System Design
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
Lecture #6 Page 1 Lecture #6 Agenda 1.VHDL - Architecture 2.VHDL - Packages Announcements 1.HW #3 assigned ECE 4110– Sequential Logic Design.
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Digital Arithmetic and Arithmetic Circuits
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
1 Combinational Logic Lecture #6. 모바일컴퓨터특강 2 강의순서 Decoder 3x8 Mux 4x1 Mux 8x1 Mux 8x1 4bits Half Adder Full Adder Ripple carry Adder 4-bit Adder.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
ENG241 Digital Design Week #4 Combinational Logic Design.
ENG2410 Digital Design LAB #8 LAB #8 Data Path Design.
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 1 September 27, 2006.
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
ENG241 Digital Design Week #8 Registers and Counters.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Introduction to Design Tools COE Example design: ALU Recall that the ALUOp is 4 bits – High-order two bits used to determine operation class (ALUOp(3:2))
ECE 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #11) The slides included herein were taken from the materials.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
EE3A1 Computer Hardware and Digital Design Lecture 2 Introduction to VHDL.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Lecture #7 Page 1 Lecture #7 Agenda 1.VHDL Data Types Announcements 1.n/a ECE 4110– Digital Logic Design.
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
 Seattle Pacific University EE Logic System DesignMux-Decoder-1 Multiplexers Two alternative forms for a 2:1 Mux Truth Table Functional form Logical.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches Concurrent Statements & Adders.
Number Representation and Arithmetic Circuits
Slide 1 3.VHDL/Verilog Description Elements. Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE.
Lecture #17 Page 1 ECE 4110–5110 Digital System Design Lecture #17 Agenda 1.MSI Multiplexers 2.MSI Encoders Announcements Test 1 closed book, Wednesday.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
An Introduction to V.H.D.L.. Need of a Compiler… main( ) { int x=10,y=20,z; z = x + y ; printf ( “ %d “, z ); getch( ) ; } What’s That ? Give me only.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
Combinational logic circuit
Basic Language Concepts
Registers and Counters
ECE 4110–5110 Digital System Design
Introduction to Programmable Logic
Combinational Circuits Using VHDL
ECE 4110–5110 Digital System Design
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
ECE 331 – Digital System Design
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL (VHSIC Hardware Description Language)
Chapter 5 – Number Representation and Arithmetic Circuits
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
ECE 331 – Digital System Design
Data Flow Description of Combinational-Circuit Building Blocks
Data Flow Description of Combinational-Circuit Building Blocks
Digital Logic with VHDL
Presentation transcript:

 Seattle Pacific University EE Logic System DesignCADNumbers-1 Arithmetic and CAD Tools CAD tools work great with arithmetic functions Adding,subtracting,multiplying, etc. A few things to learn first How to work with multi-bit numbers in CAD tools and VHDL How to create custom components in CAD tools I.e. a 7-bit adder/subtractor How to include VHDL components in a larger schematic

 Seattle Pacific University EE Logic System DesignCADNumbers-2 Multi-bit Numbers - Busses In Quartus II Schematics Busses are collections of wires mybus[7..0] is an eight bit bus Composed of mybus[7] (MSB) through mybus[0] (LSB) Busses make it easier to draw circuit diagrams In VHDL Busses are defined as a type of STD_LOGIC X: STD_LOGIC_VECTOR (7 DOWNTO 0) Composed of X(7) through X(0)

 Seattle Pacific University EE Logic System DesignCADNumbers-3 Connecting by name in Schematics Nodes (wires) can be connected by name Reduces complexity of drawing Input names Can be used on any wires All wires of the same name are connected Intermediate node names Just name it – no need to define it Busses Can connect a single wire from a bus by name

 Seattle Pacific University EE Logic System DesignCADNumbers-4 Busses in Schematics Many components have bus inputs Adders, for example Busses use thick lines Drawing from a bus input automatically makes a bus May select thick line from the line style menu Connecting busses Just name them the same thing Making busses out of wires Type all of the components (MSB to LSB) separated by commas

 Seattle Pacific University EE Logic System DesignCADNumbers-5 Creating and Using Custom Schematic Symbols 1. Make your component. Inputs/Outputs are interface to higher level 2. File | Create/Update | Create Symbol File For Current File 3. Make a new schematic for your main file and use your new symbol!

 Seattle Pacific University EE Logic System DesignCADNumbers-6 Making and Using Custom VHDL Symbols 1. Make your component. Inputs/Outputs are interface to higher level 2. File | Create/Update | Create Symbol File For Current File 3. Make a new schematic for your main file and use your new symbol!

 Seattle Pacific University EE Logic System DesignCADNumbers-7 MegaFunctions Quartus II has many configurable megafunctions Adders, subtractors, muxes, etc. Use the MegaWizard Button on the insert symbol menu Answer all of the questions see next slide… Save the new part Insert it into your schematic

 Seattle Pacific University EE Logic System DesignCADNumbers-8 Using the MegaWizard 1. Choose “Create a new…” to make a new device 2a. Pick a megafunction to use: Arithmetic includes adders, subtractors, counters, multipliers, etc. Gates include multiple-bit variations of standard logic. 2b. Choose VHDL and give your part a name.

 Seattle Pacific University EE Logic System DesignCADNumbers-9 Using the MegaWizard 3. Pick options: Data bus width Modes Etc.

 Seattle Pacific University EE Logic System DesignCADNumbers-10 Using the MegaWizard 4. Decide if any inputs are constants (i.e. always adding 4)

 Seattle Pacific University EE Logic System DesignCADNumbers-11 Using the MegaWizard 5. Pick optional outputs: Adder has optional carryin, carryout, and overflow out.

 Seattle Pacific University EE Logic System DesignCADNumbers-12 Using the MegaWizard 6. Pipelining – advanced option to speed up the function. Don’t use for now.

 Seattle Pacific University EE Logic System DesignCADNumbers-13 Using the MegaWizard 7. Just click Finish…

 Seattle Pacific University EE Logic System DesignCADNumbers-14 Using the MegaWizard 8. Yes – add to your project so you can use it! 9. Now your new symbol is available for use in schematics!

 Seattle Pacific University EE Logic System DesignCADNumbers-15 Using Busses in VHDL LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY hextosevenseg IS PORT( N: INSTD_LOGIC_VECTOR(3 downto 0); a,b,c,d,e,f,g,dec: OUTSTD_LOGIC); END hextosevenseg; ARCHITECTURE logicfunc OF hextosevenseg IS BEGIN a <= NOT( (N(2) AND N(1) AND NOT N(3)) OR (N(1) AND NOT N(2) AND N(0)) ); b <= … END logicfunc; Must use the IEEE library to use STD_LOGIC Bus definition Using bus signals individually

 Seattle Pacific University EE Logic System DesignCADNumbers-16 Math in VHDL LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_signed.all; ENTITY addemup IS PORT( A,B: INSTD_LOGIC_VECTOR(15 downto 0); Sum: OUTSTD_LOGIC_VECTOR(15 downto 0)); END addemup; ARCHITECTURE logicfunc OF addemup IS BEGIN Sum <= A + B; END logicfunc; Must use the SIGNED library for math It’s this easy! We’re adding two 16-bit numbers and producing a 16-bit sum

 Seattle Pacific University EE Logic System DesignCADNumbers-17 Decisions in VHDL using IF/THEN/ELSE LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_signed.all; ENTITY addemup IS PORT( A,B: INSTD_LOGIC_VECTOR(15 downto 0); Sub : IN STD_LOGIC; Out: OUTSTD_LOGIC_VECTOR(15 downto 0)); END addemup; ARCHITECTURE logicfunc OF addemup IS BEGIN PROCESS(Sub,A,B) BEGIN IF (Sub = ‘0’)THEN Out <= A + B; ELSIF (Sub = ‘1’)THEN Out <= A – B; ELSE Out <= “ ”; END IF; END PROCESS; END logicfunc; Expand adder to adder/subtractor: Sub=‘1’  subtract, Sub=‘0’  Add PROCESS: Identify which inputs may cause output to change IF / ELSIF / ELSE / END IF; Decision-making statements Don’t forget to END IF and PROCESS Vector constants in double quotes Scalar constants in single quotes

 Seattle Pacific University EE Logic System DesignCADNumbers-18 Truth Tables in VHDL LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY simplefunction IS PORT( A: INSTD_LOGIC_VECTOR(1 downto 0); Z,Q: OUTSTD_LOGIC); END simplefunction; ARCHITECTURE logicfunc OF simplefunction IS BEGIN PROCESS(A) BEGIN CASE A IS WHEN “00” => z z z z z<=‘0’;q<=‘0’; END CASE; END PROCESS; END logicfunc; “Others” catches any unlisted cases. Use it even if you covered them all. Process block specifies input(s) to process A case for each row in truth table Vector constants in double quotes Scalar constants in single quotes