From f8831f329c1f82c3f20b1cf24e79cc42940fe8ef Mon Sep 17 00:00:00 2001 From: ultraembedded Date: Sun, 11 Jul 2021 15:27:46 +0100 Subject: [PATCH] Only use board clock speed if user does not specify an alternate freq --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 217f534..53eaa19 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,6 +30,8 @@ #include "rawParser.hpp" #include "xilinx.hpp" +#define DEFAULT_FREQ 6000000 + using namespace std; struct arguments { @@ -70,7 +72,7 @@ int main(int argc, char **argv) /* command line args. */ struct arguments args = {0, false, false, false, 0, "", "", "-", "", -1, - 6000000, "-", false, false, false, false, Device::WR_SRAM, false, + DEFAULT_FREQ, "-", false, false, false, false, Device::WR_SRAM, false, false, false, "", "", "", -1, 0}; /* parse arguments */ try { @@ -127,7 +129,7 @@ int main(int argc, char **argv) args.fpga_part = board->fpga_part; /* Some boards can override the default clock speed */ - if (board->default_freq != CABLE_DEFAULT) + if (board->default_freq != CABLE_DEFAULT && freq == DEFAULT_FREQ) freq = board->default_freq; }