Activity2 Exploring EDA Playground
Activity2 Exploring EDA Playground
Date: 10/11/2024
Part 1: Given the design and testbench source codes below, perform the following items:
Verilog design code for OR-gate: Verilog testbench code for OR-gate:
module or_gate module tb_or;
reg or_in1, or_in2;
(or_y,or_a,or_b); wire or_out;
or_in1 = 1'b0;
endmodule or_in2 = 1'b0;
#5
$display("A=%d, B=%d, Y=%d",or_in1,or_in2,or_out);
or_in1 = 1'b0;
or_in2 = 1'b1;
#5
$display("A=%d, B=%d, Y=%d",or_in1,or_in2,or_out);
or_in1 = 1'b1;
or_in2 = 1'b0;
#5
$display("A=%d, B=%d, Y=%d",or_in1,or_in2,or_out);
or_in1 = 1'b1;
or_in2 = 1'b1;
#5
$display("A=%d, B=%d, Y=%d",or_in1,or_in2,or_out);
or_in1 = 1'b0;
or_in2 = 1'b0;
#5
$display("A=%d, B=%d, Y=%d",or_in1,or_in2,or_out);
end
endmodule
Log results after run:
This illustrates the signal value at each step when there is a change from the initial value of 0 to 1. It
captures and presents the signal values at each step or timestamp where a change occurs. Starting from
an initial state (such as 0), it records the transitions in signal values (A, B, Y) whenever they switch
between 0 and 1.
The waveform spans from 0s to 45s, showing how the signals change during this time. The signals shown
here appear to take longer durations between transitions. Also, EPWave is likely used to capture
changes in logic or signals over time, and in this particular case, the duration of 45 seconds is used for
observation.
Public link of your playground:
https://www.edaplayground.com/x/cKd6