[core] fixed some bugs which cause netlist generation failed
This commit is contained in:
parent
28b7a12f68
commit
ba90f5020b
|
@ -260,7 +260,7 @@ int ConfigProtocol::validate_ccff_prog_clocks() const {
|
|||
std::vector<int> ccff_head_scoreboard(num_regions(), 0);
|
||||
for (openfpga::BasicPort port : prog_clock_pins()) {
|
||||
/* Must be valid first */
|
||||
if (port.is_valid()) {
|
||||
if (!port.is_valid()) {
|
||||
VTR_LOG_ERROR("Programming clock '%s[%d:%d]' is not a valid port!\n",
|
||||
port.get_name().c_str(), port.get_lsb(), port.get_msb());
|
||||
num_err++;
|
||||
|
@ -286,9 +286,9 @@ int ConfigProtocol::validate_ccff_prog_clocks() const {
|
|||
ccff_head_scoreboard[ccff_head_idx]++;
|
||||
}
|
||||
}
|
||||
if (prog_clock_pins().size() != (size_t)num_regions()) {
|
||||
if (prog_clock_pins().size() > (size_t)num_regions()) {
|
||||
VTR_LOG_ERROR(
|
||||
"Number of programming clocks '%ld' does not match the number of "
|
||||
"Number of programming clocks '%ld' is more than the number of "
|
||||
"configuration regions '%ld'!\n",
|
||||
prog_clock_pins().size(), num_regions());
|
||||
num_err++;
|
||||
|
|
|
@ -83,7 +83,7 @@ bool check_config_protocol(const ConfigProtocol& config_protocol,
|
|||
const CircuitLibrary& circuit_lib) {
|
||||
int num_err = 0;
|
||||
|
||||
if (!config_protocol.validate()) {
|
||||
if (0 < config_protocol.validate()) {
|
||||
num_err++;
|
||||
}
|
||||
|
||||
|
|
|
@ -2232,8 +2232,13 @@ void add_module_global_input_ports_from_child_modules(
|
|||
child, ModuleManager::MODULE_GLOBAL_PORT)) {
|
||||
BasicPort child_global_port =
|
||||
module_manager.module_port(child, child_global_port_id);
|
||||
/* Skip if it is in the ignore list */
|
||||
if (std::find(port_name_to_ignore.begin(), port_name_to_ignore.end(),
|
||||
child_global_port.get_name()) != port_name_to_ignore.end()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Search in the global port list to be added, find the port id */
|
||||
|
||||
std::vector<BasicPort>::iterator it =
|
||||
std::find(global_ports_to_add.begin(), global_ports_to_add.end(),
|
||||
child_global_port);
|
||||
|
@ -2259,6 +2264,12 @@ void add_module_global_input_ports_from_child_modules(
|
|||
child, ModuleManager::MODULE_GLOBAL_PORT)) {
|
||||
BasicPort child_global_port =
|
||||
module_manager.module_port(child, child_global_port_id);
|
||||
/* Skip if it is in the ignore list */
|
||||
if (std::find(port_name_to_ignore.begin(), port_name_to_ignore.end(),
|
||||
child_global_port.get_name()) != port_name_to_ignore.end()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Search in the global port list to be added, find the port id */
|
||||
std::vector<BasicPort>::iterator it =
|
||||
std::find(global_ports_to_add.begin(), global_ports_to_add.end(),
|
||||
|
|
Loading…
Reference in New Issue