2/24/2006EECS150 Lab Lecture #61 N64 Controller (Project Checkpoint#1) EECS150 Spring2006 – Lab Lecture #6 Philip Godoy Guang Yang Greg Gibeling.

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University See P&H Appendix B.7. B.8, B.10, B.11.
Sumitha Ajith Saicharan Bandarupalli Mahesh Borgaonkar.
EECS150 Lab Lecture #61 AC97 PCM Audio EECS150 Fall 2007– Lab Lecture #6 Udam Saini 10/05/2007.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 8: Sequential Design Spring 2009 W. Rhett.
Finite State Machine Chapter 10 RTL Hardware Design by P. Chu.
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.
EECS 150 Spring 2007 Checkpoint 0 - SDRAM 2/23/2007 Jeff Kalvass (Adapted From Greg Gibeling )
Photolithography Machine Control System Ben Conrad and Mark Edwards Projects in Computer Engineering II December 9, 2003.
CS61C L21 State Elements : Circuits that Remember (1) Spring 2007 © UCB 161 Exabytes In 2006  In 2006 we created, captured, and replicated 161 exabytes.
3/24/2006EECS150 Lab Lecture #101 Game Engine EECS150 Spring2006 Lab Lecture #10 Guang Yang.
3/10/2006EECS150 Lab Lecture #81 Chipcon Transceiver EECS150 Spring 2006 Lab Lecture #8 David Lin.
CS150 Project Checkpoint 1. Controller Interface Dreamkatz Controller Interface 1. The N64 Controller 2. Physical interface 3. Communication protocol.
CS150 Project Checkpoint 2 CheckPt2 is easy!!! BUT………………. This lab can be very tricky. BUT……………… Mark is here to help! You get to listen to cool.
2/16/2007EECS150 Lab Lecture #51 Logic Analyzers EECS150 Spring 2007 – Lab Lecture #5 Shah Bawany.
LAB 3 Finite State Machines On Xilinx Mike Lowey.
2/17/2006EECS150 Lab Lecture #51 Logic Analyzers EECS150 Spring 2006 – Lab Lecture #5 David Lin Greg Gibeling.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 4 - Verilog 2 (Sequential.
2/9/2007EECS150 Lab Lecture #41 Debugging EECS150 Spring2007 – Lab Lecture #4 Laura Pelton Greg Gibeling.
Students: Nir Engelberg Ezequiel Hadid Supervisor: Mony Orbach In association with: January 3, Winter 2005.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 8, 2007.
02/10/06EECS150 Lab Lecture #41 Debugging EECS150 Spring 2006 – Lab Lecture #4 Philip Godoy Greg Gibeling.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Time Division Multiplexing School of Physics and Astronomy Department of Particle Physics Elissavet Papadima 29/5/2014.
10/31/2008EECS150 Lab Lecture #10 The Waveform Generator EECS150 Fall Lab Lecture #10 Chris Fletcher Adopted from slides designed by Chris Fletcher.
Overview Logistics Last lecture Today HW5 due today
Lecture 111 Lecture 11: Lab 3 Overview, the ADV7183B Video Decoder and the I 2 C Bus ECE 412: Microcomputer Laboratory.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
Live Action First Person Shooter Game Patrick Judd Ian Katsuno Bao Le.
GBT Interface Card for a Linux Computer Carson Teale 1.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Computer Organization & Programming Chapter 5 Synchronous Components.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Intel: Lan Access Division Technion: High Speed Digital Systems Lab By: Leonid Yuhananov & Asaad Malshy Supervised by: Dr. David Bar-On.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL State Machines Anselmo Lastra.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 11, 2010.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
Teaching Digital Logic courses with Altera Technology
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
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.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Lab Environment and Miniproject Assignment Spring 2009 ECE554 Digital Engineering Laboratory.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Lecture 5. Verilog HDL #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
Implementation of Pong over VGA on the Nexys 4 FPGA
SDRAM Arbiter EECS150 Fall Lab Lecture #9 Chen Sun
Local Video System: Overview
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Logic Analyzers EECS150 Fall Lab Lecture #5 Arjun Singh
332:437 Lecture 8 Verilog and Finite State Machines
EE4OI4 Engineering Design
EECS150 Fall 2007 – Lab Lecture #4 Shah Bawany
Debugging EECS150 Fall Lab Lecture #4 Sarah Swisher
Designing with Verilog
Figure 8.1. The general form of a sequential circuit.
Debugging EECS150 Fall Lab Lecture #4 Sarah Swisher
Good Design & Network Audio
Local Video System: Overview
The SDRAM Controller EECS150 Fall Lab Lecture #8 Chen Sun
Logic Analyzers EECS150 Fall Lab Lecture #5 Arjun Singh
Verilog Synthesis & FSMs
(Adapted From Slides by Greg Gibeling)
332:437 Lecture 8 Verilog and Finite State Machines
Chapter 13: I/O Systems.
Instructor: Michael Greenbaum
Interfacing keyboard with FPGA
Presentation transcript:

2/24/2006EECS150 Lab Lecture #61 N64 Controller (Project Checkpoint#1) EECS150 Spring2006 – Lab Lecture #6 Philip Godoy Guang Yang Greg Gibeling

2/24/2006EECS150 Lab Lecture #62 Today (1) Administrative Info Lab #4 Solution Lab #5 Tips Project Overview Design Review Requirements

2/24/2006EECS150 Lab Lecture #63 Today (2) CaLinx2 Expansion Checkpoint #1 Button Parse N64 Controller Commands Bit Timing Receive Transmit Testing

2/24/2006EECS150 Lab Lecture #64 Administrative Info (1) Midterm I Solutions will be posted Group Sign-ups You should already have a group If not, see me after class today Group names need to be finalized today

2/24/2006EECS150 Lab Lecture #65 Administrative Info (2) N64 Controller Checkout One per group Test it out as soon as you get it Use the Checkpoint#1 demo posted online Damage You break it, you buy it We don’t have replacements, sorry Return Due back by the final Otherwise we don’t grade your final

2/24/2006EECS150 Lab Lecture #66 Administrative Info (3) What are Man Hours? MH = H i = # hours spent by person i, n = # people Example: David and I are project partners. David spent 11 hours on CP#2, and I spent 8 hours on CP#2. 3 of each of our hours were spent working together. H 1 =11, H 2 =8, n=2; MH CP#2 = = 19 Last semester: average MH CP#1 = 30

2/24/2006EECS150 Lab Lecture #67 module Lab4Part2Tester(A, B, Sum, …); output[15:0]A, B, Sum; input[1:0]FailMode; inputClock, Reset, Go; outputRunning, Error; wireDone; assignError =Sum != (A+B); Lab4Part2Adder TheAdder(.A(A),.B(B),.Sum(Sum),.FailMode(FailMode)); Counter TestCounter(.Clock(Clock),.Reset(Reset),.Set(1'b0),.Load(1'b0),.Enable((Running & ~Error) | Go)),.In(32'hXXXXXXXX),.Count({A, B})); defparam TestCounter.width = 32; Register RunReg(.Clock(Clock),.Reset(Reset | &{A, B}),.Set(Go),.Enable(1'b0),.In(1'bx),.Out(Running)); defparam RunReg.width = 1; Lab #4 Solution (1)

2/24/2006EECS150 Lab Lecture #68 Lab #4 Solution (2) FSM Debugging Both FSMs were “almost Moore” You’ll build a lot of these Check for this CAREFULLY in your code

2/24/2006EECS150 Lab Lecture #69 Lab #5 Tips Reading Logic Analyzer Look at the falling edges of Clock This avoids clock-to-output delay Easier to read CurrentState, Input, Output on THIS CYCLE NextState is the NEXT “CurrentState” Using ChipScope Use different trigger ports for different signals Use “Position” to see before triggering event

2/24/2006EECS150 Lab Lecture #610 EECS 150 Spring 2006 Class Project

2/24/2006EECS150 Lab Lecture #611 Project Overview (1) Wireless Tron N64 Controller -> Player Control NTSC (TV) Video Output -> Battle Field Display Chipcon RF Transceiver -> Wireless Communication Game Engine -> Coordinate everything Game Engine NTSC Video Chipcon Transceiver N64 Controller

2/24/2006EECS150 Lab Lecture #612 Project Overview (2) Check Point 1 N64 Controller Interface Check Point 2 NTSC Video Check Point 3 Chipcon RF Transceiver Check Point 4 Game Engine Block Diagram of the Design

2/24/2006EECS150 Lab Lecture #613 Project Overview (3) Four check points N64 Input NTSC Output Chipcon Transceiver Bidirectional communication Game Engine Absolutely symmetric (anyone can play with anyone, with another copy of yourself) Interface with Chipcon, N64 and NTSC

2/24/2006EECS150 Lab Lecture #614 Project Overview (4) Checkpoints Require more design work than labs We’re not telling you exactly what to do Part of your project Design them well Test modules thoroughly! Don’t lose your code Require more time See project schedule posted online for deadlines and grade weights

2/24/2006EECS150 Lab Lecture #615 Design Review Requirements High level schematic of your module implementation Basic building blocks: register, shift register, counter, mux, comparator, adder, state machine You can create your own module hierarchy Due at the beginning of your assigned lab the week after the lab lecture Graded on correctness, efficiency

2/24/2006EECS150 Lab Lecture #616 Design Review Example

2/24/2006EECS150 Lab Lecture #617 Calinx2 Expansion N64 Controller Ports (2)

2/24/2006EECS150 Lab Lecture #618 Checkpoint #1: N64 (1) Primary input for your project Direction Buttons: Move your car Analog Joystick: Can also move your car Other Buttons: Start new game after game over Speed up / brake ? Camera angles / zooming ? Weapons ? Game codes ?

2/24/2006EECS150 Lab Lecture #619 Checkpoint #1: N64 (2) I/O Controller Precise timing requirements You have to match a real piece of hardware You can’t change both ends of the problem Hard to simulate You may want to build a model controller We would give you one, but its basically the solution with minor changes Hint hint…

2/24/2006EECS150 Lab Lecture #620 Button Parse (1) Real World Inputs Problem Circuits are fast (27MHz) Humans are slow (100Hz) Mechanical switches are very imperfect Solution Take very long (10ms), very bouncy pulses Clean them up Generate one cycle pulses (1’b0, 1’b1, 1’b0)

2/24/2006EECS150 Lab Lecture #621 Button Parse (2)

2/24/2006EECS150 Lab Lecture #622 Button Parse (3)

2/24/2006EECS150 Lab Lecture #623 Button Parse (4)

2/24/2006EECS150 Lab Lecture #624 Button Parse (5)

2/24/2006EECS150 Lab Lecture #625 N64 Controller (1) Functionality Fancy Parallel Serial Conversion Single bi-directional wire to N64 Controller Core of this module is a Shift Register Polling N64 uses Challenge/Response We send a command, it responds Might need a little state (send/receive)

2/24/2006EECS150 Lab Lecture #626 N64 Controller (2) Construction Components Shift Register FSM/State Register What else? Plan your design out in DETAIL

2/24/2006EECS150 Lab Lecture #627 N64 Commands (1) Available Commands 8’hFF: Reset Controller 8’h00: Get Status 8’h01: Read Buttons 8’h02: Read Mempack 8’h03: Write Mempack 8’h04: Read EEPROM 8’h05: Write EEPROM

2/24/2006EECS150 Lab Lecture #628 N64 Commands (2) Command Format 8bits of Command 1-bit Stop Bit (1’b1) Example: Read Buttons: 9’b How do we generate this? Shift Register Something better…

2/24/2006EECS150 Lab Lecture #629 N64 Bit Timing (1)

2/24/2006EECS150 Lab Lecture #630 N64 Bit Timing (2) “Read Buttons” Command 8bits of Command: 8’h01 1bit Stop Marker: 1’b1

2/24/2006EECS150 Lab Lecture #631 N64 Receive (1) Points to Consider Reliability The N64 controllers are NOT 100% reliable Your circuit must be Timing This is not a synchronous design The controller has its own clock We must detect new bits A major part of this design is timing!

2/24/2006EECS150 Lab Lecture #632 N64 Receive (2) Detecting a new bit: Look for 1’b1 (Stop sub-bit) -> 1’b0 (Start sub-bit) Falling Edge Detector Wait 2us Capture Data

2/24/2006EECS150 Lab Lecture #633 N64 Receive (3) What if we never get another bit… Detection Falling edge never happens How do we detect an event that never happens? Recovery Can’t wait forever, game will lock up Re-request the button status? Reset the controller? You MUST recover from this condition!

2/24/2006EECS150 Lab Lecture #634 N64 Transmit (1) For Each Bit Count 1us (1 sub-bit), Transmit 1’b0 Count 1us (1 sub-bit), Transmit Data Count 1us (1 sub-bit), Transmit 1’b1 Timing We’re driving the bus – not a problem Still very important

2/24/2006EECS150 Lab Lecture #635 N64 Transmit (2)

2/24/2006EECS150 Lab Lecture #636 N64 Testing Required Your circuit must work on board reliably Look at our demo… Recommended Testing Build a testbench model of the controller Symmetric Protocol Bits out look like bits in Just a different number of bits Modify your solution…

2/24/2006EECS150 Lab Lecture #637 Reminders Sign-up your group Check out a N64 controller and test it Design review for CP#1 due in lab next week (along with Lab#5) FPGA Tron demo after lab lecture “Real” Tron demo at 4pm Get some ideas for extra credit