ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.

Slides:



Advertisements
Similar presentations
VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
Advertisements

Simulation executable (simv)
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
ECE 551 Digital Design And Synthesis
Synchronous Sequential Logic
Combinational Logic.
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
2/9/20031 ECE 551: Digital System Design & Synthesis Lecture Set 4 4.1: Verilog – Procedural Assignments &Scheduling Semantics 4.2: Verilog – More Behavioral.
Introduction to Verilog
ECE 551 Digital System Design & Synthesis Lecture 09 Synthesis of Common Verilog Constructs.
Spring 20067W. Rhett Davis with minor modifications by Dean Brock ECE 406 at UNASlide 1 ECE 406 Design of Complex Digital Systems Lecture 10: 9: State.
Digital System Design by Verilog University of Maryland ENEE408C.
Copyright © 2007 Elsevier4- Chapter 4 :: Hardware Description Languages Digital Design and Computer Architecture David Money Harris and Sarah L. Harris.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 4 - Verilog 2 (Sequential.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
ECEN ECEN475 Introduction to VLSI System Design Verilog HDL.
ELEN 468 Advanced Logic Design
From Design to Verilog EECS150 Fall Lecture #4
Advanced Verilog EECS 270 v10/23/06.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Overview Logistics Last lecture Today HW5 due today
Spring 2007W. Rhett Davis with minor modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 7: Design Example,
Sequential Logic in Verilog
Chapter 4: Behavioral Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 4-1 Ders – 4: Davranışsal Modelleme.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
ECE 551 Digital Design And Synthesis
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Slide 1 6. VHDL/Verilog Behavioral Description. Slide 2 Verilog for Synthesis: Behavioral description Instead of instantiating components, describe them.
ECE/CS 352 Digital System Fundamentals© 2001 C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapters 3 and 4: Verilog – Part 2 Charles R.
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 7: Design Example, Modeling Flip-Flops Spring.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Workshop Topics - Outline
3/4/20031 ECE 551: Digital System Design * & Synthesis Lecture Set 3 3.1: Verilog - User-Defined Primitives (UDPs) (In separate file) 3.2: Verilog – Operators,
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
The Verilog Hardware Description Language. GUIDELINES How to write HDL code: How to write HDL code:
M.Mohajjel. Structured Procedures Two basic structured procedure statements always initial All behavioral statements appear only inside these blocks Each.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL State Machines Anselmo Lastra.
Introduction to ASIC flow and Verilog HDL
1 COMP541 State Machines - II Montek Singh Feb 13, 2012.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 9: State Machines & Reset Behavior Spring.
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
EMT 351/4 DIGITAL IC DESIGN Verilog Behavioral Modeling  Finite State Machine -Moore & Mealy Machine -State Encoding Techniques.
Pusat Pengajian Kejuruteraan Mikroelektronik EMT 351/4 DIGITAL IC DESIGN Verilog Behavioural Modeling (Part 4) Week #
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Structural Description
Overview Logistics Last lecture Today HW5 due today
Verilog Tutorial Fall
Supplement on Verilog FF circuit examples
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
SYNTHESIS OF SEQUENTIAL LOGIC
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
332:437 Lecture 8 Verilog and Finite State Machines
Chapter 4: Behavioral Modeling
COE 202 Introduction to Verilog
Register-Transfer Level Components in Verilog
The Verilog Hardware Description Language
Dr. Tassadaq Hussain Introduction to Verilog – Part-3 Expressing Sequential Circuits and FSM.
The Verilog Hardware Description Language
ECE 551: Digital System Design & Synthesis
332:437 Lecture 8 Verilog and Finite State Machines
Lecture 7: Verilog Part II
Presentation transcript:

ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview

2 Exam Details  Midterm October 18 th, 7:15pm, 1800EH  Closed book/notes, except 8.5 x 11 sheet (both sides)  No electronic devices  Everything covered through week 5  Homework 1-4, all assigned readings  Example midterms available in  Review session in discussion

3 Midterm Warnings [1]  Just about anything in the course is fair game  Lectures, IEEE standard, “Nonblocking Assignments in Verilog Synthesis”  This review is not comprehensive  Review your homework, lecture notes, and practice midterms

4 Midterm Warnings [2]  Allowed  1 sheet (8.5x11) of notes – can write on both sides  Pen or pencil (bring more than one)  Not Allowed  Cheating  Talking/whispering/pointing  Leaving the room during the exam  Use of any PDAs, calculators, cell phones, etc.  Textbooks, documents beyond the 1 sheet allowed above

5 Things To Know [1]  Verilog Syntax  Types of Verilog  Structural  RTL  Behavioral  Structural  Instantiation vs. declaration  Naming instances  Port connections by signal order vs. port names  RTL Verilog (Continuous Assignments)  Operators, bit lengths, delays

6 Things To Know [2]  Variables and Nets  Differences between them  How to declare each  How to declare vectors  How to declare register files / memories  When do you use reg and when do you use wire?  Number Representation  Base notation  # of bits  Handling of x and z in operations  Unsigned values are zero extended

7 Things To Know [3]  Behavioral constructs  initial, always  case, casex, casez, if, else if, else, for  Use of defaults (else, default case) and why  Procedural assignments (blocking vs. non-blocking)  Combinational vs. sequential  Triggers for always blocks (combinational/sequential)  Synchronous/asynchronous reset  Timing control #, posedge, negedge  Inter- and intra-assignment delays

8 Things To Know [4]  Testbenches  Instantiating UUT (unit-under-test)  Generating a clock properly  Providing stimulus  Exhaustively for small problems  Important and representative cases for larger problems  Test all FSM transitions and outputs  $display, $monitor, $strobe

9 Things To Know [5]  Good practices for Verilog writing  Don’t mix blocking / non-blocking  Blocking for combinational, non-blocking for sequential  Don’t write self-triggering loops  No cyclic combinational logic or latch inference  Don’t assign to a variable in more than one block  Add comments to your code

10 Things To Know [6]  Finite State Machines  Explicit vs. implicit  Moore vs. Mealy, and how they’re coded  Use of localparam to define state values  Combinational vs. sequential  State register  Combinational logic to determine next state  Combinational logic to determine outputs  Verilog Stratified Event Queue  What it means for blocking vs. non-blocking  What it means for $display vs. $strobe

11 Suggestions  On notes have one (or more) example of each of the topics covered  (if you’re not comfortable with them)  At worst, take directly from slides/book/standard  Fast and easy – but not terribly effective.  Can put this on one side of sheet (small font), leave other side for your own notes, additional examples.  Do not depend on notes for EVERYTHING  Won’t finish test in time!  Are just intended for help with syntax, etc.

12 Review Questions  Why is it useful to include a default item in a case statement?  Write behavioral code for a 3-bit counter with asynchronous reset and the following interface count_3bit(output reg [2:0] count, input reset, clk);  Write behavioral code for a 4-bit leading zero detector with the following interface lzd_4bit(output reg[1:0] pos, input [3:0] A); The output should indicate the number of leading 0s in A. Assume A is non-zero.

13 Review Question Answers module count_3bit(output reg [2:0] count, input reset, clk); clk, posedge reset) if (reset) count <= 0; else count <= count+1; endmodule

14 Review Question Answers module lzd_4bit(output reg [1:0] pos, input [3:0] A); (A) begin casez(A) 4'b0001: pos = 2’d3; 4'b001?: pos = 2’d2; 4'b01??: pos = 2’d1; 4'b1???: pos = 2’d0; default: pos = 2'bx; endcase end endmodule

15 Review Question Answers module lzd_4bit(output reg [2:0] pos, input [3:0] A); (A) begin casez(A) 4'b0000: pos = 3’d4; 4'b0001: pos = 3’d3; 4'b001?: pos = 3’d2; 4'b01??: pos = 3’d1; 4'b1???: pos = 3’d0; default: pos = 3'bx; endcase end endmodule

16 Review Questions  What does the following piece of code do?  Is it synthesizable? module circuit (output reg [7:0] count, input [7:0] datain, input load, clk); clk) begin if (load) begin for (count = datain; count > 0; count = count - clk); end endmodule waits until event occurs.

17 Review Questions  Determine when each expression is evaluated and assigned, and the value it is assigned. begin #2 b = a + a; c = #3 b + a; end clk) begin d <= #2 c + a; c <= #2 d + a; end initial begin a = 3; b = 2; c = 1; d = 0; clk = 1; end

18 Review Questions  Determine the console output. clk) begin d <= #2 c + a; $strobe (“s %t %b %b”, $time, c, d); $display (“d %t %b %b”, $time, c, d); c <= #2 d + a; end initial begin a = 3; c = 1; d = 0; clk = 1; end $monitor(“m %t %b %b”, $time, c, d);

19 Review Questions  Write behavioral code for a 4-bit pattern detector with the following interface; ptrn_4bit(output reg det, input [3:0] pattern, input sd, reset, clk); Serial data comes in on sd. Implement as a Moore machine with synchronous reset, and detect all pattern instances (instances may overlap).