Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you please draw a state diagram and an ASM chart for air hockey please. Here is the description below You will design an electronic
Can you please draw a state diagram and an ASM chart for air hockey please. Here is the description below You will design an electronic game of airhockey that takes two players to play and
implement it on FPGA device. You will be asked to demonstrate your implementation on
FPGA device.
The playground is dimensional x area. You will use LEDs ie LD to LD from right to
left and left to right and a seven segment display SSD to simulate the moving puck in X
and Y axis, respectively, on FPGA. A puck moving from right to left is simulated as LEDs
illuminating one after another starting with LDie LD illuminates the leftmost column,
then LD LD etc. It is basically a moving light SSD will display the Ycoordinate of the
puck in decimal form.
Assume that we have two players: A standing on the left hand side and B on the right hand
side. The players will act using left and right buttons BTNL and BTNR Before the players
start playing, a player will take the first turn using hisher button. Then, the initial score will
be shown in the corresponding SSDs SSDSSD as for second. Then, the score
will disappear. Assume that, player A takes the first turn. After the initial score was displayed,
LD will turn on to show an input is waited from the player A Player A will give the Y
coordinate and the direction which she wants to send the puck using hisher sliding switches
SWSW for Ycoordinate and SWSW for the direction Then, she will press
hisher button to send the puck and the puck will start moving. At the same time, LD will
turn off because no input is waited from player A The speed of the puck will be
secondstep After seconds, the puck will arrive to the rightmost column. When, the puck
arrives the rightmost column, player B must hit the puck. In order to inform player B when
an input is expected from himher LD will turn on When or before the puck arrives to the
rightmost column, player B must adjust the hisher SWs SWSW for Ycoordinate and
SWSW for the direction according to the Ycoordinate of the puck and the direction that
she wants to send the puck. Then, she must push hisher button to hit the puck and the puck
will start going from right to left. When, she hits the puck, LD will turn off. Then, the same
procedure will be done by player A And so on
When a player cannot hit the puck in a second either she does not press hisher button or Y
coordinate is invalid the other player will win the turn. In this case, the current score will be
displayed and LDLD will turn on for a second. Then, the player who lost the previous turn,
will start the next turn.
When a player scores goals, she will win the game. In this case, the score in score SSDs
and the winner Ycoordinate SSD will be displayed. And LDLD will blink with second
period.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started