Logic Analyzers EECS150 Fall Lab Lecture #5 Arjun Singh

Slides:



Advertisements
Similar presentations
ECE 551 Digital Design And Synthesis
Advertisements

EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Combinational Logic.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
ECE 551 Digital System Design & Synthesis Lecture 09 Synthesis of Common Verilog Constructs.
2/24/2006EECS150 Lab Lecture #61 N64 Controller (Project Checkpoint#1) EECS150 Spring2006 – Lab Lecture #6 Philip Godoy Guang Yang Greg Gibeling.
10/1/2004EECS150 Lab Lecture #51 Good Design & Network Audio EECS150 Fall2004 – Lab Lecture #5 Udam Saini.
2/16/2007EECS150 Lab Lecture #51 Logic Analyzers EECS150 Spring 2007 – Lab Lecture #5 Shah Bawany.
2/17/2006EECS150 Lab Lecture #51 Logic Analyzers EECS150 Spring 2006 – Lab Lecture #5 David Lin Greg Gibeling.
9/5/2008EECS150 Lab Lecture #21 Designing with Verilog EECS150 Fall Lab Lecture #2 Chen Sun Adopted from slides designed by Greg Gibeling.
2/9/2007EECS150 Lab Lecture #41 Debugging EECS150 Spring2007 – Lab Lecture #4 Laura Pelton Greg Gibeling.
ELEN 468 Advanced Logic Design
8/31/2007EECS150 Lab Lecture #11 EECS150 Intro. & CAD Tools EECS150 Fall 2007 Lab Lecture #1 Shah Bawany.
02/10/06EECS150 Lab Lecture #41 Debugging EECS150 Spring 2006 – Lab Lecture #4 Philip Godoy Greg Gibeling.
10/31/2008EECS150 Lab Lecture #10 The Waveform Generator EECS150 Fall Lab Lecture #10 Chris Fletcher Adopted from slides designed by Chris Fletcher.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
Comments on Lab #4 Annotating Timing Diagrams Draw viewer’s attention to the points you are trying to show / verify –Important output states glitch or.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
The Verilog Hardware Description Language. GUIDELINES How to write HDL code: How to write HDL code:
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL State Machines Anselmo Lastra.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Teaching Digital Logic courses with Altera Technology
2/3/2006EECS150 Lab Lecture #31 Implementation of FSMs EECS150 Spring 2006 – Lab Lecture #3 Guang Yang Greg Gibeling.
2/2/07EECS150 Lab Lecture #31 Verilog Synthesis & FSMs EECS150 Spring 2007 – Lab Lecture #3 Brent Mochizuki Greg Gibeling.
CprE 281: Verilog Tutorial Ben Magstadt – Master’s Student Electrical Engineering.
378 Survival Guide Lab tips, Verilog tricks, and other useful info Aaron Miller Winter 2010 Some content graciously borrowed from Jacob Nelson.
Introduction to the FPGA and Labs
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
Figure 8.1. The general form of a sequential circuit.
Using Xilinx ChipScope Pro Tools
Discussion 2: More to discuss
Topics Modeling with hardware description languages (HDLs).
‘if-else’ & ‘case’ Statements
Supplement on Verilog Sequential circuit examples: FSM
SDRAM Arbiter EECS150 Fall Lab Lecture #9 Chen Sun
Hardware Description Languages: Verilog
Getting Started with Programmable Logic
Topics Modeling with hardware description languages (HDLs).
Introduction to Verilog
Week 5, Verilog & Full Adder
Introduction to Verilog
EECS150 Intro & CAD Tools EECS150 Fall Lab Lecture #1
Logic Analyzers EECS150 Fall Lab Lecture #5 Arjun Singh
ChipScope Pro Software
332:437 Lecture 8 Verilog and Finite State Machines
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
EECS150 Fall 2007 – Lab Lecture #4 Shah Bawany
Guest Lecture by David Johnston
Debugging EECS150 Fall Lab Lecture #4 Sarah Swisher
Supplement on Verilog Sequential circuit examples: FSM
Designing with Verilog
The Verilog Hardware Description Language
Debugging EECS150 Fall Lab Lecture #4 Sarah Swisher
ChipScope Pro Software
The Verilog Hardware Description Language
Good Design & Network Audio
The Verilog Hardware Description Language
The SDRAM Controller EECS150 Fall Lab Lecture #8 Chen Sun
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Verilog Synthesis & FSMs
332:437 Lecture 8 Verilog and Finite State Machines
Instructor: Michael Greenbaum
Presentation transcript:

Logic Analyzers EECS150 Fall2008 - Lab Lecture #5 Arjun Singh Adopted from slides designed by Greg Gibeling 9/26/2008 EECS150 Lab Lecture #5

Today Lab #3 Solution Synplify Warnings Debugging Hardware Administrative Info Logic Analyzer ChipScope 9/26/2008 EECS150 Lab Lecture #5

Lab #3 Solution (1) FSM.pdf Testbench Use this format for ALL FSMs! It is concise It will synthesize well Everyone will be able to read it Testbench Thorough Automated A little complicated 9/26/2008 EECS150 Lab Lecture #5

Lab #3 Solution (2) module Lab3Testbench initial begin Reset = 1'b0; Enter = 1'b0; ResetCombo = 1'b0; Code = 2'b00; #(`Cycle); Reset = 1'b1; ResetCombo = 1'b1; … 9/26/2008 EECS150 Lab Lecture #5

Lab #3 Solution (3) for (CodeCounter = 0; CodeCounter < 5'h10; CodeCounter = CodeCounter + 1) begin end Enter = 1'b1; Code = CodeCounter[1:0]; #(`Cycle); Code = CodeCounter[3:2]; Enter = 1'b0; case ({Open, Error, Prog1, Prog2}) … endcase Reset = 1'b1; #(`Cycle); Reset = 1'b0; 9/26/2008 EECS150 Lab Lecture #5

Synplify Warnings (1) Why Bother? Incomplete Sensitivity List Part of your project grade Major warnings will cost points Knowing these will make your life easier Saves debugging Incomplete Sensitivity List ModelSim will use the sensitivity list Synplify pretty ignores it 9/26/2008 EECS150 Lab Lecture #5

Synplify Warnings (2) input Clock; reg [31:0] Count; // Counter always @ (posedge Clock) Count <= Count + 1; OK! input [15:0] A, B; output [31:0] Sum; output COut; // Adder always @ ( * ) {COut, Sum} = A + B; input [15:0] A, B; output [31:0] Sum; output COut; // Adder always @ (A) {COut, Sum} = A + B; OK! 9/26/2008 EECS150 Lab Lecture #5

Synplify Warnings (3) Latch Generated reg [1:0] CS, NS; wire A; always @ ( * ) begin // Next state logic NS = CS; case (CS) STATE_1: NS = STATE_2; STATE_2: if (A) NS = STATE_3; STATE_3: endcase end input [1:0] select; input A, B, C; output Out; reg Out; // Mux always @ (select or A or B or C) begin case (select) 2’b00: Out = A; 2’b01: Out = B; 2’b10: Out = C; 9/26/2008 EECS150 Lab Lecture #5

Synplify Warnings (4) Combinational Loop Must remove the loop or add a register Synplify wont show you the loop Comment out code till it goes away 1 3 2 1 ∞?? ∞?? 2 1 9/26/2008 EECS150 Lab Lecture #5

Synplify Warnings (5) FPGA_TOP2 always has warnings Un-driven Input Unconnected Output These are truly unneeded pins Things like the audio chips… In your modules these are a problem Synplify will optimize your design Unconnected modules removed 9/26/2008 EECS150 Lab Lecture #5

Synplify Warnings (6) Why bother? Warnings are the only syntax check Getting rid of warnings saves debugging Synplify warnings will result in lost points Warnings are the only syntax check Verilog is a forgiving language Undeclared variables default to 1 bit wires This isn’t a good thing 9/26/2008 EECS150 Lab Lecture #5

Administrative Info Midterm 1 Next Tuesday: 9/30 Review Sessions 125 Cory, during lecture DO NOT go to 306 Soda Review Sessions Saturday 7pm; 125 Cory Monday 9/26/2008 EECS150 Lab Lecture #5

Debugging Hardware (1) Using the logic analyzer / ChipScope The most reliable tool you have When used properly Use the triggers effectively Trigger on recurring sequences Trigger on errors An unstable display is useless Compare synthesis to simulation ChipScope is almost as good as simulation 9/26/2008 EECS150 Lab Lecture #5

Lab #5: Logic Analysis (1) Logic Analyzer HP54645D Mixed Signal Oscilloscope Analog Oscilloscope Digital Logic Analyzer Graphs Signals vs Time Like a timing diagram Invaluable for Debugging This is your only tool for examining your clocks Easy to see trends in signals… 9/26/2008 EECS150 Lab Lecture #5

Lab #5: Logic Analysis (2) Exhaustive FSM Testing Very similar to Part3 of Lab #4 You’ll be mapping the whole FSM No bubble-and-arc to start from No single step Takes an input every cycle at 27MHz Much too fast to see on the LEDs Logic Analyzer! 9/26/2008 EECS150 Lab Lecture #5

Lab #5: Logic Analysis (3) 9/26/2008 EECS150 Lab Lecture #5

Lab #5: Logic Analysis (4) Procedure Set up the Logic Analyzer Synthesize the design Write a test pattern and set SW10 Press Single on the logic analyzer Press Reset to start the test Examine the waveforms Build a bubble-and-arc diagram 9/26/2008 EECS150 Lab Lecture #5

The Logic Analyzer (1) Graphs Voltage vs Time Takes real signals from a CUT Can show both analog and digital signals Great for signal quality, delay, timing 9/26/2008 EECS150 Lab Lecture #5

The Logic Analyzer (2) 16 Digital Inputs Excellent Debugging Tool Not very many signals (Wait till next week) Trigger Controls Digital Controls 9/26/2008 EECS150 Lab Lecture #5

The Logic Analyzer (3) Read the Lab This is just a quick 10min intro Please ask questions 9/26/2008 EECS150 Lab Lecture #5

ChipScope (1) Software based logic analyzer Get results on the computer Put a logic analyzer right into the FPGA ICON – Connects FPGA to software ILA – Does the actual analysis More flexible than the bench analyzers But not as timing accurate 9/26/2008 EECS150 Lab Lecture #5

ChipScope (2) Steps to use ChipScope Generate an ICON Generate an ILA Connect the ILA to the ICON Synthesize, and implement your design With the ILA and ICON Program the CaLinx board Run the ChipScope Pro Analyzer Runs over the JTAG not Slave Serial 9/26/2008 EECS150 Lab Lecture #5

ChipScope (3) Logic Analyzer Similarities/Differences Triggering is similar Can be set to show waves before trigger Can trigger on repeated or combined events Data/Trigger can be MUCH bigger Up to 256bits wide As many samples as Block RAM on the FPGA Data is captured synchronously Can’t look at clocks Much easier to view waveforms 9/26/2008 EECS150 Lab Lecture #5

ChipScope (4) You will NEED ChipScope You cannot debug a large design without it Bench analyzers wont show enough signals 9/26/2008 EECS150 Lab Lecture #5

ChipScope (5) Now for a 10 min demo… Generate ICON Generate ILA Instantiate in Verilog Synthesize design View waveforms in ChipScope wave window 9/26/2008 EECS150 Lab Lecture #5