mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
lib/ips/pcie: use cached address space id and supply interface to create mapping
This commit is contained in:
parent
36259d00e0
commit
aa2b0b324f
2 changed files with 9 additions and 2 deletions
|
@ -48,6 +48,9 @@ public:
|
|||
friend class AxiPciExpressBridgeFactory;
|
||||
|
||||
bool init();
|
||||
|
||||
private:
|
||||
static constexpr char axiInterface[] = "M_AXI";
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -38,12 +38,16 @@ static AxiPciExpressBridgeFactory factory;
|
|||
bool
|
||||
AxiPciExpressBridge::init()
|
||||
{
|
||||
// Throw an exception if the is no bus master interface and thus no
|
||||
// address space we can use for translation -> error
|
||||
const MemoryManager::AddressSpaceId myAddrSpaceid =
|
||||
busMasterInterfaces.at(axiInterface);
|
||||
|
||||
// Create an identity mapping from the FPGA card to this IP as an entry
|
||||
// point to all other IPs in the FPGA, because Vivado will generate a
|
||||
// memory view for this bridge that can see all others.
|
||||
auto addrSpace = MemoryManager::get().findAddressSpace(getInstanceName());
|
||||
MemoryManager::get().createMapping(0x00, 0x00, SIZE_MAX, "PCIeBridge",
|
||||
card->addrSpaceId, addrSpace);
|
||||
card->addrSpaceId, myAddrSpaceid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue