Complete the project with the same software as last time​,thx!

User Generated

Zlfgvp007

Computer Science

Description

Complete the project with the same software as last time,thx!

============================================

The objective of this lab is to apply the knowledge presented in class by building more complex circuits using combinational and sequential logic. You will be building the logic to implement a game inspired by Whac-a-Mole. You will need to determine if the mole is successfully “whacked”, keep track of the score, and modify the score according to the rules.

Unformatted Attachment Preview

Lab 2: Whack-A-“Mole" Due Sunday, 3 February 2019, 11:59 PM Minimum Submission Requirements Ensure that your Lab2 folder contains the following files (note the capitalization convention): Lab2.lgi README.txt Commit and push your repository O O Lab Objective The objective of this lab is to apply the knowledge presented in class by building more complex circuits using combinational and sequential logic. You will be building the logic to implement a game inspired by Whac-a-Mole. You will need to determine if the mole is successfully "whacked”, keep track of the score, and modify the score according to the rules. Game Play A light will illuminate at random intervals (the “mole") and the user will have to press the "whack” button while this light is on. The score will be adjusted as such: +1 point: user successfully whacks mole -1 point: user pressed button to whack when light is not illuminated The score will be stored as a 4-bit two's complement number in a 4-bit register. Specification Template Build your lab starting with the template file provided on Canvas. The template file contains the user interface (page 1) and logic to generate the mole (page 2). DO NOT MODIFY THE FIRST OR SECOND PAGES except for your name, CruzID, and placeholder comment indicating if you implemented the extra credit (described later). Replace “Y/N” with Y if you implemented the extra credit, and N if you didn't. Additional wires and logic circuits shall be drawn on subsequent pages. Remember to rename the template file to Lab2.1gi before committing to your repository. The blank pages of the template are labeled with the components that should be drawn on that page, e.g. "Whack Check and Score Adjustment,” “4-bit Adder.” You may use as many pages as needed to keep your circuits looking legible. Inputs Reset Resets the score, normally off Initialize Initializes the mole, normally on Enable Turns on the mole logic, normally off Whack Used to "whack” the mole, normally off Outputs Register Value Raw value from the register storing the score, displayed as 4-bit two's complement Signed Decimal Score Human readable score, i.e. two's complement score converted to a sign and magnitude. E.g. if register value is F (1111 as binary or -1), sign would have the middle segment illuminated to show “_” and the magnitude would display “1”. (Hint: If the number is negative, display the additive inverse and a negative sign.) Mole Light signifying the mole Screenshot Elab2_template_19wi_cmpe012.Igi Register Value (signed) Decimal Score Lab 2 Last Name, First Name CruzID Sign Magnitude smo reg3 sms Reset reset regz PUSH son 4 regl >score >sam3 score2 Initialize initia rego PUSH >sanz score soml scoreo Enable enable sono Whack whack PUSH Extra Credit Implemented: Y/N Whack when mole lights up mole How to play: 1. Press "Reset" to initialize score 2. Press "Initialize" to start the mole 2. Toggle "Enable" switch to 1 (on) 3. Press 'Whack" when the mole lights up Do not modify this page other than your name, CruzID, and Y or N in Extra Credit comment Figure 1: Lab 2 Template Extra Credit Add functionality that prevents the score from going beyond the specified boundaries (+7 and -8). Make sure +7 is the maximum allowed value, and -8 is the minimum allowed value. If you choose the extra credit route, modify "Y/N” in the comment on the first page stating “Extra Credit Implemented: Y/N” to “y” if you implemented the extra credit and "N" if you didn't. Top Level Here is a top-level block diagram of the game. whack check / score adjustment 4-bit adder Score limit logic (extra credit) mole logic 4-bit register display logic ? 0 0 8.8 Whack Initialize Enable Reset Register Value Decimal Score user interface Figure 2: Top Level Diagram Notes For the register, use D flip-flops, and make sure they are edge triggered with a clear line. You may NOT use the counter, mux or ALU objects provided in MML. USE DON'T USE HOAIO @ ALTIMO fgo国司回应90 苗会 Flip Flop Properties 0]90 000 € JA SOOI I. - + Q 0.060O Style Reset Set OK 1542 ( D 101 0. CER Cancel Data Latch ( 9 Help Clocked Reset Set 6 Master Slave Reset Set Master Slave Data Latch Preset/Clear Lines Edge Triggered JK Figure 3: MML Palette For your convenience, here is a tabular description of how flip-flop with clear line works. You may also find practice_flipflop.lgi handy for understanding how flip-flops set and reset. Examples of how to hook up the D flip-flop is included in practice_flipflop.lgi. This flip flip will initialize to 1 after pushing "Initialize" Sanit PRE 0 1 PUSH Initialize PUSH init PUSH >init This flip flip will initialize to 0 after pushing "Initialize" Figure 4: Flip-flop Usage Example
Purchase answer to see full attachment
Tags: 1 CS
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Her...


Anonymous
Just what I needed. Studypool is a lifesaver!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags