0% found this document useful (0 votes)
67 views

Digital Logic Lab 1: Sequential

This document describes a digital logic lab experiment to simulate a full adder circuit using both sequential and concurrent statements in VHDL. The lab includes code to implement the full adder with sequential if/else statements and concurrent case statements, as well as testbench code to verify the outputs. Both implementations result in the same transistor-transistor logic (TTL) schematic due to the binary ordering of the statements.

Uploaded by

Anchit Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Digital Logic Lab 1: Sequential

This document describes a digital logic lab experiment to simulate a full adder circuit using both sequential and concurrent statements in VHDL. The lab includes code to implement the full adder with sequential if/else statements and concurrent case statements, as well as testbench code to verify the outputs. Both implementations result in the same transistor-transistor logic (TTL) schematic due to the binary ordering of the statements.

Uploaded by

Anchit Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Digital Logic Lab 1

Aim To simulate a Full Adder using both sequential and concurrent statements.

Sequential
Code
Process(I1,I2,I3)
begin
if I1='0' and I2='0' and I3='0' then SUM <='0'; CARRY <='0';
elsif I1='0' and I2='0' and I3='1' then SUM <='1'; CARRY <='0';
elsif I1='0' and I2='1' and I3='0' then SUM <='1'; CARRY <='0';
elsif I1='0' and I2='1' and I3='1' then SUM <='0'; CARRY <='1';
elsif I1='1' and I2='0' and I3='0' then SUM <='1'; CARRY <='0';
elsif I1='1' and I2='0' and I3='1' then SUM <='0'; CARRY <='1';
elsif I1='1' and I2='1' and I3='0' then SUM <='0'; CARRY <='1';
elsif I1='1' and I2='1' and I3='1' then SUM <='1'; CARRY <='1';
else SUM<='0';CARRY<='0';
end if;
end Process;

Waveform

TTL Schematic

Concurrent
Code
SUM <= '0' when I1 ='0' and I2='0' and I3='0' else
'1' when I1 ='0' and I2='0' and I3='1' else
'1' when I1 ='0' and I2='1' and I3='0' else
'0' when I1 ='0' and I2='1' and I3='1' else
'1' when I1 ='1' and I2='0' and I3='0' else
'0' when I1 ='1' and I2='0' and I3='1' else
'0' when I1 ='1' and I2='1' and I3='0' else
'1' when I1 ='1' and I2='1' and I3='1' else
'0';

CARRY <= '0' when I1 ='0' and I2='0' and I3='0' else
'0' when I1 ='0' and I2='0' and I3='1' else
'0' when I1 ='0' and I2='1' and I3='0' else
'1' when I1 ='0' and I2='1' and I3='1' else
'0' when I1 ='1' and I2='0' and I3='0' else
'1' when I1 ='1' and I2='0' and I3='1' else
'1' when I1 ='1' and I2='1' and I3='0' else
'1' when I1 ='1' and I2='1' and I3='1' else
'0';

Waveform

TTL Schematic

Test bench Code


I1<='0';
I2<='0';
I3<='0';
wait for 100 ns;
Other cases are similarly added

Conclusion
As the order of the statements is same (binary order) both sequential ,concurrent statements result
in the same TTL Schematic. In more complex cases generally Sequential commands result in a circuit
with a larger delay than an equivalent concurrent code. The implementation was tested using the
testbench and the obtained waveform confirms the correctness of the implemented Full Adder

You might also like