Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling - Pdf 31

Bowling Score Keeper

Group 5
Đ ặ n g H ồ n g LU Ậ T
PHAN ĐÌNH ĐÔNG
VŨ VĂN ĐẠI


Click icon to add picture

INTRO
Introduction to Bowling


How we play?


How it work?
- Each time we play, it’s called a game
- Each game has 10 frames
- Each frame has 2 throws (10 pins)
- Frame is scored as the total number of pins knocked down during that frame
- 10 pins down knocked down in 1st throw Strike plus number of pins knocked down next 2 throws
- 10 pins down knocked down in 2nd throw Spare plus number of pins knocked down next throw
- If it’s your last throw, then, you get bonus round(s) for Strike and Spare instead
- Game score is the sum of the number of pins knocked down plus bonuses for strike and spare


Click icon to add picture

Top-level Design

made
Pins
a new
knocked
throws
Down) signal
- UPD
Score
Only
Register
goes
Receive
high
when
AD new
(Add)
throws
signal,have
thenbeen
add Nmade
(Number of pins knocked down) to game score
N Number
of pins
knocked
down
(Score)
UPDGoes
Goes
high
when

Additional
Signals:
- AD 1b binary,
give Score Register ‘add command’ we have to control AD length, so we can control
bonus scores
- CLK Clock signal
- RST Reset signal


Top-level Design


Simulation


Click icon to add picture

Lower-level Design
Designing Lower-level modules
(Controller – APD logic – Score Register – Frame Counter)


APD Logic


Frame Counter


Score Register


x

00

00

00

1

0

x

x

01

01

00

1

1

0

x


01

01

1

0

0

x

01

00

01

1

0

1

x

01

11


0

x

x

x

00

10

10

1

x

x

0

01

10

10

1


01 – 2nd Throw
10 – Bonus
11 – Done

- Bonus






00 – None
01 – Normal
10 – Spare
11 – Strike

- CLR All Bonuses is cleared


Controller
Bonus States
- State





00 – Normal
01 – Spare/Strike 1
10 – Strike 1 + Strike 2


ADD

Next State

00

0

00

00

00

00

0

01

01

00

00

0

10


00

00

00

1

10

00

00

00

1

11

00

00

01

0

00


10

10

01

1

00

00

01

01

1

01

01

00

01

1

10


10

01

10

0

10

10

x

10

0

11

10

11

10

1

00


01

01

11

0

00

00

11

11

0

01

11

01

11

0

10


10

01

11

1

10

10

01

11

1

11

10

01


Controller


Click icon to add picture


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status