gmpack: add option to clear config latches
This commit is contained in:
parent
5d37e3a18f
commit
72bc122449
|
|
@ -836,6 +836,10 @@ Bitstream Bitstream::serialise_chip(const Chip &chip, const std::map<std::string
|
||||||
}
|
}
|
||||||
wr.write_cmd_path(0x10);
|
wr.write_cmd_path(0x10);
|
||||||
|
|
||||||
|
if (options.count("reset")) {
|
||||||
|
wr.write_cmd_cfgrst(0x00);
|
||||||
|
}
|
||||||
|
|
||||||
bool change_crc = false;
|
bool change_crc = false;
|
||||||
auto crcmode = crc_modes.begin();
|
auto crcmode = crc_modes.begin();
|
||||||
if (options.count("crcmode")) {
|
if (options.count("crcmode")) {
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ int main(int argc, char *argv[])
|
||||||
po::options_description options("Allowed options");
|
po::options_description options("Allowed options");
|
||||||
options.add_options()("help,h", "show help");
|
options.add_options()("help,h", "show help");
|
||||||
options.add_options()("verbose,v", "verbose output");
|
options.add_options()("verbose,v", "verbose output");
|
||||||
|
options.add_options()("reset", "Reset all configuration latches with CMD_CFGRST");
|
||||||
options.add_options()("crcmode", po::value<std::string>(), "CRC error behaviour (check, ignore, unused)");
|
options.add_options()("crcmode", po::value<std::string>(), "CRC error behaviour (check, ignore, unused)");
|
||||||
options.add_options()("spimode", po::value<std::string>(), "SPI Mode to use (single, dual, quad)");
|
options.add_options()("spimode", po::value<std::string>(), "SPI Mode to use (single, dual, quad)");
|
||||||
options.add_options()("reconfig", "enable reconfiguration in bitstream");
|
options.add_options()("reconfig", "enable reconfiguration in bitstream");
|
||||||
|
|
@ -82,6 +83,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
std::map<std::string, std::string> bitopts;
|
std::map<std::string, std::string> bitopts;
|
||||||
|
|
||||||
|
if (vm.count("reset")) {
|
||||||
|
bitopts["reset"] = "yes";
|
||||||
|
}
|
||||||
|
|
||||||
if (vm.count("crcmode")) {
|
if (vm.count("crcmode")) {
|
||||||
bitopts["crcmode"] = vm["crcmode"].as<std::string>();
|
bitopts["crcmode"] = vm["crcmode"].as<std::string>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue