VERILOG DESIGN AND TESTBENCH USING EDA PLAYGROUND 

EDA Playground is a cloud-based online simulator that enables engineers and students to write, simulate, and debug Verilog designs without installing any software. It provides a user-friendly interface and supports various Verilog simulators like Icarus Verilog (IVL), ModelSim, and Verilator. This guide walks through the process of designing and verifying Verilog code using EDA Playground with Icarus Verilog 12.0 and visualizing waveforms in EPWave.


🔹 Steps to Get Started on EDA Playground

1️⃣ Login and Creating a Project


🔹 Setting Up the Simulator

2️⃣ Selecting the Icarus Verilog 12.0 Simulator


🔹 Writing Verilog Code and Testbench

3️⃣ Writing Verilog Design Code


Example: A simple Full Adder in Verilog.
 

module full_adder (

    input a, b, cin,

    output sum, cout );


    assign sum = a ^ b ^ cin;

    assign cout = (a & b) | (b & cin) | (a & cin);


endmodule



4️⃣ Writing Testbench Code

Example Testbench:


module tb_full_adder;

    reg a, b, cin;

    wire sum, cout;


    // Instantiate Full Adder

    full_adder FA (.a(a), .b(b), .cin(cin), .sum(sum), .cout(cout));


    // Dumpfile for waveform

    initial begin

        $dumpfile("waveform.vcd");

        $dumpvars(0, tb_full_adder);

    end


    // Test cases

    initial begin

        $monitor($time, " A=%b B=%b Cin=%b | Sum=%b Cout=%b", a, b, cin, sum, cout);


        a = 0; b = 0; cin = 0; #10;

        a = 0; b = 1; cin = 0; #10;

        a = 1; b = 0; cin = 1; #10;

        a = 1; b = 1; cin = 1; #10;


        $finish;

    end

endmodule


🔹 Compiling and Running the Simulation

5️⃣ Setting Compile Options

In the "Compile Options" field, enter:
-Wall -g2012


6️⃣ Running the Simulation


🔹 Viewing Waveforms in EPWave

7️⃣ Opening the Waveform Viewer



BECL606 VLSI DESIGN AND TESTING LAB - PART A


BASIC GATES

https://edaplayground.com/x/gPQL 


1 BIT FULL ADDER

https://edaplayground.com/x/9Jpd 


2 BIT FULL ADDDER USING TWO- 1 BIT FULL ADDER

https://edaplayground.com/x/VtTb 


4 BIT ADDER - TYPE 1 - BEC606 EXP1

https://edaplayground.com/x/gdU6 


4 BIT ADDER - TYPE 2 - BEC606 EXP1

https://edaplayground.com/x/vFxc 


4- BIT SHIFT AND ADD MULTIPLIER - BEC606 EXP2

https://edaplayground.com/x/meht 


32-BIT ALU USING IF STATEMENT - BEC606 EXP3

https://edaplayground.com/x/BSZz 


32-BIT ALU USING CASE STATEMENT - BEC606 EXP3

https://edaplayground.com/x/dMxW 


D Flip- Flop - BEC606 EXP4

https://edaplayground.com/x/Vn6T 


SR Flip- Flop - BEC606 EXP4

https://edaplayground.com/x/N_h3

4-Bit Mod N Counter - BEC606 EXP5
https://edaplayground.com/x/MKkv 


4- Bit Carry Look Ahead Adder - Additional Experiment

https://edaplayground.com/x/Tq67 


4-bit Full Adder Gate Level Implementation

https://edaplayground.com/x/Titc 


UNDERSTAND BLOCKING PROCEDURAL ASSIGNMENTS WITH EXAMPLE

https://edaplayground.com/x/Nqh9 


UNDERSTAND NON-BLOCKING PROCEDURAL ASSIGNMENTS WITH EXAMPLE

https://edaplayground.com/x/rqdS