VHDL Assignment Final
VHDL Assignment Final
2|Page
CONTENTS
1. INTRODUCTION………………………………………………………………3
2. OVERVIEW……………………………………………………………………..3
3. DESIGN PROCESS…………………………………………………………….4
4. ASSIGNMENT SPECIFICATION………………………………………….5
13. APPENDIX……………………………………………………………………….16
3|Page
INTRODUCTION
OVERVIEW
DESIGN PROCESS
The basic procedure to implement a digital design into hardware using VHDL are
followed as below.
VHDL DESCRIPTION
SIMULATION
SYNTHESIS
IMPLEMNATATION
CONFIGURATION
After completing the design of the system, the next stage is to write a
VHDL code.
VHDL code must be synthesised. Synthesis procedure converts the VHDL
code into series of logical components which in turn can be constructed
into nexys 4 DDR hardware.
Simulation is a way of telling the user how the system behaves before
implementing into hardware, it also gives the user an idea on how the
system will operate.
Next comes the implementation process. This process is mainly
responsible for planning the positions of logical components on chip.
The final procedure consists of configuring the hardware according to
the design the VHDL code has developed. This is done by generating a
coded file which in turn streamed to Nexys 4 DDR Board using
designated programming software.[2]
5|Page
Assignment Specification
Step 1: Current state will be in sc. It prompts the user to enter BTNC push button.
Once pressing this button systems alerts user to enter the lock code sequence.
Hence current state shifts to state_init on pressing BTNC button.
Step 2. A digit will be entered as a binary number on the slider switches. Switches
0 to 3 in nexys 4 DDR is used for this purpose. A second button named BTNC is
triggered which displays first digit on 7 segments display and control further
moves to state_2.
Step 3. Same procedure is followed for remaining 4 digits as mentioned in
step2.At this point of time system will be in state_out which decides whether
the code sequence is correct or wrong
Step 4. If the code sequence is correct, display message of OK and Code
sequence will be displayed alternating at 1 sec time interval.
Step 5. If the code sequence is wrong, display message of Err and Code sequence
will be displayed alternating at 1 sec time interval.
Step 6. At any point of time if the user presses reset button it shifts to current
state (i.e. sc => waits for user to enter BTNU) reverts back to step 1 .
8|Page
SYNTHESIS RESULTS
Figure shows the schematic after synthesizing the vhdl description for
the finite state machine digital lock showcasing all the requirements in
specification in the assignment in one integrated code.
By enhancing the structural style of description where ever possible for
above implemented design ,(for example building components for
comparison ,complex boolean expression,generating random no from
clock divider) results of synthesis would have been more efficient
compared to existing one .
12 | P a g e
As we can see from the above figure it projects the overall utilisation of
on- chip power which is approximately equal to 100 mw.
Since the total on chip power is less (in terms of mw), design is
synthesised efficiently because of using integrated ,structural and RTL
level of description (i.e. mixed style of description ) where ever
required.
Dynamic power accounts 19 % of the total on chip power whereas static
power utilization accounts for 81 % percent
Figure above shows how much power has been power has been utilised
for input and output parameters
13 | P a g e
Case a:
When user enters correct code sequence display message ‘OK’ and code
sequence 42429 gets displayed on 5 digit 7 segment display at 1 sec time
interval .Also leds 0 to 7 will turn on indicating user has entered correct
sequence .
Case b:
When users enters wrong sequence same happens as mentioned in case a
except message Err is displayed instead of message Ok
14 | P a g e
Case c:
If user enters third button ,system generates two random generator in the
range 0 to 4.Here user enters wrong two digits due to which error message
and code sequence will get displayed at 1 sec time interval. Whole process
explained is illustrated below.
15 | P a g e
If I ever get a chance to work on designing complex digital system in future this
basic foundation will help in designing the system in more efficient manner ,hig
speed and also splitting the system into individual blocks where ever possible as
modularity approach helps to locate troubleshoot anywhere in the complete
system.
16 | P a g e
APPENDIX
VHDL CODE
Main source file
17 | P a g e
18 | P a g e
19 | P a g e
20 | P a g e
Displaydriver code