keep bug fixing for frame-based configuration protocol.
This commit is contained in:
parent
65df309419
commit
bf9f62f0f7
|
@ -270,7 +270,7 @@ void build_primitive_block_module(ModuleManager& module_manager,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Regular (independent) SRAM ports */
|
/* Regular (independent) SRAM ports */
|
||||||
size_t num_config_bits = find_circuit_num_config_bits(circuit_lib, primitive_model);
|
size_t num_config_bits = find_circuit_num_config_bits(sram_orgz_type, circuit_lib, primitive_model);
|
||||||
if (0 < num_config_bits) {
|
if (0 < num_config_bits) {
|
||||||
add_sram_ports_to_module_manager(module_manager, primitive_module,
|
add_sram_ports_to_module_manager(module_manager, primitive_module,
|
||||||
circuit_lib, sram_model, sram_orgz_type,
|
circuit_lib, sram_model, sram_orgz_type,
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "vtr_log.h"
|
#include "vtr_log.h"
|
||||||
|
|
||||||
#include "check_circuit_library.h"
|
#include "check_circuit_library.h"
|
||||||
|
#include "decoder_library_utils.h"
|
||||||
#include "circuit_library_utils.h"
|
#include "circuit_library_utils.h"
|
||||||
|
|
||||||
/* begin namespace openfpga */
|
/* begin namespace openfpga */
|
||||||
|
@ -161,7 +162,8 @@ size_t find_circuit_num_shared_config_bits(const CircuitLibrary& circuit_lib,
|
||||||
* for a multiplexer, because the multiplexer size is determined during
|
* for a multiplexer, because the multiplexer size is determined during
|
||||||
* the FPGA architecture generation (NOT during the XML parsing).
|
* the FPGA architecture generation (NOT during the XML parsing).
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
size_t find_circuit_num_config_bits(const CircuitLibrary& circuit_lib,
|
size_t find_circuit_num_config_bits(const e_config_protocol_type& config_protocol_type,
|
||||||
|
const CircuitLibrary& circuit_lib,
|
||||||
const CircuitModelId& circuit_model) {
|
const CircuitModelId& circuit_model) {
|
||||||
size_t num_config_bits = 0;
|
size_t num_config_bits = 0;
|
||||||
|
|
||||||
|
@ -170,6 +172,27 @@ size_t find_circuit_num_config_bits(const CircuitLibrary& circuit_lib,
|
||||||
num_config_bits += circuit_lib.port_size(sram_port);
|
num_config_bits += circuit_lib.port_size(sram_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (config_protocol_type) {
|
||||||
|
case CONFIG_MEM_STANDALONE:
|
||||||
|
case CONFIG_MEM_SCAN_CHAIN:
|
||||||
|
case CONFIG_MEM_MEMORY_BANK: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CONFIG_MEM_FRAME_BASED: {
|
||||||
|
/* For frame-based configuration protocol
|
||||||
|
* The number of configuration bits is the address size
|
||||||
|
*/
|
||||||
|
if (0 < num_config_bits) {
|
||||||
|
num_config_bits = find_mux_local_decoder_addr_size(num_config_bits);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
|
"Invalid type of SRAM organization !\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
return num_config_bits;
|
return num_config_bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,8 @@ size_t find_circuit_num_shared_config_bits(const CircuitLibrary& circuit_lib,
|
||||||
const CircuitModelId& circuit_model,
|
const CircuitModelId& circuit_model,
|
||||||
const e_config_protocol_type& sram_orgz_type);
|
const e_config_protocol_type& sram_orgz_type);
|
||||||
|
|
||||||
size_t find_circuit_num_config_bits(const CircuitLibrary& circuit_lib,
|
size_t find_circuit_num_config_bits(const e_config_protocol_type& config_protocol_type,
|
||||||
|
const CircuitLibrary& circuit_lib,
|
||||||
const CircuitModelId& circuit_model);
|
const CircuitModelId& circuit_model);
|
||||||
|
|
||||||
std::vector<CircuitPortId> find_circuit_library_global_ports(const CircuitLibrary& circuit_lib);
|
std::vector<CircuitPortId> find_circuit_library_global_ports(const CircuitLibrary& circuit_lib);
|
||||||
|
|
Loading…
Reference in New Issue