This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AHB-lite Slave Burst Operation

Hi all,

I am trying to optimize the throughput of an AHB-lite slave by taking advantage of INCR4, INCR8, INCR8 burst transactions from the master (only issues SINGLE, INCR4/8/16). The slave is running at half of the bus speed but with double the read width so I am trying to perform prefetch by generating the next addresses locally instead of sampling the HADDR on the bus when HREADY is high. 

Is this safe?

Only sampling the begin haddr during the non-seq/burst add phase. Insert initial waitstate, self generate subsequent addresses and then internally align the data output such all subsequent data outs are aligned without required additional wait states.

Are there any signals that I should qualify at every cycle (or at least when hready is HIGH) to ensure that the slave response is still valid and related to the transactions of the master? Or it is ok to just go ahead ?

Thanks in advance.

Parents
  • The main thing to check is that HTRANS doesn't signal BUSY cycles in the middle of the defined length burst, as they will stall the burst progression, so will delay when the prefected read data is needed. So check HTRANS sampled on HCLK rising edges when HREADY is high to confirm it follows the expected NONSEQ-SEQ-SEQ-SEQ... sequence for the length of burst expected.

    One problem you might face (again HTRANS related) is that Early Burst Termination can still occur, so you might not see the HBURST indicated number of transfers completed. This can happen when you have arbitration logic selecting which of multiple masters in your system is allowed access to your slave (usually implemented in a multi-layer BusMatrix). As this arbitration logic might switch part way through a burst, your slave might see only 5 beats of an INCR8 burst completed before a new master starts accessing the slave.

    So nothing wrong with prefetching the read data as you describe, but make sure that you check the HTRANS cycle sequence. BUSY transfers just tell you the read data return needs to be stalled, but an unexpected IDLE or NONSEQ transfer will indicate that early burst termination has occured, and so any prefetched data must be discarded (the original master will still need that data when it is next allowed access, but you might need your read data buffer for the new master's transfer request). 

    Probably unlikley, but if the memory being accessed is read sensitive (i.e. a FIFO), you can't dump the prefetched read data as it will then be lost forever.

    Those would be the main things to check in this design I think.

Reply
  • The main thing to check is that HTRANS doesn't signal BUSY cycles in the middle of the defined length burst, as they will stall the burst progression, so will delay when the prefected read data is needed. So check HTRANS sampled on HCLK rising edges when HREADY is high to confirm it follows the expected NONSEQ-SEQ-SEQ-SEQ... sequence for the length of burst expected.

    One problem you might face (again HTRANS related) is that Early Burst Termination can still occur, so you might not see the HBURST indicated number of transfers completed. This can happen when you have arbitration logic selecting which of multiple masters in your system is allowed access to your slave (usually implemented in a multi-layer BusMatrix). As this arbitration logic might switch part way through a burst, your slave might see only 5 beats of an INCR8 burst completed before a new master starts accessing the slave.

    So nothing wrong with prefetching the read data as you describe, but make sure that you check the HTRANS cycle sequence. BUSY transfers just tell you the read data return needs to be stalled, but an unexpected IDLE or NONSEQ transfer will indicate that early burst termination has occured, and so any prefetched data must be discarded (the original master will still need that data when it is next allowed access, but you might need your read data buffer for the new master's transfer request). 

    Probably unlikley, but if the memory being accessed is read sensitive (i.e. a FIFO), you can't dump the prefetched read data as it will then be lost forever.

    Those would be the main things to check in this design I think.

Children