Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.

Slides:



Advertisements
Similar presentations
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
Advertisements

COE 405 VHDL Basics Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh Computer Engineering.
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Verilog Intro: Part 1.
LECTURE 4: The VHDL N-bit Adder
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
N Structural Modeling: n Entities n Ports n Architectures n Packages.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
ECE 331 – Digital System Design
Various Descriptions of Majority Gate When-else If-else Case, select and other conditionals in sequential and concurrent descriptions Concurrent Statements.
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
Introduction to VHDL (part 2)
1 H ardware D escription L anguages Basic Language Concepts.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
Data Flow Modeling of Combinational Logic Simple Testbenches
ECE 2372 Modern Digital System Design
Digital Arithmetic and Arithmetic Circuits
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #17 – Introduction.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 5 Step 2 in behavioral modeling. Use of procedures.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
CprE / ComS 583 Reconfigurable Computing
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
Various Descriptions of Majority Gate When-else If-else Case, select and other conditionals in sequential and concurrent descriptions Concurrent Statements.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
Carry look ahead adder P (I) = a(I) xor b(I); G(I) = a(I) and b(I); S(I) = p(I) xor c(I); Carry(I+1) = c(I)p(I) + g(I)
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
1/8/ L2 VHDL Introcution© Copyright Joanne DeGroat, ECE, OSU1 Introduction to VHDL.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Data Flow Modeling in VHDL
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VHDL Coding for Synthesis ECE 448 Lecture 12.
Verilog hdl – II.
Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
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
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Module Goals Introduce structural VHDL constructs Use of components
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Lecture 2 Supplement Verilog-01
VHDL VHSIC Hardware Description Language VHSIC
VHDL (VHSIC Hardware Description Language)
Lecture 2: Continuation of SystemVerilog
Step 2 in behavioral modeling. Use of procedures.
Figure 8.1. The general form of a sequential circuit.
Supplement on Verilog adder examples
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
Step 2 in behavioral modeling. Use of procedures.
CprE / ComS 583 Reconfigurable Computing
COE 202 Introduction to Verilog
System Controller Approach
Presentation transcript:

Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With T FFs, transitions –Iterative circuits (using decomposition to one dimensional, one- directional iterative circuits specified as FSMs) –Trade-off between FSM and iterative circuit –Parallel and serial adder –ALU with arithmetic and logic part. –Realization of all functions of 2 variables –Realization of all symmetric functions. n Generalization of generalized register to SIMD architecture –GAPP processor n Sequential Controller (SAT example) n Pipelined architecture for vector processing n Linear Systolic array for convolution n Generate Statements

pipelined Iterative circuit (one dimensional) Finite state machine Iterative circuit (general, n-dimensional) systolic Sequential controller Butterfly combinational Generalized register Data Path SIMD Professor Perkowski wants you to select a good design pattern to get an A in this class and become a talented designer

Regular Structures

Regular VHDL Structures n Iterative Circuits Are Composed of Many Identical Circuits –Ripple-carry (RC) adder –RAM –Counters –Comparators

Generate Statement

n Use Generate Statement to Reduce Coding Effort n Can Include Any Concurrent Statement Including Another Generate Statement n Does Not Execute Directly, But Expands into Code Which Does Execute

Generate Statement n Automatically Generates Multiple Component Instantiations n Two Kinds of Statements –Iteration »FOR... GENERATE –Conditional »IF... GENERATE

Iteration: FOR Generate n Instantiates Identical Components Syntax of FOR identifier : FOR N IN 1 TO 8 GENERATE concurrent-statements END GENERATE name ; –N is a constant and cannot be changed –“name” is required

Conditional: IF GENERATE n Takes Care of Boundary Conditions Syntax of IF identifier : IF (boolean expression) GENERATE concurrent-statements END GENERATE name ; –Cannot use “else” or “ifelse” clauses

4 Bit Ripple Carry Adder AB S CiCi Co AB S CiCi AB S CiCi AB S CiCi Ci n A(0) Cout B(0)A(1)B(1)A(2)B(2)A(3)B(3) C(0)C(1)C(2)C(3)C(4) Sum(0)Sum(1)Sum(2)Sum(3) Want to write a VHDL model for a 4 bit ripple carry adder. Logic equation for each full adder is: sum <= a xor b xor ci; co <= (a and b) or (ci and (a or b));

ENTITY for Generate e.g., Ripple Carry (R-C) Adder ENTITY RCAdder_16 IS PORT ( A, B : IN Bit_Vector (15 downto 0); Cforce : IN Bit ; Sum : OUT Bit_Vector(15 downto 0); Cout : OUT Bit ) ; END RCAdder_16 ; This is an adder with 16 bits!!

Architecture and SIGNAL for Generate e.g., R-C Adder ARCHITECTURE Generate_S OF RCAdder_16 IS COMPONENT Full_Adder --defined elsewhere PORT ( A, B, Cin : IN bit ; S, Cout : OUT bit ); END COMPONENT Full_Adder ; SIGNAL Int_C : BIT_VECTOR (15 DOWNTO 0);

Use of Generate in R-C Adder for I = 0 BEGIN --RC Adder All_Bits: FOR I IN 15 DOWNTO 0 GENERATE LSB : IF (I = 0) GENERATE BEGIN S0: Full_Adder PORT MAP ( A(I), B(I), Cforce, Sum(I), Int_C(I) ); END GENERATE S0 ;

Generate e.g., R-C Adder for Middle Bits Middle_bits: IF ( I 0 ) GENERATE BEGIN SI: Full_Adder PORT MAP ( A(I), B(I), Int_C(I-1), Sum(I), Int_C(I) ); END GENERATE SI;

Generate e.g., R-C Adder for Most Significant Bit MSB: IF ( I = 15 ) GENERATE BEGIN S15: Full_Adder PORT MAP ( A(I), B(I), Int_C(I-1), Sum(I), Cout ); END GENERATE MSB; END GENERATE All_Bits END Generate_S ;

n But what we should do if we want to have a parameterized design not for 16 but for some parameter N?

LENGTH and Unconstrained Ports n Entity Declarations Can Have Ports Defined Using Arrays Without Explicitly Including the Size of the Array n Leads to General Specification of Iterative Circuit Uses Predefined Array Attribute ‘LENGTH

Using LENGTH and Generate for the R-C Adder ENTITY RCAdder_N IS PORT ( A, B : IN Bit_Vector ; Cforce : IN Bit ; Sum : OUT Bit_Vector ; Cout : OUT Bit ) ; END RCAdder_N ; I am not specifying how long is this vector of bits

ARCHITECTURE Generate_S OF RCAdder_N IS COMPONENT Full_Adder --defined elsewhere PORT ( A, B, Cin : IN bit ; S, Cout : OUT bit ) ; END COMPONENT Full_Adder ; SIGNAL Int_C : BIT_VECTOR ( (A’LENGTH - 1) DOWNTO 0); Uses Predefined Array Attribute ‘LENGTH Using LENGTH and Generate for the R-C Adder This is local A from component This is global A from entity

BEGIN --RC Adder All_Bits: FOR I IN (A’LENGTH -1) DOWNTO 0 GENERATE LSB: IF (I = 0) GENERATE BEGIN S0: Full_Adder PORT MAP ( A(I), B(I), Cforce, Sum(I), Int_C(I) ); END GENERATE S0 ; For primary input, not iterative carry Please remember that FOR used here is for structure description. It is different than LOOP used in behavioral descriptions in future Using LENGTH and Generate for the R-C Adder = LSB

Middle_bits: IF ( I 0 ) GENERATE BEGIN SI: Full_Adder PORT MAP ( A(I), B(I), C(I-1), Sum(I), Int_C(I) ); END GENERATE SI ; Using LENGTH and Generate for the R-C Adder = Middle Bits

Generate e.g., R-C Adder MSB: IF ( I = A’LENGTH - 1 ) GENERATE BEGIN SN: Full_Adder PORT MAP ( A(I), B(I), INT_C(I-1), Sum(I), Cout ); END GENERATE MSB; END GENERATE All_Bits END Generate_S ; For primary output, not iterative carry out Using LENGTH and Generate for the R-C Adder = Most Significant Bit

Problems for students to think about 1. Generate statement for one dimensional combinational regular structures. 2. Generate statement for two-dimensional combinational regular structures. 3. Generate statement for many dimensional circuits. 4. Generate statement for regular structures of finite state machines and generalized shift registers. 5. How to describe GAPP processor and similar FPGA structures using “Generate”. 6. Importance of the “generalized register” model as a prototype of many combinational, sequential, cellular and systolic circuits.

Slides used Prof. K. J. Hintz Department of Electrical and Computer Engineering George Mason University