From 086642d13474a2768a5ad312b2014a673be968d5 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Wed, 23 Feb 2022 15:33:24 -0800 Subject: [PATCH] [FPGA-Verilog] Now preconfigured wrapper can handle config_enable signals correctly --- openfpga/src/fpga_verilog/verilog_preconfig_top_module.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openfpga/src/fpga_verilog/verilog_preconfig_top_module.cpp b/openfpga/src/fpga_verilog/verilog_preconfig_top_module.cpp index fba957963..7c6862380 100644 --- a/openfpga/src/fpga_verilog/verilog_preconfig_top_module.cpp +++ b/openfpga/src/fpga_verilog/verilog_preconfig_top_module.cpp @@ -235,6 +235,10 @@ int print_verilog_preconfig_top_module_connect_global_ports(std::fstream &fp, } else { VTR_ASSERT_SAFE(std::string(PIN_CONSTRAINT_OPEN_NET) == constrained_net_name); std::vector default_values(module_global_pin.get_width(), fabric_global_ports.global_port_default_value(global_port_id)); + /* For configuration done signals, we should enable them in preconfigured wrapper */ + if (fabric_global_ports.global_port_is_config_enable(global_port_id)) { + default_values.resize(module_global_pin.get_width(), 1 - fabric_global_ports.global_port_default_value(global_port_id)); + } print_verilog_wire_constant_values(fp, module_global_pin, default_values); } }