EDA Playground lets you type in and run HDL code (using a selection of free and commercial simulators and synthesizers).
It's great for learning HDLs, it's great for testing out unfamiliar things and it's great for sharing code.
You can start typing straight away. But to run your code, you'll need to sign or log in. Logging in with a Google account gives you access to all non-commercial simulators and some commercial simulators:
To run commercial simulators, you need to register and log in with a username and password. Registration is free, and only pre-approved email's will have access to the commercial simulators.
205
// Testbench for Full_Adder
`timescale 1ns/1ns
module Test_Full_Adder; // No need for Ports
reg a, b, c; // variables
wire sum, cout; // wires
// Instantiate the module to be tested
Full_Adder FA (a, b, c, cout, sum);
initial begin // initial block
$dumpfile("Test_Full_Adder.vcd");
$dumpvars(1, FA);
a=0; b=0; c=0; // at t=0 time units
#20 a=1; b=1; // at t=20
#20 a=0; b=0; c=1; // at t=40
#20 a=1; c=0; // at t=60
#20 $finish; // at t=80 finish simulation
end // end of initial block
endmodule
xxxxxxxxxx
`timescale 1ns/1ns
module Full_Adder(input a, b, c, output cout, sum);
wire w1, w2, w3;
and #2 (w1, a, b);
xor #3 (w2, a, b);
and #2 (w3, w2, c);
xor #3 (sum, w2, c);
or #2 (cout, w1, w3);
endmodule
Your account is not validated. If you wish to use commercial simulators, you need a validated account.
If you have already registered (or have recently changed your email address), but have not clicked on the link in the email we sent you, please do so. If you cannot find the email, please check your spam/junk folder. Or click here to resend the email.
If you have not already registered for a full account, you can do so by clicking below. You will then need to provide us with some identification information. You may wish to save your code first.
Creating, deleting, and renaming files is not supported during Collaboration. To encourage development of these features for Collaboration, tweet to @EDAPlayground
This playground may have been modified. Please save or copy before starting collaboration.
Your exercise has been submitted.