Professional Documents
Culture Documents
Go2UVM For RTL Designers Final
Go2UVM For RTL Designers Final
Go2UVM For RTL Designers Final
DUT
Go2UVM pkg
Go2UVM test
template
Makefile
Srini - VerifWorks, Krishna -
18 07/03/17
Qualcomm
Waves2UVM – a Go2UVM app
• Specifications include timing diagrams
– Formal, unambiguous way to capture timing
• How about converting spec timing diagrams to UVM
Tests?
– Waves2UVM
• Works with popular waveform formats
• WaveDrom – an open-source timing diagram editor
– JSON based description language
– Rendering engine (SVG/PNG)
return txn;
Srini - VerifWorks, Krishna - 31
Qualcomm
Using bus2reg() function
vip_trans#(32,32) txn;
rw.addr
virtual = txn.haddr[0];
function void bus2reg(uvm_sequence_item bus_item,
rw.n_bits = txn.cmd_byte_count*8;
ref uvm_reg_bus_op rw);
rw.byte_en = 4'hf;
if (!$cast(txn,bus_item)) begin
rw.status = UVM_IS_OK;
`g2u_fatal("Provided bus_item not correct type")
return; `g2u_display( “REG_ADAPTER: In bus2reg “)
end end
else end
begin
else if(txn.hresp[0]
if(txn.hresp[0] === AHB_HRESP_ERROR)
=== AHB_HRESP_OKAY) begin begin
rw.kind = UVM_READ;
if((txn.htrans[0] === AHB_HTRANS_NONSEQ) &&
rw.data ====
(txn.hburst txn.hrdata[0];
AHB_SINGLE)) begin
rw.addr = txn.haddr[0];
if(txn.hwrite) begin //write
rw.n_bits
rw.kind = txn.cmd_byte_count*8;
= UVM_WRITE;
rw.byte_en
rw.data = 4'hf;
= txn.hwdata[0];
end rw.status = UVM_IS_OK;
end
else begin // read
end rw.kind = UVM_READ;
endfunction
rw.data = txn.hrdata[0];
end
`G2U_REG_TEST_BEGIN(i2c_g2u_access_policies_test,
i2c_g2u_env)
task main();
`G2U_REG_ACCESS_SEQ(`I2C_REG_BLOCK)
`g2u_display("End of test ")
endtask : main
`G2U_REG_TEST_END
End of test
Srini - VerifWorks, Krishna -
34
Qualcomm
Go2UVM on GitHub
OS UVM
Vault
SVA Traces
35 07/03/17
Srini - VerifWorks, Krishna - Qualcomm
Conclusion and looking forward
• VW’s Go2UVM Package is really simple to use.
• Enables quick start to UVM for Verilog users
• Bridging RTL Designers’ UVM to Verification team’s
UVM
– Reuse of Register models from RTL verification to
full-fledged DV is a big plus!
• Corner case verification using force/release
made easy
• Break
P1800.2
class uvm_default_coreservice_t extends uvm_coreservice_t
virtual function bit get_uvm_seeding()
virtual function void set_uvm_seeding (bit enable)
42
TBD-Simplifying UVM adoption
• First time, Verilog test writers need simple test based stimuli
• Students/budding engineers need quick ramp to UVM
task reset();
`g2u_display(“Start of reset”)
vif.cb.rst_n <= 1'b0;
repeat(10) @ (vif.cb);
vif.cb.rst_n <= 1'b1;
@(vif.cb);
`g2u_display(“End of reset”)
endtask:reset
task main();
`g2u_display(“Start of main”)
@(vif.cb);
vif.cb.rst_n <= 1'b1;
vif.cb.load <= 1'b1;
repeat(2) @(vif.cb);
vif.cb.rst_n <= 1'b1;
vif.cb.load <= 1'b0;