Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab: ( NOCHYP (No One Can Hack your Password) Purpose: To write a VHDL code for a four 4-digit HARDWARE password To introduce the use

Lab: (NOCHYP (No One Can Hack your Password)

Purpose: To write a VHDL code for a four 4-digit HARDWARE password

To introduce the use of the push button switches

To introduce the ifelsif.else construct in VHDL

To synthesize, implement and program it on the ALTERA Cyclone IV chip

Equipment:

PC with ALTERA Quartus II tools, DE2-115 board.

Discussion:

A password in hardware is very hard to crack! You are going to use 16 binary switches SW(15-0) to enter a four hex digit password, e.g. 9F6A.

Basically, you select the four password digits on SW(15-0) then press push button

KEY(0) to enter the password. If the correct password is detected the green light comes on. Otherwise, the red light is turned on. SW(17) is used as a reset to clear both the Red and Green LEDs.

Procedure:

Open a project, call it PASSWORD

After you open a project, do the following steps:

Fill in the blanks for entity and architecture.

LIBRARY ieee;

use ieee.std_logic_1164.ALL;

use ieee.std_logic_arith.all;

use ieee.std_logic_unsigned.all;

Entity PASSWORD is port (

SW: in std_logic_vector (__ downto __);--18 switches

KEY: in std_logic_vector (__ downto __);--4 push button KEYs

LEDG: out std_logic_vector (__downto __);

LEDR: out std_logic_vector (__ downto __) -- 2 green LEDs and 2 red LEDs

);

End PASSWORD;

Architecture behavioral of PASSWORD is

Begin

Process(_______, ________)sensitivity list for process (Push Button 0 and slide switch 17)

Begin -- nested IF-THEN-ELSE structures

if _______='1' then -- reset SW(17) high?

_________<='0'; --clear LEDs

_________<='0';

elsif rising_edge(_______) then -- wait for clock (wait for enter)

if SW(___ downto___) = x"????" then -- example of entering a hex value in VHDL

________<='1'; --good password illuminate Green LED

else

_________<='1'; -bad password illuminate Red LED

end if;

end if;

end process;

end behavioral;

Save as PASSWORD.

Import pin assignment, compile, program, and test the design.

Part 2:

Add to your design a message display on the HEX outputs as follows:

GOOD if the password is good

BAD if the password is bad

LIBRARY ieee;

use ieee.std_logic_1164.ALL;

use ieee.std_logic_arith.all;

use ieee.std_logic_unsigned.all;

Entity PASSWORD is port (

SW: in std_logic_vector (__ downto __);--18 switches

KEY: in std_logic_vector (__ downto __);--4 push button KEYs

LEDG: out std_logic_vector (__downto __);

LEDR: out std_logic_vector (__ downto __); -- 2 green LEDs and 2 red LEDs

HEX0: out std_logic_vector (__ downto __); --hex displays

HEX1: out std_logic_vector (__ downto __);

HEX2: out std_logic_vector (__ downto __);

HEX3: out std_logic_vector (__ downto __)

);

End PASSWORD;

Architecture behavioral of PASSWORD is

Begin

Process(_______, ________)sensitivity list for process (Push Button 0 and slide switch 17)

Begin -- nested IF-THEN-ELSE structures

if _______='1' then -- reset SW(17) high?

_________<='0'; --clear LEDs

_________<='0';

elsif rising_edge(_______) then -- wait for clock (wait for enter)

if SW(___ downto___) = x"????" then example of entering a hex value in VHDL

________<='1'; --good password illuminate Green LED

________<=______;--code for G

________<=______;--code for O

________<=______;--code for O

________<=______;--code for D

else

_________<='1'; --bad password illuminate Red LED

________<=______;--code for B

________<=______;--code for A

________<=______;--code for D

end if;

end if;

end process;

end behavioral;

Save as PASSWORD.

Import pin assignment, compile, program, and test the design.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

1. How did you go about making your selection?

Answered: 1 week ago