Question: 1 . This exercise refers to the files: XOR 2 gate.sv XOR 2 gate testbench.sv a . After loading these fies into the EDA playground,
This exercise refers to the files:
XORgate.sv
XORgate testbench.sv
a After loading these fies into the EDA playground, run a simulation and include a timing diagram of your simulation in your report.
b Edit the design file and convert the Verilog code to a behavioral model that performs the same function as the structural model. After doing this, run a simulation and include your code and a timing diagram of your simulation in your report.
XOR testbench:reg x x;
reg y;
display variables
initial
$monitor xb xb yb x x y;
instantiate the xorinput module into the test bench
xorinput XORSIM
xx
xx
yy
;
apply input vectors
initial begin
Dump waves
$dumpfiledumpvcd;
$dumpvars xortb;
# xb;
xb;
# xb;
xb;
# xb;
xb;
# xb;
xb;
# $stop;
end
endmodule
XOR sv:module xorinput x x y;
input x x;
output y;
wire xnot, xnot, a a;
not invxnot, x;
not invxnot, x;
and anda x xnot;
and anda x xnot;
or ory a a;
endmodule
This exercise refers to the files:
full adder bit behavioral model.sv
full adder bit behavioral model testbench.sv
a After loading these files into the EDA playground, run a simulation and include a timing diagram of your simulation in your report.
b Edit the test bench file in order to add two more test cases to your simulation after those already shown in your timing diagram you may choose the time at which to initiate these values:
i a ; b ; c ;
ii a ; b ; c ;
This exercise refers to the files:
full adder bit ripple carry behavioral model.sv
full adder bit ripple carry behavioral model testbench.sv
a After loading these files into the EDA playground, run a simulation and include a timing diagram of your simulation in your report.
b Edit the design and test bench files in order to convert the bit adder into an bit adder. Choose four different pairs of values for the a and b operands with cin
i Run a simulation and include your code and a timing diagram of your simulation in your report.
ii For the four sets of values you chose, verify by hand' the addition took place correctly by comparing your timing diagram results with the answers you computed by hand. Make sure to refer to the timing diagram in your report in order to show exactly where your predicted result is computed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
