R
rajatkmitra@gmail.com
Guest
Hi folks,
I am passing a refernce to an associative array as follows -
=========++==============++===============++=====================
//The following function scans the shadow memory ( this
// is the write array that recorded all prior write
//transactions ).
function bit check_valid( ref write_trans_c shadow_mem[*] );
//int p = 0;
check_valid=1'b0;
//while(p < shadow_mem.size())begin
foreach (shadow_mem[p])begin
if( (shadow_mem[p].row_addr == this.row_addr) &&
(shadow_mem[p].col_addr == this.col_addr) &&
(shadow_mem[p].bank_addr == this.bank_addr) &&
(shadow_mem[p].chip_sel == this.chip_sel) )begin
check_valid=1'b1;
end
//p++;
end
endfunction : check_valid
=========++==============++===============++=====================
This compiles correctly is vcs2006.06 but yields the following error
message in
ModelSim 6.2g
D:\PROJECTS>vlog -sv -f run.f
Model Technology ModelSim SE vlog 6.2g Compiler 2007.02 Feb 21 2007
-- Compiling module queue
** Error: ./verif/read_trans.svh(105): near "shadow_mem": syntax
error, unexpected "IDENTIFIER", expecting ')'
I know that VCS tends to be a lineant about Sys Verilog syntax....But
is what I have the right way ???
Thanks,
Rajat Mitra
Vektor Automation Inc.
I am passing a refernce to an associative array as follows -
=========++==============++===============++=====================
//The following function scans the shadow memory ( this
// is the write array that recorded all prior write
//transactions ).
function bit check_valid( ref write_trans_c shadow_mem[*] );
//int p = 0;
check_valid=1'b0;
//while(p < shadow_mem.size())begin
foreach (shadow_mem[p])begin
if( (shadow_mem[p].row_addr == this.row_addr) &&
(shadow_mem[p].col_addr == this.col_addr) &&
(shadow_mem[p].bank_addr == this.bank_addr) &&
(shadow_mem[p].chip_sel == this.chip_sel) )begin
check_valid=1'b1;
end
//p++;
end
endfunction : check_valid
=========++==============++===============++=====================
This compiles correctly is vcs2006.06 but yields the following error
message in
ModelSim 6.2g
D:\PROJECTS>vlog -sv -f run.f
Model Technology ModelSim SE vlog 6.2g Compiler 2007.02 Feb 21 2007
-- Compiling module queue
** Error: ./verif/read_trans.svh(105): near "shadow_mem": syntax
error, unexpected "IDENTIFIER", expecting ')'
I know that VCS tends to be a lineant about Sys Verilog syntax....But
is what I have the right way ???
Thanks,
Rajat Mitra
Vektor Automation Inc.