mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
lib/ips/fifo: fix decision if AXI4 data interface is present
This commit is contained in:
parent
e93b31bbf1
commit
21333379a9
1 changed files with 7 additions and 4 deletions
|
@ -60,10 +60,13 @@ bool Fifo::init()
|
|||
|
||||
XLlFifo_Config fifo_cfg;
|
||||
|
||||
fifo_cfg.Axi4BaseAddress = getBaseAddr(axi4Memory);
|
||||
|
||||
// use AXI4 for Data, AXI4-Lite for control
|
||||
fifo_cfg.Datainterface = (fifo_cfg.Axi4BaseAddress != -1) ? 1 : 0;
|
||||
try {
|
||||
// if this throws an exception, then there's no AXI4 data interface
|
||||
fifo_cfg.Axi4BaseAddress = getBaseAddr(axi4Memory);
|
||||
fifo_cfg.Datainterface = 1;
|
||||
} catch(const std::out_of_range&) {
|
||||
fifo_cfg.Datainterface = 0;
|
||||
}
|
||||
|
||||
if (XLlFifo_CfgInitialize(&xFifo, &fifo_cfg, getBaseAddr(registerMemory)) != XST_SUCCESS)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue