Title: ECE 491 Senior Design I
1ECE 491 - Senior Design I
- Lecture 13 - ASM Diagrams
- Fall 2004
Prof. John NestorECE DepartmentLafayette
CollegeEaston, Pennsylvania 18042nestorj_at_lafayet
te.edu
2Announcements
- 2 tutors needed for Junior Electronics - contact
Prof. Wey if interested - Registration for Spring 2005
- Advising available Friday 11-130, Monday 11-2
- Online registration starts Tuesday
3Where we are
- Last Time
- Discuss Lab 5 - Manchester Code transmitter
- Drivers and Receivers
- Today
- More about Lab 5 - Test Circuit
- ASM Diagrams - an alternative to bubble and
arrow diagrams
4Reiew - Manchester Code
0
1
1
1
0
0
idle
idle
Manchester
cell
- Note addition of idle value - neither 1 or 0
5Lab 5 - Manchester Transmitter
6Manchester Transmitter Operation
7Testing Your Design
- Step 1 Self-Checking Testbench
- Single byte
- Multiple byte (with no gaps)
- Step 2 Hardware in FPGA
- Inputs allow transmission of 1-4 bytes
- Instantiate with design on S3 board
8Hardware Test Module
Available at foghorn.cadlab.lafayette.edu/ece491/e
xamples/mxtest.v
9ASM Diagrams
- ASM Algorithmic State Machine
- A flowchart notation for state machines
- Motivation
- High-level description of clock-cycle level
behavior - Alternative to traditional state diagrams
- Easier to read for large diagrams
- Prevents inconsistent diagram specifications
- More concise than Verilog code
Christopher R. Clare, Designing Logic Using
State Machines, McGraw-Hill, 1973
10Flavors of ASM Diagrams
- Low-level
- Cycle-by-cycle timing
- Detailed specification of input / output values
- Equivalent to standard state diagram
- Register-Transfer Level
- Cycle-by-cycle timing
- Abstract operations (can map directly to low
level)
11ASM Elements
12Describing an ASM State
Note all other outputs are 0!
13State Description w/ Complex Branches
State Diagram Equivalent (Fill In)
14ASM Diagram Pitfall
- Conditional output boxes specify values
- Conditional output boxes dont specify sequence
15ASM Example - Successive Approximation Circuit
16ASM Example - Successive Approximation Circuit
17ASM Example
- ASM Diagram for Successive Approximation Circuit
18Example MIPS Multicycle Design
19Example MIPS Multicycle Design
20Multicycle Control - ASM Diagram Part 1
21Multicycle Control -ASM Diagram Part 2
22Multicycle Control -ASM Diagram Part 3
2
3
4
RTEX
BR
ALUSrcA 1 ALUSrcB 00 ALUOp 10
ALUSrcA 1 ALUSrcB 00 ALUOp
01 PCWriteCond PCSource 01
RTWB
RegDst 1 RegWrite MemtoReg 0
0
0
23Register-Transfer Level ASM Diagrams
- Key idea
- Use same notation as regular ASM
- Instead of outputs, write register transfers
- Advantages
- Plan complex designs before details are nailed
down - Estimate resource costs by counting operations in
each state
24Multicycle Control - ASM Diagram Part 1
25Multicycle Control -ASM Diagram Part 2
26Multicycle Control -ASM Diagram Part 3
27ASM Homework
- Due Thursday 10/28/04
- Create a bubble and arrow state diagram of your
receiver design FSM - Create an ASM diagram of your receiver design FSM
- Draw and label neatly for full credit
28Coming Up
- Synchronization Issues with Multiple FSMs
- Manchester Receiver Design
29Ethernet
- Connects computers in a local area network
- Computers communicate on shared wires (ether)
- Distributed control
- Information passed as packets
30Packet Format
- Preamble - used for synchronization
- Destination address - where packet is going
- Source address - where packet is from
- Data
- Error checking - CRC code
Preamble
Src Addr
Dest Addr
Data
CRC
31Mechanisms
- Carrier detection - detects when data is being
sent - Interference detection - detects collisions
- Packet error detection - CRC check
- Truncated packet filtering
- Collision consensus enforcement
32Where Were Going - WimpNet 2004
- Scaled-down Ethernet interface
- Medium twisted pair
- Encoding Manchester
- Details to follow, but based on the experimental
ethernet described in the Metcalfe Boggs paper
33Course Map