1/8/2007 - L7 Project Step 3Copyright 2006 - Joanne DeGroat, ECE, OSU1 Project Step 4 Step 1 in transitioning to behavioral modeling. We will wire behavioral.

Slides:



Advertisements
Similar presentations
1/8/ VerilogCopyright Joanne DeGroat, ECE, OSU1 Verilog Overview An overview of the Verilog HDL.
Advertisements

L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
EELE 367 – Logic Design Module 4 – Combinational Logic Design with VHDL Agenda 1.Decoders/Encoders 2.Multiplexers/Demultiplexers 3.Tri-State Buffers 4.Comparators.
n-bit comparator using 1-bit comparator
L18 – VHDL for other counters and controllers. Other counters  More examples Gray Code counter Controlled counters  Up down counter  Ref: text Unit.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
© Dr. Alaaeldin Amin 1 Hardware Modeling & Synthesis Using VHDL Very High Speed Integrated Circuits Start Of VHDL Development First Publication.
1 Comparators Discussion D A 1-Bit Comparator The variable Gout is 1 if x > y or if x = y and Gin = 1. The variable Eout is 1 if x = y and Gin =
Digital Design Copyright © 2006 Frank Vahid 1 a b F InputsOutput a'b'a' b Converting among Representations Can convert from any representation.
ECE 331 – Digital System Design Course Introduction and VHDL Fundamentals (Lecture #1)
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
1 Comparators: Procedures Discussion D9.2 Example 22.
DIGITAL DESIGN WITH VHDL Exercise 1 1Muhammad Amir Yousaf.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
L23 – Arithmetic Logic Units. Arithmetic Logic Units (ALU)  Modern ALU design  ALU is heart of datapath  Ref: text Unit 15 9/2/2012 – ECE 3561 Lect.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
L16 – Testbenches for state machines. VHDL Language Elements  More examples HDL coding of class examples Testbench for example  Testing of examples.
1/8/ L3 Data Path DesignCopyright Joanne DeGroat, ECE, OSU1 ALUs and Data Paths Subtitle: How to design the data path of a processor.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 5 Step 2 in behavioral modeling. Use of procedures.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
L26 – Datapath ALU implementation
L16 – VHDL for State Machines with binary encoding.
1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 3 Structural Modeling and the Generate Statement.
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,
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
9/15/09 - L13 Technology Mapping & Verificaiton Copyright Joanne DeGroat, ECE, OSU1 Technology Mapping and Verification.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
L13 – VHDL Language Elements. VHDL Language Elements  Elements needed for FPGA design Types  Basic Types  Resolved Types – special attributes of resolved.
9/4/ L6 Language Overview I Copyright 2006, Joanne DeGroat, ECE, OSU 1 Language Overview I The start of a grand tour of the language.
1/8/ L2 VHDL Introcution© Copyright Joanne DeGroat, ECE, OSU1 Introduction to VHDL.
L19 – Resolved Signals. Resolved Signals  What are resolved signals In systems In VHDL Resolution – Isn’t that for resolving conflicts?  Ref: text Unit.
Lecture #18 Page 1 ECE 4110– Sequential Logic Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements 1.HW.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 7 Behavioral modeling of a dual ported register set.
Midterm Exam ReviewCopyright Joanne DeGroat, ECE, OSU1 Midterm Exam Notes.
BR 8/99 Arithmetic Operations We will review the arithmetic building blocks we have previously used, and look at some new ones. –Addition –incrementer.
1/20/ L8 Language Overview III Copyright Joanne DeGroat, ECE, OSU1 Language Overview III The finish of a grand tour of the language.
Project 1.  Two parts Implement a 3 bit Gray Code Counter Implement a 4-to-1 muxtiplexer  Can be done on Altera (Quartis) or Xilinx 8/22/2012 – ECE.
Explain Half Adder and Full Adder with Truth Table.
Comparators Combinational Design. Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Cascading.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 6 Step 3 in behavioral modeling. Use of packages.
MicroBaby ALU.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
A Case Study of the Rehosting from VHDL to Matlab/C
Basic Language Concepts
Subtitle: How to design the data path of a processor.
Swamynathan.S.M AP/ECE/SNSCT
Project Step 2 – A single bit slice of the ALU
The start of a grand tour of the language.
Copyright Joanne DeGroat, ECE, OSU
L25 – Datapath ALU.
Copyright Joanne DeGroat, ECE, OSU
Step 2 in behavioral modeling. Use of procedures.
How do you achieve deterministic concurrent simulation.
Hardware Modeling & Synthesis Using VHDL
An overview of the Verilog HDL.
Copyright Joanne DeGroat, ECE, OSU
Structural Modeling and the Generate Statement
Project Step 2 – A single bit slice of the ALU
Copyright Joanne DeGroat, ECE, OSU
Copyright Joanne DeGroat, ECE, OSU
Single bit comparator Single bit comparator 4/10/2007 DSD,USIT,GGSIPU
Step 2 in behavioral modeling. Use of procedures.
Step 3 in behavioral modeling. Use of packages.
© Copyright Joanne DeGroat, ECE, OSU
L25 – Final Review AU 15 Final Exam – Classroom – Journalism 300
Project Step 2 – A single bit slice of the ALU
Structural Modeling and the Generate Statement
Presentation transcript:

1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 4 Step 1 in transitioning to behavioral modeling. We will wire behavioral code 1-to-1 with our gate level model.

1/8/ L7 Project Step 3 Copyright Joanne DeGroat, ECE, OSU2 Project Step 4  This is the start of the transition to behavioral modeling.  At the gate level you are near 1-to-1 with the hardware that is implemented  At the behavioral level you have a physical interface and then the function between.

1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU3 VHDL view of the world  The VHDL view is one that starts with the interface. How do you connect to the world.  After this, you have the ARCHITECTURE which tell you what actions, responses, operations and transformations happen within the interface.  Many designers first think about what the function is, and, after the function is described what the interface is.  In the VHDL world you must first define the format, timing, frequency, etc. of how the data arrives and is output first.

1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU4 Thus Far  Have described the ALU architecture structurally using 2 basic components described at the gate level. Very close to a 1- to-1 representation of the gates.  Now will start a transition to a behavioral description where we raise the level of abstraction each time.

1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU5 Straight 1-to-1 algorithmic representation of the slice  Will use a process with a loop. Each iteration of the loop will move to the next most significant slice.  On the first iteration will compute the P operation, then the K operation, do the logic function of the carry block, and then finally the results block. This is done iteratively from bit position 0 to the msb.  Naturally fits into a loop.

Example of what I am talking about  Consider the bit-sliced comparator  Now lets do it slice-by-slice algorithmically Start by writing the multi-bit entity 1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU6

The Entity and start of Architecture ENTITY byte_comparator IS PORT (a,b : IN bit_vector (7 downto 0); --a & b data gt,eq,lt: IN bit; --previous slice results a_gt_b, a_eq_b, a_lt_b : OUT bit); --outputs END byte_comparator; --note that one of the gt,eq,lt inputs must be tied high ARCHITECTURE algorithmic OF byte_comparator IS 1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU7

The algorithm – the comparator BEGIN PROCESS (a,b,gt,eq,lt) VARIABLE igt,ieq,ilt : bit_vector (0 to 8); BEGIN igt(0) := gt; --connect to external inputs ieq(0) := eq; ilt(0) := lt; FOR i in 0 to 7 loop igt(i+1) := a (i)AND NOT b(i) OR a(i) AND igt(i) OR NOT b(i) AND igt(i); ieq(i+1):=ieq(i) AND (NOT a(i) AND NOT b(i) OR a(i) AND b(i)); ilt(i+1) :=NOT a(i) AND b(i) OR ilt(i) AND NOT a(i) OR ilt(i) AND b(i); END LOOP; a_gt_b <= igt(8); a_eq_b <= ieq(8); a_lt_b <= ilt(8); END PROCESS; END byte_comparator; 1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU8

An alternative BEGIN PROCESS (a,b,gt,eq,lt) VARIABLE igti,ieqi,ilti,igto,ieqo,ilto : bit; BEGIN igti := gt; --connect to external inputs ieqi := eq; ilti := lt; FOR i in 0 to 7 loop igto := a (i)AND NOT b(i) OR a(i) AND igti OR NOT b(i) AND igti; ieqo:=ieqi AND (NOT a(i) AND NOT b(i) OR a(i) AND b(i)); ilto :=NOT a(i) AND b(i) OR ilt(i) AND NOT a(i) OR ilti AND b(i); igti := igto; ieqi := ieq0; ilti := ilto; END LOOP; a_gt_b <= igto; a_eq_b <= ieqo; a_lt_b <= ilto; END PROCESS; END byte_comparator; 1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU9

1/8/ L7 Project Step 3 Copyright Joanne DeGroat, ECE, OSU10 Iteration across the slices -alu For I in 0 to 7 loop -- do the p operation -- do the k operation -- carry out the carry chain unit operations -- do an r operation -- will have inputs of a(i),b(i),icin, p,k,r to each slice -- produce sum(i) and icout End loop;

1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU11 Internal Connections  Before a signal was used to connect the output of the P unit and the K unit to the carry chain and R unit.  Now time will not advance while in the processes iterations. What to USE?????? How about a variable What effect does using a variable have?

The structure  The structure is very similar to that shown for the comparator.  Have a process Start with boundary Iterate the slices – the loop Final slice output 1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU12

1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU13 The test file  Be sure to properly configure your design into the testbench.  We will start looking at previous steps results, i.e., solutions.