Question about uvm_do_with compile error

Hello puneet,

I trying to compile our axi vip with euvm environment and I met following compile error.
It seems that the way I use uvm_do_with method in d-language is different from system-verilog.
I couldn’t find the example of using uvm_do_wiht method at avmm_sha3 testbench.

Could you please share how to use uvm_do_with method and check following code & error log.

Thanks in advance.

code snippet :
sequence item :
class axi_master_cmd_seq_item : uvm_sequence_item
{
mixin uvm_object_utils;

this(string name=“axi_master_cmd_seq_item”) {
super(name);
}

@UVM_DEFAULT {
@rand UBit!MAX_ID_WIDTH a_id;
@rand UBit!MAX_ADDR_WIDTH a_addr;
@rand UBit!8 a_len;
@rand UBit!3 a_size;
@rand UBit!2 a_burst_type;
@rand UBit!1 a_lock;
@rand UBit!4 a_cache;
@rand UBit!3 a_prot;
@rand UBit!MAX_ADDR_WIDTH a_user;
@rand UBit!4 a_region;
@rand UBit!4 a_qos;
@rand uint trans_cmd_delay;
@rand UBit!1 random_avalid;
@rand UBit!1 wait_for_resp;
@rand UBit!1 valid;
uint outstanding_cmd_counter = 0;
}

Constraint! q{
	a_cache == 0x0; a_cache == 0x1;	a_cache == 0x2; a_cache == 0x3;	a_cache == 0x6;	
	a_cache == 0x7; a_cache == 0xA; a_cache == 0xB;	a_cache == 0xE; a_cache == 0xF; 
}a_cache_const;

     override void do_vpi_put(uvm_vpi_iter iter) {
	printf ("iter.put_value %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n", a_id, a_addr, a_len, a_size, a_burst_type, a_lock, a_cache, a_prot, a_user, a_region, a_qos, trans_cmd_delay, random_avalid, wait_for_resp, valid, outstanding_cmd_counter); 
	//uvm_info("SEQ_ITEM", format("iter.put_value"), UVM_MEDIUM);
iter.put_values(a_id, a_addr, a_len, a_size, a_burst_type, a_lock, a_cache, a_prot, a_user, a_region, a_qos, trans_cmd_delay, random_avalid, wait_for_resp, valid, outstanding_cmd_counter);

}

override void do_vpi_get(uvm_vpi_iter iter) {
iter.get_values(a_id, a_addr, a_len, a_size, a_burst_type, a_lock, a_cache, a_prot, a_user, a_region, a_qos, trans_cmd_delay, random_avalid, wait_for_resp, valid, outstanding_cmd_counter);
printf (“iter.get_value %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n”, a_id, a_addr, a_len, a_size, a_burst_type, a_lock, a_cache, a_prot, a_user, a_region, a_qos, trans_cmd_delay, random_avalid, wait_for_resp, valid, outstanding_cmd_counter);
//uvm_info(“SEQ_ITEM”, format(“iter.get_value”), UVM_MEDIUM);
}
}

sequence :

class master_write_cmd_burst_seq : uvm_sequence!(axi_master_cmd_seq_item) {

mixin uvm_object_utils;

this (string name = "master_write_cmd_burst_seq") {
	super(name);
}
@UVM_DEFAULT {
	@rand uint delay; 
	@rand UBit!MAX_ID_WIDTH 	write_cmd_id; 
	@rand uint write_cmd_start_addr;					// UBit!MAX_ADDR_WIDTH
	@rand UBit!8							write_cmd_len;
	@rand UBit!2							write_cmd_burst_type;
	@rand uint							write_cmd_size; // UBit!3
	@rand UBit!1					 		write_cmd_lock;
	@rand UBit!4							write_cmd_cache;
	@rand UBit!3							write_cmd_prot;
	@rand UBit!1							rand_awvalid;
	@rand UBit!1							wait_write_cmd_resp;
	@rand uint write_cmd_addr; //UBit!MAX_ADDR_WIDTH 
	@rand uint	write_cmd_aligned_addr; //UBit!MAX_ADDR_WIDTH
}

override void body() {

 uvm_do_with(req, 
    {req.a_id		== write_cmd_id;
    req.a_addr	== write_cmd_addr;
    req.a_len		== write_cmd_len;
    req.a_burst_type	== write_cmd_burst_type;
    req.a_size		== write_cmd_size;
    req.a_lock		== write_cmd_lock;
req.a_cache		== write_cmd_cache;
req.a_prot		== write_cmd_prot;
req.a_user		== 0;
req.random_avalid	== rand_awvalid;
req.wait_for_resp	== wait_write_cmd_resp;});

}
}

Compile Warning & Error log:

tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(97): Warning: calling esdl.data.bvec._bvec!(false, false, 8LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(98): Warning: calling esdl.data.bvec._bvec!(false, false, 32LU)._bvec.opEquals!
/tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d", 98).opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(99): Warning: calling esdl.data.bvec._bvec!(false, false, 8LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(100): Warning: calling esdl.data.bvec._bvec!(false, false, 2LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(101): Warning: calling esdl.data.bvec._bvec!(false, false, 3LU)._bvec.opEquals!tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d", 101).opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(102): Warning: calling esdl.data.bvec._bvec!(false, false, 1LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(103): Warning: calling esdl.data.bvec._bvec!(false, false, 4LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(104): Warning: calling esdl.data.bvec._bvec!(false, false, 3LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
/tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(105): Warning: calling esdl.data.bvec._bvec!(false, false, 32LU)._bvec.opEquals!
/tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d", 105).opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
/tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(106): Warning: calling esdl.data.bvec._bvec!(false, false, 1LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(107): Warning: calling esdl.data.bvec._bvec!(false, false, 1LU)._bvec.opEquals without side effects discards return value of type bool, prepend a cast(void) if intentional
tb/bfms/axi_vip_d/axi_pkg/axi_master_seq_lib.d(96): Error: template uvm.seq.uvm_sequence_base.uvm_sequence_base.uvm_do_with cannot deduce function from argument types !()(axi_master_cmd_seq_item, void delegate() pure nothrow @nogc @safe), candidates are:
euvm/euvm-1.0-beta9/bin/…/import/uvm/seq/uvm_sequence_base.d(1553): uvm_do_with(string CONSTRAINTS, T, V…)(ref T SEQ_OR_ITEM, V values)
make: *** [top.o] Error 1

I am slightly preoccupied with making a new release. I will take a look at your issue this weekend.