Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Digital Design

Assignment 1

Digital Combination Lock

1 Introduction

The aim of the assignment is to design a combination lock using VHDL and synchronous design techniques, and to implement your design on the FPGA board. The user interface will be simple and based on use of the push buttons, slider switches, LEDs and 7-segment display on the FPGA board.

Part 1 of this assignment (in section 2of this assignment sheet) is identical to lab 4.

1.2 Format of report and submission procedure

The assignment should be written up as a report (an appropriate length would be between 7 and 15 pages, not including any appendices) and submitted through Canvas by Monday 3rd April. The report should include sections on the following:

Introduction and overview

Design organisation

Simulation results (including screen shots from simulations that demonstrate your design

working, accompanied by explanations of what is demonstrated by the simulation).

Synthesis results (including information about how much hardware is used by your

design, whether your design could have fitted into a smaller device than the Artix 7 FPGA on the board, and your opinions about which parts of your design consume the most hardware).

Evaluation and conclusions

The report should be accompanied by a video of approximately 3 minutes length, which explains your main results and how a user would interact with your design.

You should also submit an electronic copy of your Vivado project, including the VHDL and XDC files, through Canvas.

1.2 Mark scheme

Video demonstration 15%

Style, structure and presentation of report 15%

Description of system analysis and design process 15%

Technical achievements in design, implementation and evaluation 40%

Demonstration of originality and creativity 15%

Technical achievement in implementation is based on the quality of your VHDL code. This   includes issues such as legibility of code, use of meaningful variable names, good comments, clear structure, and modifiability of the design. Technical achievement in evaluation is based on the quality of your simulation and synthesis results, how well they have been planned and interpreted.

Originality entails thinking of additional features that can be incorporated into the design that are useful to the user.

2 A simple digital combination lock

The code sequence that you will be required to implement is the last four digits of your student ID number. So, for example, if your ID is 1099562, then your code sequence will be the digits 9,5,6,2.

The user interface will operate as follows:

One of the push buttons will be used to indicate that the user wishes to enter a code sequence.

A digit will be entered as a binary number on the slider switches

Once the digit has been a set up on the slider switches, a second button will be used by the

user to indicate that the first digit is ready to be read.

The user then uses the slider switches and the second push button to enter the remaining

three digits.

If the code sequence is correct, then some suitable visual indication will be given (for

example, you might choose to light up all the LEDs).

3 Timed lockout

We’ve all seen the movies where a combination lock is broken by a piece of electronic equipment that tries many millions of different combinations per second. This can be prevented by, each time a wrong combination is entered, applying progressively longer delays before a new combination can be entered. Modify your design to apply a longer delay each time a wrong combination is opened. The delay should reset to its initial value after the correct password is entered.

4 A more secure solution

We are all accustomed to entering passwords to log in to a service on a computer. One problem with passwords is that someone could look over your shoulder and see what password you are typing. Alternatively, spy software that logs your keyboard activity could be installed secretly onto your computer to intercept your password. Highly secure systems  (like online banking systems) try to deal with this problem by never asking the user to enter the whole password in a single login. Instead they will ask, for example, for the user to enter the 4th and 6th letter in the password. Then the next time the user logs in, a different pair of   letters will be requested.

Modify your combination lock design so that it will request the user to type in two of the digits in the code sequence. The system will prompt the user to show which two numbers should be entered. Each time the user attempts to gain access, the system will make a different choice of which of the numbers in the code sequence must be entered.

The user interface should operate as follows:

A third push button will be used to indicate that the user wishes to be prompted to enter

two numbers from the code sequence.

The system will choose a random number in the range 0 to 4 and display it to the user.

The user enters the corresponding number from the code sequence using the slider switches and the second push button as normal.

The system will then choose a different random number in the range 0 to 4 and display it

to the user. The user enters the corresponding number from the code sequence.

If the two digits are correct, then the system unlocks

There are several possible ways to make a random number generator, but the simplest is to use a very high speed counter that starts counting at the full clock rate of the FPGA as soon as the system is powered up. When the user presses the third push button the counter stops counting. The low order bits of the counter can be regarded as a random number.