Does anyone have an example of an SPI Register Model Adapter? I am aware of the example for AHB Adapter.
SPI-Register Adaptor
UVM Monitor Help!!!!
Hi all,
I have a SPI interface, it has three modes to transfer the data out on IO[0:7]. In SPI standard there is just IO[0] is used. QPI mode, it uses IO[3:0] and In OPI mode, the whole IO are used. When driver receives a req from sequencer, it drives that req to the interface depending on modes. The interface sometimes goes with SPI, sometimes QPI or OPI. And I want to monitor the tx data, but I dont't know how to setup the monitor to sample the data corresponding to the mode that the driver has used. Are there ways to make monitor works in the same mode with the driver?
Thank you!
how to write more than one register using read and write functions
Hi,
I am using uvm standard register model , register adapter (bus2reg & reg2bus) to send and receive transaction to ral model and DUT.
and it is working fine if i do single read and write.(means i perform the 32 bit read n write using reg.read(status,address,data)reg.write(status,address,data))
My challange is that i have to perform the more than 32 bit transaction which performs the read and write on multiple registers,
If there any way to use the same reg.read/write method to perform more than one register
Noob question about how to add configurability to a test.
Hello everyone,
I'm fairly new to the verification using UVM. I've watched a bunch of lectures about the UVM methodology from the MentorGraphics website, and implemented a simple UVM test for a simple FIFO I designed. Currently, this test has no configurability and that is the next step I'd like to take to get to know UVM better.
The FIFO is pretty simple, with 1 write and 1 read port, full and empty flags, and a reset. In my test all data and read/write flags are generated randomly, but I want to change that in order to be able to be me who says when to write, when to read and what to write.
am not very familiar with the concept of inheritance but I get the idea. Because of that, I haven't got any class that is extended from any of my own classes.
My question is where should I get started to add some configurability to the test?
Should I make several configuration classes and have general sequence/monitor/agent classes that get a configuration and do what they are supposed to by having big classes that interpret those configurations
OR
Should I have several smaller sequence/monitor/agent classes, each one doing a different thing, and have a simple configuration object indicate to the test which sequence/monitor/agent classes to override/use
OR
somehow a mix of both
Any suggestions or resources about configurability are welcome!
I stink at writing test plans.
Every time I sit down to write down my test plan, I simply feel as though I'm regurgitating my design requirements. I've been through the Mentor Coverage Cookbook a few times already; It has a UART and a couple other things. Does anyone know other good examples / explanations of test plans?
Everybody writes one of these things... right?
My example "function":
Receive an ARP request; generate an ARP reply. The destination IP of the ARP must match the DUT IP in order for DUT to generate reply.
What line item(s) would I write in my "test plan"?
ARP request received by DUT Type: covergroup, cross
ARP reply sent by DUT Type: covergroup, cross
This is where I get really wrapped around the axle. I already know what I sit down to write the test, I am going to simply randomize an ARP packet, and bombard my DUT. It will receive ARP Replies (which it should drop), ARP Request addressed to someone else (drop this as well), and occasionally a Request with the correct address (accept and reply).
I definitely want coverpoints on all the non-supported behavior as well, but I take it that's not supposed to be mentioned in the test plan anywhere? The whole point of constrained random stimulus generation is to find the bugs you aren't looking for, and it must be paired with a coverage collector to tell you where your blind sheep has wandered.
phase jump to function phases
Hi.
in UVM, It is legal to have phase jump to any function phases. but it seems in below demonstration code it does not work as I expected. I expected the flag build_agt2 = 1 after the phase.jump(build_phase).
class mycomponent extends uvm_component;
.......
bit build_agt2;
function void build_phase(uvm_phase phase);
`create_agt1();
if ( build_agt2)
`create_ag2() ; or
// `override_agt1_by_agt2();
endfunction
task run_phase;
// change flag build_agt2 to 1;
endtask
function void phase_ready_to_end;
// if the imp phase is in shutdown_phase
// then phase.jump to build_phase
endfunction
cloning a register
Hello,
I am running a simulation on a DUT that has a register model.
what i wish to do is hold a copy of that register model so that at certain times during the simulation
i can compare a current value of a register to a former value of that register taken at a previous point in time.
i don't want to save only the data of the registers, but an array of registers that will hold a copy of the whole register object,
including all of it's fields and other attributes.
i tried to create an array of type uvm_reg uvm_reg registers_copy[]
and then use clone to copy a register to that array $cast(registers_copy[i], registers[i].clone());
but i get an error:
UVM_FATAL /tools/snps/vcs/current/etc/uvm-1.1/reg/uvm_reg.svh(3102) @ 3520.6ns: reporter [RegModel] RegModel registers cannot be cloned
how can i create a copy of my register model at certain points in time?
Thanks for your help,
Assaf
Multiple +uvm_set_severity are ignored
Hi,
UVM supports changing UVM severity (Fatal/Error/…) to new desired one from command line using +uvm_set_severity:
+uvm_set_severity=<comp> ,<id> ,<current severity> ,<new severity> --
I’ve tried it and it works fine with one setting (+uvm_set_severity)
However, I’ve tried to change severity of several paths/IDs (by specifying +uvm_set_severity several times) – and it didn’t work. Seems that only the 1st one is accepted and others are ignored)
Example:
+uvm_set_severity=uvm_test_top.producer_agent.monitor,ERR_TIMEOUT_ID1,UVM_ERROR,UVM_WARNING +uvm_set_severity=uvm_test_top.consumer_agent.monitor,ERR_TIMEOUT_ID2,UVM_ERROR,UVM_WARNING
Is it UVM known limitation or a bug ?
BTW, using widcard (*) indeed works well, but I wish to have better controlability (set severity of 2 different IDs in 2 different <comp>/path)
Regards, Ofir
Relevant code in uvm_component.svh :
function void uvm_component::m_set_cl_sev; // _ALL_ can be used for ids or severities // +uvm_set_severity=<comp>,<id>,<orig_severity>,<new_severity> // +uvm_set_severity=uvm_test_top.env0.*,BAD_CRC,UVM_ERROR,UVM_WARNING static string values[$]; static bit first = 1; string args[$]; uvm_severity orig_sev, sev; if(!values.size()) void'(uvm_cmdline_proc.get_arg_values("+uvm_set_severity=",values));
Am I done testing yet? A (fun!) coverage question..
I want to verify the following behavior:
"DUT shall only accept command A, and reject all others while in the Powerup state. While not in Powerup, accept all commands"
This is the state of the DUT following a reset.
Option 1 - No covergroup
After a reset, send all commands that are NOT A, followed by command A. If the scoreboard doesn't fail, then I'm good to go.
Option 2 - Covergroup
Have a monitor hanging off an agent that, when it detects a command is written, it crossed the state of the DUT with the command being written.
With option 1, I have no coverage metric that the test was even performed. However, I can very quickly write a test, and it doesn't require any components. The integrity of the test is paramount here.
With option 2, I've got to use a bound virtual interface to access the state bits of the DUT, and also build a coverage collector.
-------------------------------------------------------------------------------------------------------------------
My heart wants to simply define my coverage model entirely via covergroups, and then generate stimuli until I meet 100%.
My brain, however, says no, no... don't verify that you sent the sequence Cmd A -> Cmd C -> Cmd E -> Cmd A, just write a directed test that does that.
Thoughts?
UVM Monitor help!!!
Hi all,
I have a SPI interface, it has three modes to transfer the data out on IO[0:7]. In SPI standard there is just IO[0] is used. QPI mode, it uses IO[3:0] and In OPI mode, the whole IO are used. When driver receives a req from sequencer, it drives that req to the interface depending on modes. The interface sometimes goes with SPI, sometimes QPI or OPI. And I want to monitor the tx data, but I dont't know how to setup the monitor to sample the data corresponding to the mode that the driver has used. Are there ways to make monitor works in the same mode with the driver?
Thank you!
How to set verbosity for uvm_object (not component)?
Is there a command-line command to change the verbosity for a uvm_object (like a configuration object)?
For components, I use:
+uvm_set_verbosity=test_top.env.myagent.*,_ALL_,UVM_DEBUG,run
I want to leave the entire testbench verbosity as sv_medium, except for one object of the following class. Not being a component, it's not in the component hierarchy.
class plb_agent_configuration extends agent_cfg_base #(plb_transaction); `uvm_object_utils( plb_agent_configuration ) virtual interface plb_driver_bfm driver_bus; virtual interface plb_monitor_bfm monitor_bus; function new( string name = "" ); super.new( name ); endfunction virtual task access(inout TRANS_T txn); driver_bus.access(txn); endtask virtual task monitor(inout TRANS_T txn); monitor_bus.monitor(txn); endtask virtual task wait_clk(input uint32_t num); monitor_bus.wait_for_clk(num); endtask virtual task wait_rsp(); while (monitor_bus.cb.RspFlag_i!=1) @monitor_bus.cb; `uvm_info(report_id, "response!", UVM_DEBUG) endtask endclass
controlled transition from one phase to another
Hi,
As per my understanding, connect_phase does not start until all build_phase do not complete.
How is this mechanism controlled?
I did not find anything in uvm reference manual about this.
Please let me know if there is any.
Thanks.
extracting data from uvm_do_with macro
Hello,
let's say i have a sequence, in this sequence i'm reading data using the uvm_do_with macro.
an example would be a read transaction in an APB agent.
how do i extract the data from it?
PARTIAL CODE:
UVM Sequence Help
Hi all,
I am experiencing a problem with sequence/sequencer. I think that the problem is inside the sequence
class Sequence0 extends uvm_sequence #(Packet); function new(string name = "Sequence0"); super.new(name); `uvm_info(get_full_name(), "Sequence new()",UVM_LOW); endfunction : new Packet item; `uvm_sequence_utils(Sequence0, Sequencer) virtual task body(); forever begin `uvm_info(get_full_name(), "Sequence build()",UVM_LOW); `uvm_do_with(item,{da.size == 6;}); end endtask : body endclass : Sequence0
The compilation works; on the other side the run phase shows a
"UVM_FATAL ./sequence_macsec_tx.sv(11) @ 0: uvm_test_top.t_env.Seqncr@@Sequence0 [DCLPSQ] \$unit ::\Sequence0::m_set_p_sequencer uvm_test_top.t_env.Seqncr.Sequence0 Error casting p_sequencer, please verify that this sequence/sequence item is intended to execute on this type of sequencer"
I inserted on purpose the `uvm_info and the last message that I get is Sequence new() as stated in line 5.
Do you have any idea about the above error?
Thanks in advance
uvm_builtin_reg_test_seq & default sequences
uvm_config_db#(uvm_object_wrapper)::set(this, "*.m_reg_agent.m_seq_reg.main_phase", "default_sequence", uvm_builtin_reg_test_seq::type_id::get());
UVM_FATAL @ 39990: reporter@@seq [SEQ] neither the item's sequencer nor dedicated sequencer has been supplied to start item in seq
uvm_mem_mam request/reserve region size
Is there some good reason that the n_bytes argument to uvm_mem_mam request_region() and reserve_region() are unsigned ints and not unsigned longints?
It seems inconsistent with the address "offset" arguments/attributes which *are* longints (or bit [63:0]) and obviously it prevents allocation of regions larger than 2**32-1.
Perhaps this could/should be fixed in a future release?
Or is there some subtlety I'm missing.
Thanks.
Walker
Different flow for uvm_recorder usage in uvm_component between UVM1.1 and UVM1.2
Hi, All:
I noticed that there are some differences in the usage for uvm_recorder between UVM1.1 and UVM1.2. That made me a little confusion when trying the transaction recorder for verdi. Here is some example code for m_begin_tr task inside the uvm_component.
For UVM 1.1:
Does anyone konw about this? Maybe I misunderstand the usage. Can anyone help to explain this? Thanks!
using uvm_config_db::get inside a module
Hi,
can i use uvm_config_db::get function from inside a module?
i want to create a configuration object in the test, set it at the config_db and get it in a VIP written as a module.
something like this:
module vip();
uvm sequence for slave implementation
Hello,
I'm trying to implement an AXI Slave VIP and have few questions regarding the implementation.
In this case, the DUT is the master. The AXI Slave checks the interface for valid read /write signals and performs a read/write operation from a memory model. It returns back the write response/read data back to the DUT.
1. Since this is a slave VIP , do I need a slave sequence which runs forever sending transactions to the driver ? This is similar to the UVM example where the monitor and sequencer are connected by an analysis port and the sequence calls the peek function to check if a valid transaction is available from the monitor.
(OR)
2. Can I skip the sequence/sequencer part and just connect my monitor and driver using an analysis port and pass on the observed transaction from the monitor to the driver for further action ?
(OR)
3. Im thinking of a 3rd alternative of just using the monitor to the observe the interface and drive back the write response/ read data back using the monitor itself and leave the driver empty.
Please let me know your valuable thoughts and suggestions.
Thanks,
Madhu
How to file a bug?
Hi all,
I think I have located a bug in the uvm_tlm2_generic_payload class and I would like to file it. I did follow the instructions in this document:
http://accellera.org/images/community/uvm/Reporting_bugs_enhancement_requests_UVM_Apr2014.pdf
Is this still the recommended way of filing a bug?
/JSA