From 7d927155db10c3372243576944494417e85e6758 Mon Sep 17 00:00:00 2001 From: Daniel Krebs Date: Wed, 31 Jan 2018 12:21:36 +0100 Subject: [PATCH] tests: minimal test of memory manager --- fpga/tests/graph.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fpga/tests/graph.cpp b/fpga/tests/graph.cpp index 2dd8e6c9b..409d26537 100644 --- a/fpga/tests/graph.cpp +++ b/fpga/tests/graph.cpp @@ -3,6 +3,13 @@ #include #include #include +#include + +static void init_graph() +{ + spdlog::set_pattern("[%T] [%l] [%n] %v"); + spdlog::set_level(spdlog::level::debug); +} TestSuite(graph, .description = "Graph library" @@ -102,3 +109,15 @@ Test(graph, path, .description = "Find path") logger->info(" -> edge {}", edge); } } + +Test(graph, memory_manager, .description = "Global Memory Manager") +{ + auto& mm = villas::MemoryManager::get(); + + auto dmaRegs = mm.createAddressSpace("DMA Registers"); + auto pcieBridge = mm.createAddressSpace("PCIe Bridge"); + + mm.createMapping(0x1000, 0, 0x1000, dmaRegs, pcieBridge); + + mm.dump(); +}