Evaluation Criteria For Block-Level Verification in UVM
Evaluation Criteria For Block-Level Verification in UVM
1. Introduction
This report presents the RTL design and functional verification of an 8-bit Ripple Carry Adder
using Verilog. The design consists of multiple full adder modules connected sequentially to
perform binary addition. The implementation was verified using EDA Playground with Aldec
Riviera-PRO simulator.
2. Specifications
Inputs:
Outputs:
Design Architecture
Block Diagram:
3. RTL Code
module full_adder (
output S, // Sum
);
endmodule
module ripple_carry_adder_8bit (
);
full_adder fa0 (
.A(A[0]),
.B(B[0]),
.Cin(Cin),
.S(S[0]),
.Cout(carry[0])
);
genvar i;
generate
full_adder fa (
.A(A[i]),
.B(B[i]),
.Cin(carry[i-1]),
.S(S[i]),
.Cout(carry[i])
);
end
endgenerate
endmodule
4.Testbench Code
module tb_ripple_carry_adder_8bit;
reg [7:0] A;
reg [7:0] B;
reg Cin;
wire [7:0] S;
wire Cout;
ripple_carry_adder_8bit uut (
.A(A),
.B(B),
.Cin(Cin),
.S(S),
.Cout(Cout)
);
// Testbench logic
initial begin
// Test case 1
A = 8'b00000001;
B = 8'b00000001;
Cin = 0;
#10;
$display("A = %b, B = %b, Cin = %b, S = %b, Cout = %b", A, B, Cin, S, Cout);
// Test case 2
A = 8'b11111111;
B = 8'b00000001;
Cin = 0;
#10;
$display("A = %b, B = %b, Cin = %b, S = %b, Cout = %b", A, B, Cin, S, Cout);
// Test case 3
A = 8'b10101010;
B = 8'b01010101;
Cin = 1;
#10;
$display("A = %b, B = %b, Cin = %b, S = %b, Cout = %b", A, B, Cin, S, Cout);
// End simulation
$finish;
end
endmodule
5.Simulation & Verification
Testbench Setup:
6. Simulation Results:
Expected Output:
The design was simulated in Aldec Riviera-PRO. The waveform confirmed correct sum
and carry-out values for different test cases.
The 8-bit Ripple Carry Adder was successfully implemented and verified. The simulation results
matched the expected behavior, confirming the correctness of the design.
Evaluation Criteria for Block-Level Verification in UVM
● Monitor
● Agent
adder_driver drv;
adder_monitor mon;
uvm_sequencer #(adder_transaction) seqr;
● Environment
adder_agent agt;
adder_scoreboard sb;
● Test
class adder_test extends uvm_test;
`uvm_component_utils(adder_test)
adder_env env;
adder_sequence seq;
import uvm_pkg::*;
`include "uvm_macros.svh"
`include "package.sv"
module tb_top;
adder_if vif();
initial begin
uvm_config_db#(virtual adder_if)::set(null, "*", "vif", vif);
run_test("adder_test");
end
initial
begin
$dumpfile("dump.vcd");
$dumpvars();
end
endmodule
● Sequence Item
`uvm_object_utils_begin(adder_transaction)
`uvm_field_int(A,UVM_ALL_ON)
`uvm_field_int(B,UVM_ALL_ON)
`uvm_field_int(Cin,UVM_ALL_ON)
`uvm_field_int(S,UVM_ALL_ON)
`uvm_field_int(Cout,UVM_ALL_ON)
`uvm_object_utils_end
● Sequence
endclass
3. Scoreboarding and Checking (25%)
● Scoreboard
endclass
4. Debugging and Logs (5%)
● Package
import uvm_pkg::*;
`include "uvm_macros.svh"
`include "interface.sv"
`include "transection.sv"
`include "generator.sv"
`include "driver.sv"
`include "monitor.sv"
`include "agent.sv"
`include "scoreboard.sv"
`include "env.sv"
`include "test.sv"
initial
begin
$dumpfile("dump.vcd");
$dumpvars();
end
5. Code Quality and Best Practices (5%)
In this section, the layout of the RTL code has been generated using the OpenROAD software
tool.
#export EQUIVALENCE_CHECK ?= 0
#export REMOVE_CELLS_FOR_EQY = sky130_fd_sc_hd__tapvpwrvgnd*
#export FASTROUTE_TCL =
$(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/fastroute.tcl
#export REMOVE_ABC_BUFFERS = 1
Instructions of the constraint.sdc
current_design ripple_carry_adder_8bit
Power Measurement:
Area Measurement:
Timing Information:
Generated GDS
Conclusions
In this report, the RTL code of 8-bit ripple carry adder has been designed in verilog. The code is
successfully verified with the UVM with 100% test case pass. The design code is further
processed in the openROAD tool to generate its GDS using the gf180 platform. It has shown
that the generated layout consumes 155nW power which occupies 4662 sq. um area. There is
no setup and hold violations.