Error : rror-[IND] Identifier not declared
apb_test.sv, 35
Identifier ‘create_item’ has not been declared yet. If this error is not
expected, please check if you have set `default_nettype to none.
Error-[IND] Identifier not declared
apb_test.sv, 35
Identifier ‘start_item’ has not been declared yet. If this error is not
expected, please check if you have set `default_nettype to none.
Error-[IND] Identifier not declared
apb_test.sv, 35
Identifier ‘finish_item’ has not been declared yet. If this error is not
expected, please check if you have set `default_nettype to none.
//The Below code is my test run_phase
task run_phase(uvm_phase phase);
apb_write_read write_read;
write_read = apb_write_read::type_id::create(“write_read”,this);
The `uvm_do macros are for use inside your sequence body methods.
We do not recommend using these macros and instead use the consistant Sequence API start method which works the same from your test as it does from other sequences.
uvm_do_* Macros will not work in uvm_test. Here you can only use the start method. The reason is if you see below code of uvm_do_on_pri_with which is being ultimately called by all the `uvm_do_* macros.
define uvm_do_on_pri_with(SEQ_OR_ITEM, SEQR, PRIORITY, CONSTRAINTS) \ begin \ uvm_sequence_base __seq; \ uvm_create_on(SEQ_OR_ITEM, SEQR)
if (!$cast(__seq,SEQ_OR_ITEM)) start_item(SEQ_OR_ITEM, PRIORITY);
if ((__seq == null || !__seq.do_not_randomize) && !SEQ_OR_ITEM.randomize() with CONSTRAINTS ) begin
`uvm_warning(“RNDFLD”, “Randomization failed in uvm_do_with action”)
end
if (!$cast(__seq,SEQ_OR_ITEM)) finish_item(SEQ_OR_ITEM, PRIORITY);
else __seq.start(SEQR, this, PRIORITY, 0);
end
Here the start_item and finish_item and create_item function all defined in uvm_sequence_base class. So if you are trying to use this macro while executing sub-sequence or sequence_item in your sequence it will work fine. You may see the declaration of this function here.
Hi
my code with sequence_item(stimulus class) is used in generating sequence, even then i am gettting same errors as mentioned above ,pls guide me through , thnks
error: Top Level Modules:
uvm_custom_install_recording
uvm_custom_install_verdi_recording
top
TimeScale is 1 ns / 10 ps
Error-[IND] Identifier not declared
classes_v/seq_stimulus.sv, 20
Identifier ‘create_item’ has not been declared yet. If this error is not
expected, please check if you have set `default_nettype to none.
Error-[IND] Identifier not declared
classes_v/seq_stimulus.sv, 20
Identifier ‘start_item’ has not been declared yet. If this error is not
expected, please check if you have set `default_nettype to none.
Error-[IND] Identifier not declared
classes_v/seq_stimulus.sv, 20
Identifier ‘finish_item’ has not been declared yet. If this error is not
expected, please check if you have set `default_nettype to none.
Hello Dave
Thank you Dave for your response.No ,actually it was uvm_sequence_item for stimulus,
so i changed seq_stimulus to extend from uvm_sequence and now working ,but is it not possible to inherit a sequence item to create sequences or we need to inherit from uvm_sequence and pass seq_item (or may be the uvm_pkg code is that way), thnks
Because you are using `uvm_do, that hides the fact that it is calling create_item, start_item, and finish_item which are methods of uvm_sequence, not uvm_sequence_item. Only a sequence can send a sequence_item to a driver.