1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

dma: add dump() method

This commit is contained in:
Steffen Vogel 2019-08-15 13:54:58 +02:00
parent bf74db8e79
commit f6a78bea69
2 changed files with 14 additions and 0 deletions

View file

@ -88,6 +88,8 @@ public:
bool isMemoryBlockAccesible(const MemoryBlock& mem, const std::string& interface);
virtual void dump();
private:
static constexpr char registerMemory[] = "Reg";

View file

@ -114,6 +114,8 @@ Dma::init()
bool
Dma::reset()
{
logger->info("DMA resetted");
XAxiDma_Reset(&xDma);
// value taken from libxil implementation
@ -396,6 +398,16 @@ Dma::isMemoryBlockAccesible(const MemoryBlock& mem, const std::string& interface
return true;
}
void
Dma::dump()
{
IpCore::dump();
logger->info("S2MM_DMACR: {:x}", XAxiDma_ReadReg(xDma.RegBase, XAXIDMA_RX_OFFSET + XAXIDMA_CR_OFFSET));
logger->info("S2MM_DMASR: {:x}", XAxiDma_ReadReg(xDma.RegBase, XAXIDMA_RX_OFFSET + XAXIDMA_SR_OFFSET));
logger->info("S2MM_LENGTH: {:x}", XAxiDma_ReadReg(xDma.RegBase, XAXIDMA_RX_OFFSET + XAXIDMA_BUFFLEN_OFFSET));
}
} // namespace ip
} // namespace fpga