[Tool] Bug fix for bitstream estimator due to the current special status of frame-based protocol
This commit is contained in:
parent
c2c384e24b
commit
8ef6ae32fb
|
@ -672,11 +672,10 @@ size_t generate_top_module_sram_port_size(const ConfigProtocol& config_protocol,
|
||||||
break;
|
break;
|
||||||
case CONFIG_MEM_SCAN_CHAIN:
|
case CONFIG_MEM_SCAN_CHAIN:
|
||||||
case CONFIG_MEM_MEMORY_BANK:
|
case CONFIG_MEM_MEMORY_BANK:
|
||||||
|
case CONFIG_MEM_FRAME_BASED:
|
||||||
/* CCFF head/tail, data input could be multi-bit ports */
|
/* CCFF head/tail, data input could be multi-bit ports */
|
||||||
sram_port_size = config_protocol.num_regions();
|
sram_port_size = config_protocol.num_regions();
|
||||||
break;
|
break;
|
||||||
case CONFIG_MEM_FRAME_BASED:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Invalid type of SRAM organization!\n");
|
"Invalid type of SRAM organization!\n");
|
||||||
|
@ -785,7 +784,7 @@ void add_top_module_sram_ports(ModuleManager& module_manager,
|
||||||
BasicPort addr_port(std::string(DECODER_ADDRESS_PORT_NAME), total_num_config_bits);
|
BasicPort addr_port(std::string(DECODER_ADDRESS_PORT_NAME), total_num_config_bits);
|
||||||
module_manager.add_port(module_id, addr_port, ModuleManager::MODULE_INPUT_PORT);
|
module_manager.add_port(module_id, addr_port, ModuleManager::MODULE_INPUT_PORT);
|
||||||
|
|
||||||
BasicPort din_port(std::string(DECODER_DATA_IN_PORT_NAME), 1);
|
BasicPort din_port(std::string(DECODER_DATA_IN_PORT_NAME), sram_port_size);
|
||||||
module_manager.add_port(module_id, din_port, ModuleManager::MODULE_INPUT_PORT);
|
module_manager.add_port(module_id, din_port, ModuleManager::MODULE_INPUT_PORT);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -82,16 +82,17 @@ size_t rec_estimate_device_bitstream_num_bits(const ModuleManager& module_manage
|
||||||
* Iterate over the configurable children regardless of regions
|
* Iterate over the configurable children regardless of regions
|
||||||
*/
|
*/
|
||||||
if (parent_module == top_module) {
|
if (parent_module == top_module) {
|
||||||
for (const ConfigRegionId& config_region : module_manager.regions(top_module)) {
|
for (const ConfigRegionId& config_region : module_manager.regions(parent_module)) {
|
||||||
size_t curr_region_num_config_child = module_manager.region_configurable_children(parent_module, config_region).size();
|
size_t curr_region_num_config_child = module_manager.region_configurable_children(parent_module, config_region).size();
|
||||||
|
|
||||||
/* Frame-based configuration protocol will have 1 decoder
|
/* FIXME: This will be uncommented when multi-region support is extended for frame-based
|
||||||
|
* Frame-based configuration protocol will have 1 decoder
|
||||||
* if there are more than 1 configurable children
|
* if there are more than 1 configurable children
|
||||||
*/
|
|
||||||
if ( (CONFIG_MEM_FRAME_BASED == config_protocol_type)
|
if ( (CONFIG_MEM_FRAME_BASED == config_protocol_type)
|
||||||
&& (2 <= curr_region_num_config_child)) {
|
&& (2 <= curr_region_num_config_child)) {
|
||||||
curr_region_num_config_child--;
|
curr_region_num_config_child--;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* Memory configuration protocol will have 2 decoders
|
/* Memory configuration protocol will have 2 decoders
|
||||||
* at the top-level
|
* at the top-level
|
||||||
|
@ -108,7 +109,7 @@ size_t rec_estimate_device_bitstream_num_bits(const ModuleManager& module_manage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
VTR_ASSERT_SAFE(parent_module == top_module);
|
VTR_ASSERT_SAFE(parent_module != top_module);
|
||||||
|
|
||||||
size_t num_configurable_children = module_manager.configurable_children(parent_module).size();
|
size_t num_configurable_children = module_manager.configurable_children(parent_module).size();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue