11_Simulate_Verilog_code_Fall24v1
11_Simulate_Verilog_code_Fall24v1
Click on Login
Page 1 of 5
You can log in with your Google account.
You will see the following web interface.
You need to insert your Verilog code for your design in design.sv tab. You can try the following code
for the 2-input XOR gate. Note that a statement starting with // indicates a comment.
module xor_2_to_1 (input wire A, B,
output wire Y);
endmodule
To verify the functionality of your design you need to apply a stimulus to the inputs. To do that you
need to insert your testbench code in testbench.sv tab.
//Design (Unit Under Test (UUT)) is instantiated as component (sub-system) of the testbench
// UUT port map
//Syntax is UUT_name instance_name (.port1_name(signal1_name, .port1_name(signal1_name)…);
xor_2_to_1 U1 (.A(A), .B(B), .Y(Y));
Page 2 of 5
//Stimulus
initial
begin
#200; //wait for 200ns
$dumpfile("dump.vcd"); //needed for EDA Playground
$finish; //Stop the simulation
end
endmodule
Page 3 of 5
Select the SystemVerilog/Verilog as the chosen language from Languages & Libraries. Select the
simulator Aldec Riviera Pro 2022.04 from the Tools & Simulators option. Select Open EPWave after
run so that functional simulation (timing diagram) can be opened within the web browser. Make sure
the pop-up blocker in your browser is disabled.
Page 4 of 5
The functional simulation should be opened as shown below.
Project Link
https://edaplayground.com/x/8Z2f
Page 5 of 5