Computer Architecture & Digital Hardware Design (ECD09) : (Practical File)
Computer Architecture & Digital Hardware Design (ECD09) : (Practical File)
Prem kumar
ECE III
2016UEC2135
Index
1. Characterization of Logic Family. Find out logic threshold values and
noise margins. Delay time measurement of inverter using ring
oscillator.
2. Design, model and test using VHDL, a Sign magnitude adder, BCD
incrementor, Gray Counter and LFSR based random number generator.
3. Design model and test using VHDL a single switch and keypad matrix
de-bouncing system.
4. Design and model using VHDL, the following LED multiplexing
schemes: regular LED multiplexing, Charlieplexed LED multiplexing
Experiment 1(A)
Aim: Characterization of Logic Family. Find out logic threshold values
and noise margins.
Apparatus Required:74HC04(NOT
gate),DSO,probes,wires,breadboard,multimeter,power
supply,potentiometer
Theory:
Threshold voltages- Logic gate circuits are designed to input and output
only two types of signals: “high” (1) and “low” (0), as represented by a
variable voltage: full power supply voltage for a “high” state and zero voltage
for a “low” state. In a perfect world, all logic circuit signals would exist at
these extreme voltage limits, and never deviate from them (i.e., less than full
voltage for a “high,” or more than zero voltage for a “low”). However, in
reality, logic signal voltage levels rarely attain these perfect limits due to stray
voltage drops in the transistor circuitry, and so we must understand the signal
level limitations of gate circuits as they try to interpret signal voltages lying
somewhere between full supply voltage and zero.
From the graph:
RESULT:
VIH (High level input voltage) =2.2V
VIL (Low level input voltage) =0.7 V
VOH (High level output voltage) =4.4V
VOL (Low level output voltage) =0.17 V
EXPERIMENT-1(B)
Theory:
A ring oscillator is a device composed of an odd number of NOT
gates in a ring, whose output oscillates between two voltage levels,
representing true and false. The NOT gates, or inverters, are attached
in a chain and the output of the last inverter is fed back into the first.
Observations:
The oscillation frequency of an oscillator can be calculated as :
td=1/2*n*f
which n is number of stages and td is delay time of stages.
RESULT:
Td(avg)=2.1ns
EXPERIMENT-2
AIM: Design, model and test using VHDL, a Sign magnitude adder,
BCD incrementor, Gray Counter and LFSR based random number
generator.
CODE:(A)LFSR:
entity lfsr is
Port ( a : out STD_LOGIC_vector(3 downto 0):="0001";
clk : in STD_LOGIC);
end lfsr;
SIMULATION:
CODE:(B)GRAY COUNTER
entity graycounter is
port( clk :in std_logic;
op :buffer std_logic_vector(3 downto 0));
end graycounter;
end Behavioral;
SIMULATION:
EXPERIMENT-3
AIM: Design model and test using VHDL a single switch de-bouncing
system.
CODE:
entity debounce is
Port (
ip: in std_logic;
clk : in std_logic;
op : out std_logic);
end debounce;
CODE:
entity led is
port ( p : in std_logic_vector(5 downto 0) := "111111" ;
V : in std_logic;
reset : in std_logic := '1' ;
r : out std_logic_vector(2 downto 0));
end led;
component mux1
Port ( in1 : in std_logic; -- mux input1
in2 : in std_logic; -- mux input2
in3 : in std_logic; -- mux input3
in4 : in std_logic; -- mux input4
sel : in std_logic_vector(1 downto 0); -- selection line
dataout : out std_logic); -- output data
end component;
component tbuf1
port( A,EN : in std_logic;
Y : out std_logic);
end component;
begin
p1 : process(p,V,reset)
begin
if ( rising_edge(V) and reset ='1') then
m <= p ;
if (state < 5) then
state <= state + 1;
else
state <= 0 ;
end if;
end if;
end process;
p2 : process(state,m)
begin
case state is
when 0 =>
if state = 0 then
s<="110" ;
c<="001100" ;
end if;
when 1=>
if state = 1 then
s<="110" ;
c<="110000" ;
end if;
when 2=>
if state = 2 then
s<="011" ;
c<="000111" ;
end if;
when 3=>
if state = 3 then
s<="011" ;
c<="001100" ;
end if;
when 4=>
if state = 4 then
s<="101" ;
c<="010011" ;
end if;
when 5=>
if state = 5 then
s<="101" ;
c<="110001" ;
end if;
when others =>
s<= "000";
c<= "000000";
end case;
end process;
end Behavioral;
SIMULATION: