仿真代写 | EEC 018 DIGITAL SYSTEMS I SUMMER 2020

这个作业是用仿真软件设计实现一个骰子游戏
EEC 018 DIGITAL SYSTEMS I SUMMER 2020
LAB 6: DESIGN PROJECT

Objective: In this lab, you will design a die game called 15. The object of the game is to score
exactly 15 points in as few rolls of the die as possible. After each roll, the player can choose to
add the current die value to his or her score or not, unless the die value is six, in which case it is
automatically added to the player’s score. If the player’s score exceeds 15, the player loses. If the
player’s score is equal to 15, the player wins. Play continues until the player reaches or exceeds
15 points.
Description
To start the game, the player resets the system using the reset switch. The score will be set to
zero and both the Win and Lose LEDs will be turned off. The player then rolls the die by placing
the Rb switch in the Roll position. The die counter should operate with a clock frequency of 50
MHz so that the player cannot control the outcome of a roll. After about a second or more, the
player restores the Rb switch to its off position to end the roll. (You can use a pushbutton or a
slide switch for Rb. However, it is important that the switch is debounced. The slide switches on
the DE10-Lite board are not debounced.) The Turn Counter should be incremented to indicate
that the player has taken a roll. If the player rolled a six, it is automatically added to his or her
score. Otherwise, the player can toggle the Add switch to add the die value to his or her score or
the player can toggle the Pass switch to leave the score unchanged. After each roll, the score will
be greater than, less than or equal to 15. If the score is equal to 15, the player wins – the Win
LED should be turned on and remain on until the system is reset for a new game. If the score is
greater than 15, the player loses – the Lose LED should be turned on and remain on until the
system is reset. Once the player has won or lost, the player cannot roll the die again until the
system is reset. (The Rb switch will not have any effect in these states.) If the score is less than
15, the player will roll again. After each roll, the player toggles either the Add switch or the Pass
switch (unless a six is rolled) before the die can be rolled again. Play continues until the player’s
score equals or exceeds 15.