this required a Verilog programming on an FPGA

In this homework you are going to design and implement a simple game on NEXYS 4 DDR FPGAboards. The Boards include eight 7-segments, 16 Switches, 16 LEDs, and (5 2) push buttons asbelow. (CPU RESET and PROG are also push buttons) Fig.1. NEXYS 4 DDR FPGA Game Description: In this game you play the role of a police to arrest a thief. Police’s and thethief’s locations are shown with (XP,YP) and (Xt,Yt) coordinates, where all indexes are in range of[0,15] (inclusive).First you need to initialize the coordinate of police and thief. The thief’s location should be enteredvia the 8 switches (SW[15:8]) and police’s location is entered by other 8 switches (SW[7:0]).• SW[15:12] ==> Xt• SW[11:8] ==> Yt• SW[7:4] ==> XP• SW[3:0] ==> YPAfter you set the switches to the desired locations, the locations of police and thief should be shownin the 7-segments as below. The seven segment #7 shows the X index of the thief’s location and7-segments #6 shows his Y location. The 7-segments #5 and #4 show the police location (Xp,Yp),respectively. All these four 7-segments should show the location in hexadecimal format. Forexample, if the location of thief and police are (14,9), and (3,10), respectively the number that each7-segment should show are:2 .7-segnent #7 ==> E
• 7-segnent #6 ==> 9
• 7-segnent #5 ==> 3 7-segnent #4 ==> A Fig.2. Location of Police and Thief
The game starts by pushing reset button (BTNC). The locations should be loaded in appropriateregisters in your design after BTNC is pushed. Now you can move the police by pushing BTNU(move up), BTND (move down), BTNR (move right), and BTNL (move left). Each push movesthe police one location in the related direction. The number of steps (moves) the police takes should be counted. To do so, there should be a counter in your design that whenever you push one of the BTNU, BTND, BTNR, and BTNL it counts up by 1. This value of this counter should be shown in 7-segment #1 and #0 (in Fig. 2) in decimal format. For example, if the move buttons have been hit for 15 times totally, the 7-segments should be turned on like this:o 7-segnent #1 ==> 1o 7-segnent #0 ==> 5• Not that the thief’s location is constant, but the police’s location should be updated whenever each move happens, and so the related seven-segments needs to be updated accordingly. In fact, the thief location doesn’t change but the police location and the number of moves (number of pushed buttons counter) should be updated dynamically and their 7- segment should show the current status.• In each move, the police can go 1 location to left, right, bottom or up using the push buttons. If Police reaches to the thief location, then game is over. However, you need to follow the following rules:3o The aim is that the police arrest the thief using shortest path or near shortest paths, i..e, if shortest path needs N moves (N times pressing push buttons) for police, then if police reaches to the thief location with at most N 5 push, the police wins and all the LES are blinking with 1Hz frequency. o If the police reaches to the thief’s location with more than N 5 pushes (where N is the shortest path between them), the game is over but with a failure so all LEDs should show turn off.o If police has not reached to the thief’s location yet but the path so far, he moved is more than N 5 then again he fails and all LEDs should turn off.• Note that it is assumed that after starting the moves, the center button and switches are not pushed (you do not need to consider the case that center button is pushed after the first move started).• If the police is on the borders, i.e., Xp = 15, Xp = 0 , Yp = 0, or Yp = 15 and the new movement is towards out of the shown grid in Fig. 3, , the police will stuck in his current position. However, the pushed buttons counter should be increased by 1 by any push (even if not move because of reaching to the boarder). To make it more obvious, suppose that the police is on (15,6), and you push the PTNR, so he cannot go further than 15 and will still in (15,6). See the Fig.3.Fig.3. Stucking in the borderNOTE: You should use ALWAYS BLOCKS in your design and avoid using continuous assignment.Deliverables:• Complete project including all files before and after synthesis.• A report explaining your design.4Useful hints your implementation• Seven-segmentso You have eight 7-segment controlled by AN[7:0] and CA, CB, CC, CD, CE, CF, CG, DP. In practice, AN indicates which 7-segmnets should be enabled. CA, CB, CC, CD, CE, CF, CG, DP are 1 bit each and are transferred simultaneously via a data bus common between all 7-segments (Fig. 4).Fig.4. Data and Enable of 7-segmento At each time, you can enable just one of the 7-segments and get the appropriate data on data bus. To enable one 7-segment, the enable bit of related 7-segment should be 0 and other enable bits should be 1. Based on the following picture turn each segment in one of the 7-segments.Fig.5. The relation of each bit of data bus with the segments.Assume you are going to turn on 7 in 7-segment # 5. First you need to enable this 7-segment by placing AN[5] = 0 and all other AN[i] values to “1”, i.e., AN [7:0] = 8’b11011111. In the next step according to Fig.5, to illustrate number 7, we should activate CA, CB, CC. So, CA, CB, CC all get “0” and CD, CE, CF, and CG get 1. In addition, DP = 1. Therefore, in this case {CA, CB, CC, CD, CE, CF, CG, DP} = 8’b00011111;5Note that to turn on all 7-segments simultaneously, you have to enable each 7-segment one by one and load the related number on it. As this sequence is so fast, human eyes cannot detect that at each time just one 7-segment is on, i.e., all are considered as on. Accordingly, in your design consider 4ms to enable one 7-segment and repeat this for other ones, one by one in a daisy chain. When each 7-segment is on, load the CA, CB, CC, CD, CE, CF, CG, DP with the appropriate value(as shown in Fig. 6).Fig.6. Enabling 7-segmentsFor more information, you can check Section 10.1 in the following link:https://reference.digilentinc.com/reference/progra…• Push ButtonsWhen you push a button, the signal that comes into FPGA is similar to the following figure.Fig.7. Transient signal in push buttonsAs shown, the signal may have a number of glitches that may adversely affect your implementation such that it doesn’t work properly. You need to remove the glitches in the transient step and obtaina signal similar to the one shown Fig.8 and use that signal as needed.6Fig.8. Push button signal after filteringTo remove these glitches, you are to use some filters on push buttons. The filter has been designed and given to you in blackboard (the same folder). So, add Filter.v code in your project and instantiate it in your design as below:The data_in can be any of the push button signals and data_out is its filtered counterpart that you should use in your design. You should instantiate this module 5 times for your 5 push buttons.Note: In addition, you should consider that when you push one of the push buttons, it should show one transition only (related to one move). For the next try (next move of police), you should relax the button and then push it again. To realize this, you can detect the positive edge of a push button signal by the circuit shown in Fig. 9. Then, you can use Signal out as an enable for the police moves.Fig.9. Detecting push button bouncing• Blinking LEDAccording to the game rule, if the police can catch the thief with less than N 6 moves, he wins. In this situation, LEDs should blink. To make a blinking LED, you can design a 27-bit counter (you can design it in behavioral level). The counter is clocked with the system clock (frequency:100Mhz). When the MSB of the counter is “1” the LEDs ca

Calculate your paper price
Pages (550 words)
Approximate price: -

Why Choose Us

Quality Papers

We value our clients. For this reason, we ensure that each paper is written carefully as per the instructions provided by the client. Our editing team also checks all the papers to ensure that they have been completed as per the expectations.

Professional Academic Writers

Over the years, our Acme Homework has managed to secure the most qualified, reliable and experienced team of writers. The company has also ensured continued training and development of the team members to ensure that it keep up with the rising Academic Trends.

Affordable Prices

Our prices are fairly priced in such a way that ensures affordability. Additionally, you can get a free price quotation by clicking on the "Place Order" button.

On-Time delivery

We pay strict attention on deadlines. For this reason, we ensure that all papers are submitted earlier, even before the deadline indicated by the customer. For this reason, the client can go through the work and review everything.

100% Originality

At Graduate Assistants, all papers are plagiarism-free as they are written from scratch. We have taken strict measures to ensure that there is no similarity on all papers and that citations are included as per the standards set.

Customer Support 24/7

Our support team is readily available to provide any guidance/help on our platform at any time of the day/night. Feel free to contact us via the Chat window or support email: support@acmehomework.com.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Graduate Assistants has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

Essays

Essay Writing Services

At Graduate Assistants, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.

Admissions

Admission and Business Papers

Be assured that you’ll definitely get accepted to the Master’s level program at any university once you enter all the details in the order form. We won’t leave you here; we will also help you secure a good position in your aspired workplace by creating an outstanding resume or portfolio once you place an order.

Editing

Editing and Proofreading

Our skilled editing and writing team will help you restructure you paper, paraphrase, correct grammar and replace plagiarized sections on your paper just on time. The service is geared toward eliminating any mistakes and rather enhancing better quality.

Coursework

Technical papers

We have writers in almost all fields including the most technical fields. You don’t have to worry about the complexity of your paper. Simply enter as much details as possible in the place order section.