diff --git a/libs/libvtrutil/src/vtr_vector_map.h b/libs/libvtrutil/src/vtr_vector_map.h index fbb19152639..50309e86ed0 100644 --- a/libs/libvtrutil/src/vtr_vector_map.h +++ b/libs/libvtrutil/src/vtr_vector_map.h @@ -29,7 +29,8 @@ namespace vtr { * If you need a fully featured std::map like container without the above differences see * vtr::linear_map. * - * If you do not need std::map-like features see vtr::vector. + * If you do not need std::map-like features see vtr::vector. Note that vtr::vector_map is very similar + * to vtr::vector. Unless there is a specific reason that vtr::vector_map is needed, it is better to use vtr::vector. * * Note that it is possible to use vector_map with sparse/non-contiguous keys, but this is typically * memory inefficient as the underlying vector will allocate space for [0..size_t(max_key)-1], @@ -39,6 +40,7 @@ namespace vtr { * when a given index/key before it is accessed. The exception to this are the find(), insert() and * update() methods which handle non-existing keys gracefully. */ + template> class vector_map { public: //Public types diff --git a/vpr/src/base/SetupVPR.cpp b/vpr/src/base/SetupVPR.cpp index a05c525ec01..0ed496a9636 100644 --- a/vpr/src/base/SetupVPR.cpp +++ b/vpr/src/base/SetupVPR.cpp @@ -24,6 +24,7 @@ #include "read_options.h" #include "echo_files.h" #include "clock_modeling.h" +#include "ShowSetup.h" static void SetupNetlistOpts(const t_options& Options, t_netlist_opts& NetlistOpts); static void SetupPackerOpts(const t_options& Options, @@ -70,7 +71,8 @@ void SetupVPR(const t_options* Options, int* GraphPause, bool* SaveGraphics, std::string* GraphicsCommands, - t_power_opts* PowerOpts) { + t_power_opts* PowerOpts, + t_vpr_setup* vpr_setup) { using argparse::Provenance; auto& device_ctx = g_vpr_ctx.mutable_device(); @@ -113,6 +115,7 @@ void SetupVPR(const t_options* Options, device_ctx.physical_tile_types, device_ctx.logical_block_types); } + VTR_LOG("\n"); *user_models = Arch->models; *library_models = Arch->model_library; @@ -211,6 +214,8 @@ void SetupVPR(const t_options* Options, } } + ShowSetup(*vpr_setup); + /* init global variables */ vtr::out_file_prefix = Options->out_file_prefix; diff --git a/vpr/src/base/SetupVPR.h b/vpr/src/base/SetupVPR.h index 163379d3781..941fa568015 100644 --- a/vpr/src/base/SetupVPR.h +++ b/vpr/src/base/SetupVPR.h @@ -27,5 +27,6 @@ void SetupVPR(const t_options* Options, int* GraphPause, bool* SaveGraphics, std::string* GraphicsCommands, - t_power_opts* PowerOpts); + t_power_opts* PowerOpts, + t_vpr_setup* vpr_setup); #endif diff --git a/vpr/src/base/ShowSetup.cpp b/vpr/src/base/ShowSetup.cpp index 64022b6fa3a..acb5aca6f45 100644 --- a/vpr/src/base/ShowSetup.cpp +++ b/vpr/src/base/ShowSetup.cpp @@ -20,7 +20,6 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts); static void ShowAnalysisOpts(const t_analysis_opts& AnalysisOpts); static void ShowAnnealSched(const t_annealing_sched& AnnealSched); -static void ShowRoutingArch(const t_det_routing_arch& RoutingArch); /******** Function Implementations ********/ @@ -40,6 +39,8 @@ void ShowSetup(const t_vpr_setup& vpr_setup) { VTR_LOG("Analysis: %s\n", (vpr_setup.AnalysisOpts.doAnalysis ? "ENABLED" : "DISABLED")); VTR_LOG("\n"); + VTR_LOG("VPR was run with the following options:\n\n"); + ShowNetlistOpts(vpr_setup.NetlistOpts); if (vpr_setup.PackerOpts.doPacking) { @@ -54,9 +55,6 @@ void ShowSetup(const t_vpr_setup& vpr_setup) { if (vpr_setup.AnalysisOpts.doAnalysis) { ShowAnalysisOpts(vpr_setup.AnalysisOpts); } - - if (DETAILED == vpr_setup.RouterOpts.route_type) - ShowRoutingArch(vpr_setup.RoutingArch); } void printClusteredNetlistStats() { @@ -107,46 +105,6 @@ void printClusteredNetlistStats() { num_blocks_type.clear(); } -static void ShowRoutingArch(const t_det_routing_arch& RoutingArch) { - VTR_LOG("RoutingArch.directionality: "); - switch (RoutingArch.directionality) { - case BI_DIRECTIONAL: - VTR_LOG("BI_DIRECTIONAL\n"); - break; - case UNI_DIRECTIONAL: - VTR_LOG("UNI_DIRECTIONAL\n"); - break; - default: - VPR_FATAL_ERROR(VPR_ERROR_UNKNOWN, "\n"); - break; - } - - VTR_LOG("RoutingArch.switch_block_type: "); - switch (RoutingArch.switch_block_type) { - case SUBSET: - VTR_LOG("SUBSET\n"); - break; - case WILTON: - VTR_LOG("WILTON\n"); - break; - case UNIVERSAL: - VTR_LOG("UNIVERSAL\n"); - break; - case FULL: - VTR_LOG("FULL\n"); - break; - case CUSTOM: - VTR_LOG("CUSTOM\n"); - break; - default: - VTR_LOG_ERROR("switch block type\n"); - } - - VTR_LOG("RoutingArch.Fs: %d\n", RoutingArch.Fs); - - VTR_LOG("\n"); -} - static void ShowAnnealSched(const t_annealing_sched& AnnealSched) { VTR_LOG("AnnealSched.type: "); switch (AnnealSched.type) { diff --git a/vpr/src/base/vpr_api.cpp b/vpr/src/base/vpr_api.cpp index 2e3366b4215..5c1587d9c91 100644 --- a/vpr/src/base/vpr_api.cpp +++ b/vpr/src/base/vpr_api.cpp @@ -295,7 +295,8 @@ void vpr_init_with_options(const t_options* options, t_vpr_setup* vpr_setup, t_a &vpr_setup->GraphPause, &vpr_setup->SaveGraphics, &vpr_setup->GraphicsCommands, - &vpr_setup->PowerOpts); + &vpr_setup->PowerOpts, + vpr_setup); /* Check inputs are reasonable */ CheckArch(*arch); @@ -357,8 +358,6 @@ void vpr_init_with_options(const t_options* options, t_vpr_setup* vpr_setup, t_a } fflush(stdout); - - ShowSetup(*vpr_setup); } bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) { @@ -1140,7 +1139,8 @@ void vpr_setup_vpr(t_options* Options, int* GraphPause, bool* SaveGraphics, std::string* GraphicsCommands, - t_power_opts* PowerOpts) { + t_power_opts* PowerOpts, + t_vpr_setup* vpr_setup) { SetupVPR(Options, TimingEnabled, readArchFile, @@ -1162,7 +1162,8 @@ void vpr_setup_vpr(t_options* Options, GraphPause, SaveGraphics, GraphicsCommands, - PowerOpts); + PowerOpts, + vpr_setup); } void vpr_check_arch(const t_arch& Arch) { diff --git a/vpr/src/base/vpr_api.h b/vpr/src/base/vpr_api.h index 51b7c39d955..d5cc9cb195a 100644 --- a/vpr/src/base/vpr_api.h +++ b/vpr/src/base/vpr_api.h @@ -163,7 +163,8 @@ void vpr_setup_vpr(t_options* Options, int* GraphPause, bool* SaveGraphics, std::string* GraphicsCommands, - t_power_opts* PowerOpts); + t_power_opts* PowerOpts, + t_vpr_setup* vpr_setup); ///@brief Check inputs are reasonable void vpr_check_arch(const t_arch& Arch);