Mini Project 3(1)
-
Upload
judy-sim-kim-lai -
Category
Documents
-
view
397 -
download
3
description
Transcript of Mini Project 3(1)
Swinburne University of Technology
Faculty of Science Engineering and Technology
EEE40002- EEE80002 Integrated Circuit Design
Mini Project 3
Casino-Type Game
PURPOSE – In this lab you will design a casino-type game using a random numbergenerator
Part 1: Design of Random Number Generator----------------------------------------------------------------------------PURPOSE – In this section of the laboratory work you will design a Random Number Generator.----------------------------------------------------------------------------1. IntroductionIn many real applications, such as electronic measurements (signature analyzers),communications, random (or better said pseudo random) number generators areneeded. This laboratory is dedicated to designing a random number generator whose block diagram is shown in the figure below:
This circuit is known as an autonomous “ Linear Feedback Shift Register” (LSFR). Inparticular, the circuit presented here is called generic modular LSFR. There are also other types of LSFR’s. It has to be mentioned that this circuit is a pseudo random number generator due to its discrete nature.
In LESR hi is a binary constant, and hi = '1' implies that a connection exists, while hi = '0' implies that no connection exists. Not every binary combination of the vector H is a good one. Usually, the vector H is taken from existing tables for any particular value of n. An encircled '+' symbolizes an XOR gate.
2. Design of a pseudo random number (PRN) generator
You will design a random number generator that can generate different 8-bit numbersequences. The initial conditions are specified in the input “initial conditions” . The input load loads in the initial starting count . If start is set to ‘1’ the then the pseudo random generator generates a ”random sequence” and when start is set to zero it stops and holds on to the last value in the sequence.
Design and implement the PRG using the polynomial P(x) = 1 + x3 + x8. (or using the primitive polynomial = 1 + x2 + x3 + x4 + x8. Verify the operation for different seeds via simulation.
Part 2 Game specification:
You will have to design a game whose specification is as follows: On pressing the Start button the random number generator will start generating numbers. Two hexadecimal digits can represent the eight-bit number, obtained at the output of the generator. When the Roll button is pressed you will compare these two hex digits (or the 4-most significant bits and the 4-least significant bits of the generated number) and declare a win if the sum is 7 or 11, a no-win if the sum is 8, 5 or 13 otherwise the sum is stored in a point register and the player is allowed another attempt. If the new value is equal to the value stored in the point register, then the player wins, else he loses. The output of the game should be driving the two 7-segment LEDs
Hand inVHDL code for part 1 and 2. Including the design code, test bench and simulation results
Ismat Hijazin2015
Pseudo random generator
Initial condition “seedload
Start
Q (8 bits)clock