Skip to content

Commit

Permalink
Merge pull request #245 from lnis-uofu/dev
Browse files Browse the repository at this point in the history
Throw fatal error when the number of configurable region is different between fabric key and architecture definition
  • Loading branch information
ganeshgore authored Feb 22, 2021
2 parents d6a02a9 + 01b9bf2 commit 4315660
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/manual/arch_lang/config_protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Template
.. code-block:: xml
<configuration_protocol>
<organization type="<string>" circuit_model_name="<string>"/>
<organization type="<string>" circuit_model_name="<string>" num_regions="<int>"/>
</configuration_protocol>
.. option:: type="scan_chain|memory_bank|standalone"
Expand Down
12 changes: 6 additions & 6 deletions openfpga/src/fabric/build_top_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,14 @@ int build_top_module(ModuleManager& module_manager,
compact_routing_hierarchy);
} else {
VTR_ASSERT_SAFE(false == fabric_key.empty());
/* Give a warning message that the fabric key may overwrite existing region organization.
* Only applicable when number of regions defined in configuration protocol is different
* than the number of regions defined in the fabric key
/* Throw a fatal error when the fabric key has a mismatch in region organization.
* between architecture file and fabric key
*/
if (size_t(config_protocol.num_regions()) != fabric_key.regions().size()) {
VTR_LOG_WARN("Fabric key will overwrite the region organization (='%ld') than architecture definition (=%d)!\n",
fabric_key.regions().size(),
config_protocol.num_regions());
VTR_LOG_ERROR("Fabric key has a different number of configurable regions (='%ld') than architecture definition (=%d)!\n",
fabric_key.regions().size(),
config_protocol.num_regions());
return CMD_EXEC_FATAL_ERROR;
}

status = load_top_module_memory_modules_from_fabric_key(module_manager, top_module,
Expand Down

0 comments on commit 4315660

Please sign in to comment.