Forum Index
Bluespec Forums
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multi-Master AHB

Post new topic   Reply to topic Forum Index -> Designing with BSV's Rules, Interfaces, ...
View previous topic :: View next topic  
Author Message

Joined: 13 Jun 2009
Posts: 5

PostPosted: Wed Mar 16, 2016 2:00 am    Post subject: Multi-Master AHB Reply with quote

I am trying to use the AHB bus provided in the BSV_Source/Contrib folder.I am facing certain issues while implementing a 2-master single slave instance of the bus. I have explained the problem in detail below. Wanted to know if there is an updated AHB library source available anywhere?

Problem - 2 masters (Instruction-fetch and data-fetch) - 1 slave (memory)
the instruction-fetch continuously (on every cycle) generates a request on the bus for fetching instructions. This generates a "SINGLE" transaction on the bus with burst_length 1 and burst_size of 4-bytes.
Since the entire the path (TLM2+AHB) as of now is pipelined - we get an instruction every cycle back to the processor (assuming a dummy memory at the slave giving highest throughput).

My second master which is the data-fetch generates requests only when a Load/store is generated.
The problem is, that the arbitration logic is not able to grant the bus to the data-fetch master since the bus is always granted to the instruction-fetch master. In the entirety of the simulation the bus is in the "NONSEQ" transfer state.

Fix - having spent the last 2 days on the code I have realized that the bus can change arbitration output only under two conditions -
1) when no master generates a request - in this situation a new request generated by any master is taken up.
2) Only at the end of the current on-going transfer will there be an arbitration change. This is where I believe is the bug. the condition for end of transfer is when there are no remaining transfers i.e. remaining_reg (AHBBus.bsv) ==0. But in the code in the library this condition is placed as "remaining_reg == 1". the condition for update_value is never true and thus the instruction-fetch is always the master and the bus is always in "NONSEQ" state.

Changing the condition for remaining_reg to 0 does make my functionality to work but I wanted to know if this indeed is the right fix or am I missing something very basic about AHB?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Designing with BSV's Rules, Interfaces, ... All times are GMT - 4 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum topic RSS feed 

Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP