Forum Discussion

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

Why is the maximum burst count 2 ** (AV_BURSTCOUNT_W-1)

In altera_avalon_mm_master_bfm, when the burst count is greater than 2 ** (AV_BURSTCOUNT_W-1), it will generate a warning. Suppose AV_BURSTCOUNT_W is 4, then the maximum burst count is 15 instead of 8, is this a bug in altera_avalon_mm_master_bfm ?

Here is the relevant code:

if (burst_count < 1) begin

$sformat(message,

"%m: Illegal Burst Count value: %0d - must be >= 1",

burst_count);

print(VERBOSITY_WARNING, message);

end else if (burst_count > 2**(AV_BURSTCOUNT_W-1)) begin

$sformat(message,

"%m: Illegal Burst Count value: %0d - must be <= %0d",

burst_count, 2**(AV_BURSTCOUNT_W-1));

print(VERBOSITY_WARNING, message);

end

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The maximum burst count is 2**(N-1) because that is what Altera defined it to be in the avalon interface specifications (http://www.altera.com/literature/manual/mnl_avalon_spec.pdf).

    This definition is somewhat arbitrary. I would guess Altera chose 2**(N-1) instead of (2**N) - 1 so that the max burst count is an even power of 2.

    To guarantee compatibility between components, you need to adhere to the specification.