[Xcelium flow] Clean DPI void function import (#2222)

This commit is contained in:
CoralieAllioux 2024-06-12 09:45:33 +02:00 committed by GitHub
parent 367fe5850a
commit 28e94e5ce3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View file

@ -27,7 +27,7 @@ import uvm_pkg::*;
`define READ_ELF_T
import "DPI-C" function void read_elf(input string filename);
import "DPI-C" function byte get_section(output longint address, output longint len);
import "DPI-C" context function read_section_sv(input longint address, inout byte buffer[]);
import "DPI-C" context function void read_section_sv(input longint address, inout byte buffer[]);
`endif
module ariane_tb;
@ -132,7 +132,7 @@ module ariane_tb;
if (binary != "") begin
`uvm_info( "Core Test", $sformatf("Preloading ELF: %s", binary), UVM_LOW)
void'(read_elf(binary));
read_elf(binary);
// wait with preloading, otherwise randomization will overwrite the existing value
wait(clk_i);
@ -142,7 +142,7 @@ module ariane_tb;
automatic int num_words = (len+7)/8;
`uvm_info( "Core Test", $sformatf("Loading Address: %x, Length: %x", address, len), UVM_NONE)
buffer = new [num_words*8];
void'(read_section_sv(address, buffer));
read_section_sv(address, buffer);
// preload memories
// 64-bit
for (int i = 0; i < num_words; i++) begin

View file

@ -16,7 +16,7 @@ import "DPI-C" function byte read_symbol (input string symbol_name, inout longin
`define READ_ELF_T
import "DPI-C" function void read_elf(input string filename);
import "DPI-C" function byte get_section(output longint address, output longint len);
import "DPI-C" context function read_section_sv(input longint address, inout byte buffer[]);
import "DPI-C" context function void read_section_sv(input longint address, inout byte buffer[]);
`endif

View file

@ -55,7 +55,7 @@ package uvme_cva6_pkg;
import config_pkg::*;
import "DPI-C" function void read_elf(input string filename);
import "DPI-C" function byte get_section(output longint address, output longint len);
import "DPI-C" context function read_section_sv(input longint address, inout byte buffer[]);
import "DPI-C" context function void read_section_sv(input longint address, inout byte buffer[]);
// Default legal opcode and funct7 for RV32I instructions
bit [6:0] legal_i_opcode[$] = '{7'b0000011,

View file

@ -51,14 +51,14 @@ task uvme_axi_fw_preload_seq_c::body();
void'(uvcl.get_arg_value("+elf_file=", binary));
if (binary != "") begin
void'(read_elf(binary));
read_elf(binary);
wait(p_sequencer.cntxt.axi_vi.clk);
// while there are more sections to process
while (get_section(address, len)) begin
automatic int num_words0 = (len+7)/8;
`uvm_info( "Core Test", $sformatf("Loading Address: %x, Length: %x", address, len), UVM_HIGH)
buffer = new [num_words0*8];
void'(read_section_sv(address, buffer));
read_section_sv(address, buffer);
// preload memories
// 64-bit
for (int i = 0; i < num_words0; i++) begin

View file

@ -280,7 +280,7 @@ module cva6_tb_wrapper import uvmt_cva6_pkg::*; #(
if (binary != "") begin
void'(read_elf(binary));
read_elf(binary);
wait(clk_i);
last_load_address = 'hFFFFFFFF;
@ -289,7 +289,7 @@ module cva6_tb_wrapper import uvmt_cva6_pkg::*; #(
automatic int num_words0 = (len+7)/8;
`uvm_info( "Core Test", $sformatf("Loading Address: %x, Length: %x", address, len), UVM_LOW)
buffer = new [num_words0*8];
void'(read_section_sv(address, buffer));
read_section_sv(address, buffer);
// preload memories
// 64-bit
for (int i = 0; i < num_words0; i++) begin