06 CSL38 Manual LD
06 CSL38 Manual LD
06 CSL38 Manual LD
f(a,b,c,d)=∑m(2,3,4,5,13,15)+dc(8,9,10,11)
Theory
The term multiplex means “many to one”. A multiplexer (MUX) has n inputs. Each line is used to shift
digital data serially. There is a single output line.
ABC
D
Circuit Diagram
0 04 D0 Vcc 16
03 D1 GND 8
1
02 D2
01 D3
15 D4
O/p
14 D5 Y5
` 13 D6
D
12 D7
9 10 11
7 STROBE S2 S1 S0
Low
A B C
Procedure:
1. Verify all components & patch chords whether they are in good condition or not.
2. Make connections as shown in the circuit diagram.
3. Give supply to the trainer kit.
4. Provide input data to circuit via switches.
5. Verify truth table sequence & observe outputs.
2. a. Realize a full adder using 3-8 decoder IC and 4 input NAND.
Components used: IC 74 LS138, IC 74LS20, patch chords, power chords, trainer kit.
Function table
A B C S C
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Circuit Diagram
Procedure:
1. Verify all components & patch chords whether they are in good condition or not.
2. Make connections as shown in the circuit diagram.
4. Give supply to the trainer kit.
3. Provide input data to circuit via switches.
4. Verify truth table sequence & observe outputs.
VHDL
VHDL stands for Very High Speed Integrated Circuit Hardware Description Language. It describes
the behavior of an electronic circuit or system, from which the physical circuit or system can then be
implemented
• It supports hierarchy.
• It provides design portability and flexible design methodologies: top down, bottom up or mixed
• Nominal Propagation delays, min-max delays, setup and hold timing constraint and spike detection can
be described in this language.
It is one of most popular software tool used to synthesize VHDL code. This tool includes many steps. To
make user feel comfortable with the tool the steps are given below:-
Select NEW PROJECT in FILE MENU.
Enter following details as per your convenience
Project name : sample (should be same as the entity name in
your VHDL code
Project location : C:\example( As per convenience use default
Top level module : HDL
In NEW PROJECT dropdown Dialog box, Choose your appropriate device specification. Example is
given below:
Device family : cyclone
Device : EP1C6Q240
Package : PQFP
Pincount : 240
Speed grade :8
On File Drop down menu choose new Vhdl file
Type the Vhdl code
Under the Processing Drop down menu choose Start compilation
If there are errors go back to the VHDL code and correct it. Once the compilation is successful
Under the processing drop down box select simulator tool select the simulator mode to functional and
click on generate functional simulation netlist. we Get the success message.
Under simulator tool click on open. In the empty location right click . Click on insert on NODE or BUS.
Then click on NODE finder. In the window opened select pins to unassigned. Click on List. IT will list all
the Net list select all and click ok.
The input and output appears give appropriate input.
On the simulator tool click on start simulation. Simulation success message will be prompted
On simulator tool click on report to see the output.
'U' - uninitialized
MULTIPLEXER
I 8 TO 1 Zout
8
3
TruthTable
INPUTS SEL OUTPUTS
SEL (2) SEL (1) SEL (0) Zout
0 0 0 I(0)
0 0 1 I(1)
0 1 0 I(2)
0 1 1 I(3)
1 0 0 I(4)
1 0 1 I(5)
0 1 1 I(6)
1 1 1 I(7)
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity mux1 is
Port ( I : in std_logic_vector(7 downto 0);
sel : in std_logic_vector(2 downto 0);
zout : out std_logic);
end mux1;
architecture Behavioral of mux1 is
begin
zout<= I(0) when sel="000" else
I(1) when sel="001" else
I(2) when sel="010" else
I(3) when sel="011" else
I(4) when sel="100" else
I(5) when sel="101" else
I(6) when sel="110" else
I(7);
end Behavioral;
2. b. Write the verilog/ VHDL code for FULL ADDER. Simulate and verify its
working.
X
S
FULL
Y
ADDER
Cout
Z
Truth Table
INPUTS OUTPUTS
X Y Z SUM CARRY
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Expression: Sum(S)=X Y Z
Carry(Cout) = XY +YZ + ZX
VHDL code for Full adder using data flow
library IEEE;
use IEEE.STD_LOGIC_1164.ALL
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY fa IS
Port (X, Y, Z : in STD_LOGIC;
Cout, S : out STD_LOGIC);
End fa;
ARCHITECTURE df OF fa IS
Begin
Cout<= ((X and Y) OR (y AND z) or (z and x);
S<= (X XOR Y) XOR Z;
End df;