From 46b12611a9f4ed950951bc1baf49a8cbf29439cd Mon Sep 17 00:00:00 2001 From: tangxifan Date: Wed, 23 Sep 2020 22:04:07 -0600 Subject: [PATCH] [OpenFPGA Tool] Bug fix for smart fast configuration --- openfpga/src/fpga_verilog/verilog_top_testbench.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openfpga/src/fpga_verilog/verilog_top_testbench.cpp b/openfpga/src/fpga_verilog/verilog_top_testbench.cpp index 481d01ae4..e76c198e9 100644 --- a/openfpga/src/fpga_verilog/verilog_top_testbench.cpp +++ b/openfpga/src/fpga_verilog/verilog_top_testbench.cpp @@ -1536,13 +1536,14 @@ void print_verilog_top_testbench_bitstream(std::fstream& fp, std::vector global_prog_reset_ports; std::vector global_prog_set_ports; for (const CircuitPortId& global_port : global_ports) { - if (false == circuit_lib.port_is_reset(global_port)) { + VTR_ASSERT(true == circuit_lib.port_is_global(global_port)); + if (false == circuit_lib.port_is_prog(global_port)) { continue; } - VTR_ASSERT(true == circuit_lib.port_is_global(global_port)); + VTR_ASSERT(true == circuit_lib.port_is_prog(global_port)); VTR_ASSERT( (false == circuit_lib.port_is_reset(global_port)) - || (false == circuit_lib.port_is_reset(global_port))); - if (true == circuit_lib.port_is_prog(global_port)) { + || (false == circuit_lib.port_is_set(global_port))); + if (true == circuit_lib.port_is_reset(global_port)) { global_prog_reset_ports.push_back(global_port); } if (true == circuit_lib.port_is_set(global_port)) { @@ -1553,7 +1554,7 @@ void print_verilog_top_testbench_bitstream(std::fstream& fp, bool apply_fast_configuration = fast_configuration; if ( (global_prog_set_ports.empty() && global_prog_reset_ports.empty()) && (true == fast_configuration)) { - VTR_LOG_WARN("None of global reset and set ports are defined for programming purpose. Fast configuration is turned off"); + VTR_LOG_WARN("None of global reset and set ports are defined for programming purpose. Fast configuration is turned off\n"); } bool bit_value_to_skip = find_bit_value_to_skip_for_fast_configuration(config_protocol_type, apply_fast_configuration,