mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
lib/ip: generalize getting mapped addresses
This commit is contained in:
parent
4035aab49f
commit
c710a95352
2 changed files with 8 additions and 3 deletions
|
@ -114,7 +114,11 @@ public:
|
|||
|
||||
protected:
|
||||
uintptr_t
|
||||
getBaseaddr() const;
|
||||
getBaseaddr() const
|
||||
{ return getAddrMapped(this->baseaddr); }
|
||||
|
||||
uintptr_t
|
||||
getAddrMapped(uintptr_t address) const;
|
||||
|
||||
struct IrqPort {
|
||||
int num;
|
||||
|
|
|
@ -143,9 +143,10 @@ IpCoreFactory* IpCoreFactory::lookup(const Vlnv &vlnv)
|
|||
}
|
||||
|
||||
uintptr_t
|
||||
IpCore::getBaseaddr() const {
|
||||
IpCore::getAddrMapped(uintptr_t address) const
|
||||
{
|
||||
assert(card != nullptr);
|
||||
return reinterpret_cast<uintptr_t>(card->map) + this->baseaddr;
|
||||
return reinterpret_cast<uintptr_t>(card->map) + address;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue