Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Good Design & Network Audio EECS150 Fall2008 - Lab Lecture #6 Chris Fletcher Adopted from slides designed by Greg Gibeling and Chris Fletcher 10/3/2008 EECS150 Lab Lecture #6 1 Today (1) Good Design FSMs: The Good, Bad and Ugly Interfaces (Part 1) 10/3/2008 Signal Conditioning Administrative Info EECS150 Lab Lecture #6 2 Today (2) Lab #6: Network Audio 10/3/2008 Motivation Network Organization Ethernet Packets Eth2Audio Async FIFO EECS150 Lab Lecture #6 3 Finite State Machines (1) After all we have told you… FSMs seldom lead to efficient circuits The Real Story 10/3/2008 When they are not useful When they are useful How you can tell between the two cases EECS150 Lab Lecture #6 4 Finite State Machines (2) Most FSMs look like… Important properties 10/3/2008 Straight path No complicated branching logic EECS150 Lab Lecture #6 5 Finite State Machines (3) 10/3/2008 It’s a ring counter! Bubble-Arc diagrams don’t necessitate the FSM design pattern EECS150 Lab Lecture #6 6 Finite State Machines (4) Conclusion Think simple A counter is an incredibly powerful circuit On the other hand… Some FSMs look like… (await the very necessary page turn) 10/3/2008 EECS150 Lab Lecture #6 7 Look any different? Complex branching! 10/3/2008 EECS150 Lab Lecture #6 8 Finite State Machines (6) Do not use FSMs when you have… Use FSMs when you have… 10/3/2008 Few branches Linear transitions Many branches Complicated decision logic Conditional transitions EECS150 Lab Lecture #6 9 Signal Conditioning (1) Off-by-a-cycle Errors Adaptors between complex modules 10/3/2008 Shorten a Pulse Lengthen a Pulse Shift a Pulse Simple modification outside module Don’t/Can’t touch module internally EECS150 Lab Lecture #6 10 Signal Conditioning (2) Shorten a Pulse 5 Cycles -> 4 Cycles In Out 10/3/2008 Any guesses? What if we delayed the input? EECS150 Lab Lecture #6 11 Signal Conditioning (3) Shorten a Pulse In In_Delayed Out Out = In & In_Delayed In_Delayed In 10/3/2008 Reg EECS150 Lab Lecture #6 Out 12 Signal Conditioning (4) Lengthen a Pulse In In_Delayed Out Out = In | In_Delayed In_Delayed In 10/3/2008 Reg EECS150 Lab Lecture #6 Out 13 Administrative Info Project starts next friday: 10/10 SVN Repositories 10/3/2008 Digital Oscilloscope! Commit to your partner The first checkpoint is 1 week long Will be online at the end of next week Version-control tutorial on the way EECS150 Lab Lecture #6 14 Lab #6: Network Audio Play Audio off Ethernet A Major Project by Itself 10/3/2008 Receive Ethernet packets Decode and remove header Filter packets Play audio data payload Given: Ethernet, Audio, ETC To be written: Packet Decode & Filtering EECS150 Lab Lecture #6 15 Lab #6: Network Audio Your project and Lab 6 Audio Ethernet Waveform 10/3/2008 Stream audio into oscilloscope Audio Visualizations EECS150 Lab Lecture #6 16 Network Organization (1) Audio Stream TA Station WHITE (0) CaLinx2 10/3/2008 CaLinx2 CaLinx2 CaLinx2 CaLinx2 EECS150 Lab Lecture #6 CaLinx2 CaLinx2 17 Network Organization (2) DO NOT MODIFY THE PRODUCTION NETWORK 10/3/2008 EECS150 Lab Lecture #6 18 Ethernet Packets (1) We’re using raw Ethernet Raw Ethernet: 10/3/2008 No TCP/IP, its too complex Cant use this on the internet 48bit Destination MAC Address 48bit Source MAC Address 16bit Ethernet Type Payload 32bit CRC EECS150 Lab Lecture #6 19 Ethernet Packets (2) Ethernet Packet Format Broadcast Audio Packet 32bits 32bits Destination [47:16] 0xFFFFFFFF Source [47:32] 0xFFFF Source [31:0] Ethernet Type [15:0] 0x0090 0xc2001c50 Reserved [15:0] 0x0101 0x???? PCM Audio Data Sample 0 [31:0] PCM Audio Data Sample 0 [31:0] PCM Audio Data Sample 1023 [31:0] PCM Audio Data Sample 1023 [31:0] 1024words 1028words Destination [15:0] CRC [31:0] 10/3/2008 EECS150 Lab Lecture #6 20 Ethernet Packets (3) A Good Packet 10/3/2008 Total: 1028x 32bit Words 48bit Destination (0xFFFFFFFFFFFF) 48bit Source (0x0090c2001c50) 16bit Packet Type (0x0101) 16bit Padding (0x????) 1024x 32bit PCM Audio Data EECS150 Lab Lecture #6 21 Ethernet Packets (4) A Bad Packet Who knows how long? Source and Destination could be anything Packet Type probably not 0x0101 Coping with bad packets Do NOT send them to AudioTop 10/3/2008 Just keep dropping data until end of packet Done Signal: InPacketValid & InPacketInvalid EECS150 Lab Lecture #6 22 10/3/2008 PHY_RX_CLK (~25MHz) Eth Rx Unit AP_BIT_CLOCK (12MHz) Eth2Audio AC97 Controller AP_SDATA_IN Receive Block Diagram EECS150 Lab Lecture #6 LM4549A Codec Output Shift Register AP_SDATA_OUT Async FIFO32 32b PCM Audio Data Decode & Filter 32b PCM Audio Data MAC Rx Unit 32b Ethernet Packet Data Input Shift Register 4bit Raw Ethernet Data Register LXT975 Ethernet PHY 4bit Raw Ethernet Data ~25MHz Ethernet Clock Lab #6: Eth2Audio (1) 23 Lab #6: Eth2Audio (2) 10/3/2008 Signal Width Dir Description DIn 32 I Data from MAC_Top InValid 1 I Indicates DIn is valid InPacketValid 1 I Indicates the end of a good(crc) packet InPacketInvalid 1 I Indicates the end of a bad(crc) packet EthernetClock 1 I 25MHz Ethernet Clock EthernetReset 1 I EthernetClock sync. Reset AudioClock 1 I 12.288MHz Audio Clock AudioReset 1 I AudioClock sync. Reset DOut 32 O Data out to AudioTop OutRequest 1 I AudioTop requesting a new word OutValid 1 O Indicates DOut is valid EECS150 Lab Lecture #6 24 Lab #6: Async FIFO (3) Buffer to match two data rates Great for data path clock domain crossings 10/3/2008 Write on one clock (WR_) Read on another (RD_) Good place to buffer audio EECS150 Lab Lecture #6 25 Lab #6: Eth2Audio (4) Design No FSMs allowed Word Counter Valid Register Stores whether the packet is valid or not Reset 10/3/2008 How many bits wide? When do you reset word counter and valid register? EECS150 Lab Lecture #6 26 Lab #6: Eth2Audio (5) Testing We give you a very nice testbench Fix your module in simulation You can use ChipScope w/ 1 clock Checkoff 10/3/2008 Read Lab5Testbench.v Read Lab5TestPackets.txt We should hear nice clean audio Show us your module using ChipScope EECS150 Lab Lecture #6 27