AXI Memory Model class. It is an associate array of Systemverilog. The write transaction can write to the memory and the read transaction can read data from the memory. These two features are implemented in the Slave VIP and Passthrough VIP in runtime slave mode. At the same time, the memory model has backdoor APIs for user to access memory directly. Please refer PG267 section about Simple SRAM Memory Model for more details.
function new( |
| ); |
Constructor to create an AXI slave memory model, ~name~ is instance name.
virtual function void set_bresp_delay_policy( |
| ); |
Sets BRESP delay policy of xil_axi_slv_mem_model.
Returns the current value of the BRESP delay policy of xil_axi_slv_mem_model.
virtual function void set_inter_beat_gap_delay_policy( |
| ); |
Sets RDATA delay policy of xil_axi_slv_mem_model.
Returns the current value of the RDATA delay policy of xil_axi_slv_mem_model.
virtual function void set_memory_fill_policy( |
| ); |
Sets default memory content fill type of xil_axi_slv_mem_model.
Gets default memory content fill type of xil_axi_slv_mem_model.
virtual function void set_default_memory_value( |
| ); |
Sets default memory value of xil_axi_slv_mem_model.
Returns default memory value of xil_axi_slv_mem_model.
function void set_inter_beat_gap( |
| ); |
Sets inter beat gap value of xil_axi_slv_mem_model.
Returns inter beat gap value of xil_axi_slv_mem_model.
function void set_inter_beat_gap_range( |
| ); |
Sets inter beat gap range of xil_axi_slv_mem_model.
function void get_inter_beat_gap_range( |
| ); |
Gets inter beat gap range of xil_axi_slv_mem_model.
function void set_bresp_delay( |
| ); |
Sets BRESP delay value of xil_axi_slv_mem_model.
Returns BRESP delay value of xil_axi_slv_mem_model.
function void set_bresp_delay_range( |
| ); |
Sets BRESP delay range of xil_axi_slv_mem_model.
function void get_bresp_delay_range( |
| ); |
Gets BRESP delay range of xil_axi_slv_mem_model.
function void backdoor_memory_write( |
| ); |
Back door write data to memory.
It will write to the memory with address(addr) with VIP's data_width bits wide data(payload) and data_width/8 bits wide strobe(strb). Default strobe is all on. It will truncate the address if the addr user give is out of range. It will give fatal message if strobe bits is asserted at lower bits than address offset.
function void backdoor_memory_write_4byte( |
| ); |
Back door write data to memory in 4 byte chunks. It will write to the memory with address(addr) with VIP's data_width bits wide data(payload) and data_width/8 bits wide strobe(strb). Default strobe is all on {4{1'b1}}. It will truncate the address if the addr user give is out of range. It will give fatal message if strobe bits is asserted at lower bits than address offset.
function bit[C_AXI_WDATA_WIDTH-1:0] backdoor_memory_read( |
| ); |
Back door read data from the address(addr) of memory.
function bit[31:0] backdoor_memory_read_4byte( |
| ); |
Back door read data from the address(addr) of memory in 4 byte chunks.
function axi_transaction fill_rd_reactive( |
| ); |
Fill in read data channel from memory model.
function void fill_wr_reactive( |
| ); |
Fill in write bresponse channel.
function void write_transaction_to_memory( |
| ); |
Write transaction to memory.
function void pre_load_mem( |
| ); |
load binary file into memory with addr offset 1. open the file,fire error if it doesn't exist 2. get one byte information by $fgetc file error if the file is empty. else,put byte into tmp_data and start to increment byte_cnt 3. once bytes count reach to memory data width,assign tmp_data to memory address with address offset,reset byte_cnt 4. repeat 2.3 till it reach the EOF of the file