Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

Burst operation in avalon bfm.

Hi,

I am doing burst write operation using avalon bfm.

For burst operaion shall i need to pass the data and address for all burst or bfm will automatically generate the data and address.

In below task i am only passing base address and the randomized data. But in simulation result I am getting only one data.

Please anyone give me some idea about this.

task automatic mm_send_cfg_write;

input [34:0] addr;

input int data[int];

`MM_BFM.set_command_address(addr << 2);

`MM_BFM.set_command_burst_count(8);

`MM_BFM.set_command_burst_size(8);

`MM_BFM.set_command_init_latency(0);

`MM_BFM.set_command_request(REQ_WRITE);

for(i=0;i<8;i++)

begin

`MM_BFM.set_command_data((data),i);\

`mm_bfm.set_command_byte_enable(4'hf,i);

end

`mm_bfm.set_command_idle(0, 0);

`mm_bfm.set_command_timeout(0);

`mm_bfm.push_command();

while (`mm_bfm.get_response_queue_size() != 1)

@(posedge `mm_bfm.clk);

`mm_bfm.pop_response();

$display("%0t mm traffic generator id configuration write: addr: 0x%h data 0x%h",$time, addr, data);

$display("mm traffic generator id configuration write: addr: 0x%h data: 0x%h", addr, data);

endtask

task data_init(output [31:0] data [int]);

for(i=0; i<8; i++)

data = {$random(), $random()};

endtask

initial

begin

data_init();

mm_send_cfg_write('d0,wdata);

end

Thanks

venkat
No RepliesBe the first to reply