{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab 5 Report

# Lab 5 Report - P roblem Statement The problem given for...

This preview shows pages 1–3. Sign up to view the full content.

Problem Statement: The problem given for this project was to create a synchronous, sequential machine to function as a device to keep track of a game of screwball. The game was defined where each time the ball was played, either Player 1 scored or Player 2 scored. The game ends when one player is ahead by 2 points. A list of design specifications and assumptions were made below. Design Specifications: The design will be a synchronous, sequential machine. The design needs a reset control to initialize the machine back to the first state. Since the design is synchronous, the flip-flops will have the same clock. Only 1 input will be present, the scoring input. To determine whether Player 1 scored or Player 2. There must be 2 outputs; 1 to indicate someone has one and another to indicate who has won. Design 1 – Moore Design State Definition A Reset B Player 1 ahead 1 point C Player 2 ahead 1 point D Player 1 ahead 2 points – WIN, Reset E Player 2 ahead 2 points – WIN, Reset Table 1 – State Definition Table (Moore) The initial state, State A is the reset state. The player will be ahead by 1 point if they score a point. A state is defined for each player being ahead by 1 point. Same goes for each player being ahead by 2 points. Figure 1 – Moore State Diagram

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The first design is the Moore design. There is one input, x where when x =0, Player 1 scored and if x=1, Player 2 scored. The outputs were (Y, Z) and they determined both if somebody won and who. If there was a 1 for any output, that defined as someone winning. If Y = 1, Player 1 won and if Z=1, Player 2 won. If both Y and Z are 0, neither player has won yet. It is impossible to have the output (1, 1) in this design. State A is the reset state. The score is initially (0, 0). State B is where Player 1 is ahead of Player 2 by one point, the output is still (0, 0). The same is for Player 2 and State C. In State D, Player 1 is ahead of Player 2 by 2 points and wins the game, output (1, 0). Same goes for Player 2 and State E with output (0, 1). This machine works where the start point is State A. If the input is 0, this means that Player 1 scores. The machine will be in State B. If Player 1 scores again (input, x=0) the machine goes to State D. There is an output of (1, 0). Virtually, the machine is reset to State A so if Player 1 scores again, the machine will go to State B. If the current state is State B and Player 2 scores, the machine goes to State A. If both Player 1 and Player 2 alternate scoring points, the machine will be in a loop of State A and State B.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}