Beruflich Dokumente
Kultur Dokumente
1
UTKARSH 2K9
National Institute of Science & Technology
INTRODUCTION
2
SHAHBAZ AND ASHRAF ADIL
UTKARSH 2K9
National Institute of Science & Technology
System requirements
Softwaretools
FPGA board
Laser
Ldr
SPARTAN 3 LASER
LDR
1.Control segment.
2.Teams
3.Receiver and displayer.
12/08/21 5
System diagram
S
R L S
S
D U L L S S
D
I S
D U L L S S
S
P
S S S
D U L L L
A
D U L L S S Y S
L
L S S
D U
12/08/21
WORKING OF THE SENSOR
LDR
CORESSPONDI
NG CIRCUIT
SOURCE
12/08/21 7
--Library declaration Buzzer code
library IEEE;
use IEEE.std_logic_1164.all;
--Entity declaration
entity quizbuzzer is
port (
reset: in STD_LOGIC;
team: in STD_LOGIC_VECTOR (4 downto 0);
buz: out STD_LOGIC_VECTOR (4 downto 0)
);
end quizbuzzer;
--Architecture
architecture quizbuzzer of quizbuzzer is
begin
process(reset,team)
variable active:std_logic;
begin
if(reset='1')then
buz<="00000";
active:='1'; 8
12/08/21
elsif(active='1' and team="00001")then
active:='0';
buz<="00001";
elsif(active='1' and team="00010")then
active:='0';
buz<="00010";
elsif(active='1' and team="00100")then
active:='0';
buz<="00100";
elsif(active='1' and team="01000")then
active:='0';
buz<="01000";
elsif(active='1' and team="10000")then
active:='0';
buz<="10000";
end if;
end if;
end process;
end quizbuzzer;
Code ends 9
12/08/21
--Library declaration Code for marking scheme
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.std_logic_unsigned.all;
--Entity declaration
entity \quiz marking scheme\ is port(
clk: in std_logic;
reset : in STD_LOGIC;
t1 : in STD_LOGIC_VECTOR(1 downto 0);
t2 : in STD_LOGIC_VECTOR(1 downto 0);
t3 : in STD_LOGIC_VECTOR(1 downto 0);
t4 : in STD_LOGIC_VECTOR(1 downto 0);
t5 : in STD_LOGIC_VECTOR(1 downto 0);
m1 : inout STD_LOGIC_VECTOR(4 downto 0);
m2 : inout STD_LOGIC_VECTOR(4 downto 0);
m3 : inout STD_LOGIC_VECTOR(4 downto 0);
m4 : inout STD_LOGIC_VECTOR(4 downto 0);
m5 : inout STD_LOGIC_VECTOR(4 downto 0)
);
end \quiz marking scheme\;
12/08/21 10
--Archtecture declaration
architecture \quiz marking scheme\ of \quiz marking scheme\ is begin
process(reset,clk,t1,t2,t3,t4,t5,m1,m2,m3,m4,m5)begin
if(reset='1')then
m1<="00000";
m2<="00000";
m3<="00000";
m4<="00000";
m5<="00000";
--Incrementing
elsif(clk'event and clk='1' and t1(1)='1')then
m1<=m1+"00001";
elsif(clk'event and clk='1' and t2(1)='1')then
m2<=m2+"00001";
elsif(clk'event and clk='1' and t3(1)='1')then
m3<=m3+"00001";
elsif(clk'event and clk='1' and t4(1)='1')then
m4<=m4+"00001";
elsif(clk'event and clk='1' and t5(1)='1')then
m5<=m5+"00001";
11
12/08/21
--Decrementing`
end if;
end process;
13
12/08/21
Technology schematic
14
12/08/21
Simulation result
15
12/08/21
UTKARSH 2K9
National Institute of Science & Technology
ADVANTAGES
Completely wireless
Fully portable
Reprogrammable as per user requirement
Cost efficient
High accuracy.
16
17
12/08/21