mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
add more configuration options to villas-fpga-ctrl
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
8ff0370d36
commit
ab39f57405
3 changed files with 17 additions and 9 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 729b877a405b3bd80205fa1c54bfedbf2f030dc2
|
||||
Subproject commit 90e0c3df70200f0eccbb3b145393f81e31e15ebb
|
|
@ -105,7 +105,7 @@ int fpga::ConnectString::portStringToInt(std::string &str) const
|
|||
}
|
||||
|
||||
|
||||
// parses a string lik "1->2" or "1<->stdout" and configures the crossbar
|
||||
// parses a string like "1->2" or "1<->stdout" and configures the crossbar accordingly
|
||||
void fpga::ConnectString::configCrossBar(std::shared_ptr<villas::fpga::ip::Dma> dma,
|
||||
std::vector<std::shared_ptr<fpga::ip::AuroraXilinx>>& aurora_channels) const
|
||||
{
|
||||
|
|
|
@ -51,9 +51,6 @@ void readFromDmaToStdOut(std::shared_ptr<villas::fpga::ip::Dma> dma,
|
|||
dma->makeAccesibleFromVA(b);
|
||||
}
|
||||
|
||||
auto &mm = MemoryManager::get();
|
||||
mm.getGraph().dump("graph.dot");
|
||||
|
||||
|
||||
size_t cur = 0, next = 1;
|
||||
std::ios::sync_with_stdio(false);
|
||||
|
@ -98,7 +95,10 @@ int main(int argc, char* argv[])
|
|||
app.add_flag("--no-dma", noDma, "Do not setup DMA, only setup FPGA and Crossbar links");
|
||||
std::string outputFormat = "short";
|
||||
app.add_option("--output-format", outputFormat, "Output format (short, long)");
|
||||
|
||||
bool dumpGraph = false;
|
||||
app.add_flag("--dump-graph", dumpGraph, "Dumps the graph of memory regions into \"graph.dot\"");
|
||||
bool dumpAuroraChannels = true;
|
||||
app.add_flag("--dump-aurora", dumpAuroraChannels, "Dumps the detected Aurora channels.");
|
||||
app.parse(argc, argv);
|
||||
|
||||
// Logging setup
|
||||
|
@ -133,16 +133,24 @@ int main(int argc, char* argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
for (auto aurora : aurora_channels)
|
||||
aurora->dump();
|
||||
if (dumpGraph) {
|
||||
auto &mm = MemoryManager::get();
|
||||
mm.getGraph().dump("graph.dot");
|
||||
}
|
||||
|
||||
if (dumpAuroraChannels) {
|
||||
for (auto aurora : aurora_channels)
|
||||
aurora->dump();
|
||||
}
|
||||
// Configure Crossbar switch
|
||||
const fpga::ConnectString parsedConnectString(connectStr);
|
||||
parsedConnectString.configCrossBar(dma, aurora_channels);
|
||||
|
||||
if (!noDma) {
|
||||
if (!noDma && parsedConnectString.isDstStdout()) {
|
||||
auto formatter = fpga::getBufferedSampleFormatter(outputFormat, 16);
|
||||
readFromDmaToStdOut(std::move(dma), std::move(formatter));
|
||||
} else if (!noDma && parsedConnectString.isSrcStdin()) {
|
||||
|
||||
}
|
||||
} catch (const RuntimeError &e) {
|
||||
logger->error("Error: {}", e.what());
|
||||
|
|
Loading…
Add table
Reference in a new issue