optimizing fabric bitsteream memory footprint
This commit is contained in:
parent
ac22ba28e4
commit
b85af57971
|
@ -495,6 +495,10 @@ FabricBitstream build_fabric_dependent_bitstream(const BitstreamManager& bitstre
|
||||||
VTR_ASSERT(1 == top_block.size());
|
VTR_ASSERT(1 == top_block.size());
|
||||||
VTR_ASSERT(0 == top_module_name.compare(bitstream_manager.block_name(top_block[0])));
|
VTR_ASSERT(0 == top_module_name.compare(bitstream_manager.block_name(top_block[0])));
|
||||||
|
|
||||||
|
/* Reserve bits before build-up */
|
||||||
|
fabric_bitstream.reserve(bitstream_manager.bits().size());
|
||||||
|
|
||||||
|
/* Start build-up formally */
|
||||||
build_module_fabric_dependent_bitstream(config_protocol,
|
build_module_fabric_dependent_bitstream(config_protocol,
|
||||||
bitstream_manager, top_block[0],
|
bitstream_manager, top_block[0],
|
||||||
module_manager, top_module,
|
module_manager, top_module,
|
||||||
|
|
|
@ -55,6 +55,13 @@ bool FabricBitstream::bit_din(const FabricBitId& bit_id) const {
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Public Mutators
|
* Public Mutators
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
void FabricBitstream::reserve(const size_t& num_bits) {
|
||||||
|
bit_ids_.reserve(num_bits);
|
||||||
|
config_bit_ids_.reserve(num_bits);
|
||||||
|
bit_addresses_.reserve(num_bits);
|
||||||
|
bit_dins_.reserve(num_bits);
|
||||||
|
}
|
||||||
|
|
||||||
FabricBitId FabricBitstream::add_bit(const ConfigBitId& config_bit_id) {
|
FabricBitId FabricBitstream::add_bit(const ConfigBitId& config_bit_id) {
|
||||||
FabricBitId bit = FabricBitId(bit_ids_.size());
|
FabricBitId bit = FabricBitId(bit_ids_.size());
|
||||||
/* Add a new bit, and allocate associated data structures */
|
/* Add a new bit, and allocate associated data structures */
|
||||||
|
|
|
@ -60,6 +60,9 @@ class FabricBitstream {
|
||||||
bool bit_din(const FabricBitId& bit_id) const;
|
bool bit_din(const FabricBitId& bit_id) const;
|
||||||
|
|
||||||
public: /* Public Mutators */
|
public: /* Public Mutators */
|
||||||
|
/* Reserve config bits */
|
||||||
|
void reserve(const size_t& num_bits);
|
||||||
|
|
||||||
/* Add a new configuration bit to the bitstream manager */
|
/* Add a new configuration bit to the bitstream manager */
|
||||||
FabricBitId add_bit(const ConfigBitId& config_bit_id);
|
FabricBitId add_bit(const ConfigBitId& config_bit_id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue