Академический Документы
Профессиональный Документы
Культура Документы
College of Engineering
Machine Problem 7
I. OBJECTIVES
2. Computer System
3. cmd Application
The module is the basic building block for modelling hardware with the Verilog HDL.
The logic of a module can be described in any one (or a combination) of the following
modelling styles:
Gate-level (structural) modelling describes a circuit by specifying its gates and how
they are connected with each other. Dataflow modelling is used mostly for describing
the Boolean equations of combinational logic. Behavioural modelling that is used to
describe combinational and sequential circuits at a higher level of abstraction.
Combinational logic can be designed with truth tables, Boolean equations, and
schematics; Verilog has a construct corresponding to each of these classical” approaches
to design: user-defined primitives, continuous assignments, and primitives. There is one
other modelling style, called switch-level modelling.
It is sometimes used in the simulation of MOS transistor circuit models, but not in logic
synthesis.
1. Write the HDL gate level description of the given combinational circuit.
V. SOURCE CODE
Experiment7a
input [0:3]X;
assign F1 = ((~X[1]&X[2])|(~X[3]))+(~((~X[1]&X[2])|(~X[3])));
assign F2 = ((~X[1]&X[2])|(~X[3]));
endmodule
module experiment7a_tb;
reg [0:3]X;
initial
begin
$dumpfile("experiment7a.vcd");
$dumpvars(0,E);
$display ("------------------------------------");
$display ("------------------------------------");
$display ("------------------------------------");
$display ("------------------------------------");
X=4'b0000;
repeat(15)
#1 X=X+4'b0001;
//$finish;
end
endmodule
Experiment7b
output [5:0] Y;
assign Y[5]=(A==B);
assign Y[4]=(A!=B);
assign Y[3]=(A>B);
assign Y[2]=(A<B);
assign Y[1]=(A>=B);
assign Y[0]=(A<=B);
endmodule
module tb_experiment7b;
reg [3:0]A,B;
wire[5:0]Y;
experiment7b N(A,B,Y);
initial
begin
$dumpfile ("experiment7b.vcd");
$dumpvars;
$display("|
===============================================================
==========|");
$display("|
===============================================================
==========|");
#0 A=0; B=0;
#5 A=0; B=1;
#5 A=1; B=0;
#5 A=1; B=1;
#40
$finish;
end
endmodule
Combinational logic circuits in Verilog can be done using gate-level model. The format is
the same as the activity 5 where the Boolean expression of the circuit is used as the input
for the output. For the second exercise, dataflow model is used to get for the output of the
given combinational circuit. The different outputs are defined using different conditions
like equal, not equal, less than or equal, greater than or equal, less than, and greater than.
The output for dataflow is displayed as the binary of TRUE or FALSE.
VIII. CONCLUSION
Getting the output of a combinational logic circuit can be done in multiple ways, two of
which is using gate-level model and dataflow model. In conclusion, the three objectives
in this activity were met as the Verilog hardware descriptive language is capable of doing
combinational circuit analysis with multiple outputs.
College of Engineering
Date of Revision: Date of Effectivity: Endorsed by: Noted by: Approved by:
January 2017 June 2017 Shiella Marie Garcia Joel R. Palacol CQI Lorena C. Ilagan
Department Chair Officer College Dean
Alabang
-Zapote Road, Pamplona 3, Las Piñas City,
Metro Manila 1740, PHILIPPINES
www.perpetualdalta.edu.ph • +63(02)
-06-39
871
College of Engineering
All required All required 75% of the 50% of the 25% of the
output is output is required output required output required output
PRINTED printed, printed, is printed and is printed is printed
OUTPUT readable, well readable and readable
(CO1 & CO2) presented, neat well presented
and with
pleasing
(X2)
designs.
Date of Revision: Date of Effectivity: Endorsed by: Noted by: Approved by:
January 2017 June 2017 Shiella Marie Garcia Joel R. Palacol CQI Lorena C. Ilagan
Department Chair Officer College Dean
Alabang
-Zapote Road, Pamplona 3, Las Piñas City,
Metro Manila 1740, PHILIPPINES
www.perpetualdalta.edu.ph • +63(02)
-06-39
871
College of Engineering
The student The student The student The student The student
was able to was able to was able to was not able to was not able to
identify and identify and identify the discuss clearly discuss the
explain the explain the keywords and the keywords, developed
keywords, keywords, and statements used and statements program.
statements and statements used
OBSERVATIO in the used in the
values used in in the
N the developme developme nt of developme nt of developme nt
(CO2) nt of the codes. the codes. Very the program the program.
Very clear, but with
clear, complete and insufficient
(X2)
complete straight to the support
and with point.
sufficient
support.
The student The student The student The student The student
was able to was able to was able to was able to was not able to
attain all the attain all the attain 75% of attain 50% of attain any
objectives. objectives. the objective the objectives objectives.
CONCLUSION Discussed Very clear and
(CO3) and is written and is not Conclusions
with clarity, complete.
well. written well. were not
complete, is
(X2) written well.
written well
and with
sufficient
support.
The laboratory The laboratory The laboratory The laboratory The laboratory
report follows report follows report follows report does not report does not
APPEARANCE follow the
AND the given the given the given follow the
format, format, format but is given format given format.
PRESENTATI and
O N OF complete, complete and not organized Untidy and
is not
LABORATORY organized and organized. and with with incomplete
organized and
REPORT neatly incomplete contents.
have
presented. contents.
incomplete
(X2) contents.
Date of Revision: Date of Effectivity: Endorsed by: Noted by: Approved by:
January 2017 June 2017 Shiella Marie Garcia Joel R. Palacol CQI Lorena C. Ilagan
Department Chair Officer College Dean
Alabang
-Zapote Road, Pamplona 3, Las Piñas City,
Metro Manila 1740, PHILIPPINES
www.perpetualdalta.edu.ph • +63(02)
-06-39
871
College of Engineering
TOTAL
SCORE
Comment(s):
______________________________________________________________________________
______________________________________________________________________________
Date of Revision: Date of Effectivity: Endorsed by: Noted by: Approved by:
January 2017 June 2017 Shiella Marie Garcia Joel R. Palacol CQI Lorena C. Ilagan
Department Chair Officer College Dean