enable fast bitstream building by creating a frame view of fabric

This commit is contained in:
tangxifan 2020-07-02 16:25:36 -06:00
parent e82d0d9f34
commit adee87569d
6 changed files with 26 additions and 12 deletions

View File

@ -67,6 +67,7 @@ void compress_routing_hierarchy(OpenfpgaContext& openfpga_ctx,
int build_fabric(OpenfpgaContext& openfpga_ctx,
const Command& cmd, const CommandContext& cmd_context) {
CommandOptionId opt_frame_view = cmd.option("frame_view");
CommandOptionId opt_compress_routing = cmd.option("compress_routing");
CommandOptionId opt_duplicate_grid_pin = cmd.option("duplicate_grid_pin");
CommandOptionId opt_gen_random_fabric_key = cmd.option("generate_random_fabric_key");
@ -96,6 +97,7 @@ int build_fabric(OpenfpgaContext& openfpga_ctx,
openfpga_ctx.mutable_decoder_lib(),
const_cast<const OpenfpgaContext&>(openfpga_ctx),
g_vpr_ctx.device(),
cmd_context.option_enable(cmd, opt_frame_view),
cmd_context.option_enable(cmd, opt_compress_routing),
cmd_context.option_enable(cmd, opt_duplicate_grid_pin),
predefined_fabric_key,

View File

@ -267,6 +267,9 @@ ShellCommandId add_openfpga_build_fabric_command(openfpga::Shell<OpenfpgaContext
Command shell_cmd("build_fabric");
/* Add an option '--frame_view' */
shell_cmd.add_option("frame_view", false, "Build only frame view of the fabric (nets are skipped)");
/* Add an option '--compress_routing' */
shell_cmd.add_option("compress_routing", false, "Compress the number of unique routing modules by identifying the unique GSBs");

View File

@ -30,6 +30,7 @@ ModuleManager build_device_module_graph(IoLocationMap& io_location_map,
DecoderLibrary& decoder_lib,
const OpenfpgaContext& openfpga_ctx,
const DeviceContext& vpr_device_ctx,
const bool& frame_view,
const bool& compress_routing,
const bool& duplicate_grid_pin,
const FabricKey& fabric_key,
@ -118,7 +119,7 @@ ModuleManager build_device_module_graph(IoLocationMap& io_location_map,
openfpga_ctx.arch().arch_direct,
openfpga_ctx.arch().config_protocol.type(),
sram_model,
compress_routing, duplicate_grid_pin,
frame_view, compress_routing, duplicate_grid_pin,
fabric_key, generate_random_fabric_key);
/* Now a critical correction has to be done!

View File

@ -19,6 +19,7 @@ ModuleManager build_device_module_graph(IoLocationMap& io_location_map,
DecoderLibrary& decoder_lib,
const OpenfpgaContext& openfpga_ctx,
const DeviceContext& vpr_device_ctx,
const bool& frame_view,
const bool& compress_routing,
const bool& duplicate_grid_pin,
const FabricKey& fabric_key,

View File

@ -329,6 +329,7 @@ void build_top_module(ModuleManager& module_manager,
const ArchDirect& arch_direct,
const e_config_protocol_type& sram_orgz_type,
const CircuitModelId& sram_model,
const bool& frame_view,
const bool& compact_routing_hierarchy,
const bool& duplicate_grid_pin,
const FabricKey& fabric_key,
@ -351,6 +352,10 @@ void build_top_module(ModuleManager& module_manager,
cb_instance_ids[CHANX] = add_top_module_connection_block_instances(module_manager, top_module, device_rr_gsb, CHANX, compact_routing_hierarchy);
cb_instance_ids[CHANY] = add_top_module_connection_block_instances(module_manager, top_module, device_rr_gsb, CHANY, compact_routing_hierarchy);
/* Add nets when we need a complete fabric modeling,
* which is required by downstream functions
*/
if (false == frame_view) {
/* Reserve nets to be memory efficient */
reserve_module_manager_module_nets(module_manager, top_module);
@ -363,6 +368,7 @@ void build_top_module(ModuleManager& module_manager,
add_top_module_nets_tile_direct_connections(module_manager, top_module, circuit_lib,
grids, grid_instance_ids,
tile_direct, arch_direct);
}
/* Add global ports to the pb_module:
* This is a much easier job after adding sub modules (instances),

View File

@ -36,6 +36,7 @@ void build_top_module(ModuleManager& module_manager,
const ArchDirect& arch_direct,
const e_config_protocol_type& sram_orgz_type,
const CircuitModelId& sram_model,
const bool& frame_view,
const bool& compact_routing_hierarchy,
const bool& duplicate_grid_pin,
const FabricKey& fabric_key,