O código abaixo em SV/UVM está produzindo um erro de compilação do VCS mostrado após o código.
typedef enum int {
ABC,
DEF,
GHI,
. . .
} enum_t
class some_test #(type T=uvm_test) extends T;
`uvm_component_param_utils(some_test#(T))
bit assoc_array[3][enum_t];
//bunch of tasks and functions here
task run_phase(uvm_phase phase);
int index;
//Below wait inside some fork-join and begin-end blocks
//index calculated
assoc_array[index].delete(); //Compiler OK here
assoc_array[index][DEF] = 1; //Compiler OK here
//some more forked threads
wait(assoc_array[index].exists(ABC) && (assoc_array[index][ABC]==1)); //COMPILER ERROR
endtask
endclass
O erro é:
Error-[DTINPCIL] Dynamic type in non-procedural context
"wait ((this.assoc_array[index].exists(ABC) && (this.assoc_array[index][ABC] == 1))) ;"
Argument: this.assoc_array[index]
Structure containing dynamic data and/or used in dynamic arrays may not be
used in non-procedural context.
Não entendo por que este é um contexto não processual. Tem alguma coisa a ver com o teste ser um teste parametrizado? Estou fazendo essas "extensões" para obter herança múltipla. Eu vi isso em um blog de Tudor Timi intitulado "Fake it Until You Make It - Emulando herança múltipla no System Verilog", embora seu exemplo tenha alcançado outra coisa e definitivamente não estivesse em um teste parametrizado.
Em algum outro pacote de teste, também tenho este trecho de código:
typedef some_test #(some_basic_test) better_test;