Skip to content

Commit 7d0f890

Browse files
[STA] Enabled Dedicated Routing SDC Generation
Through experimentation, found that dedicated clock routing worked with the external STA path. Removed the error check for this.
1 parent bae2aa0 commit 7d0f890

File tree

3 files changed

+10
-29
lines changed

3 files changed

+10
-29
lines changed

vpr/src/base/netlist_writer.cpp

+5-24
Original file line numberDiff line numberDiff line change
@@ -2689,22 +2689,8 @@ void add_original_sdc_to_post_implemented_sdc_file(std::ofstream& sdc_os,
26892689
*
26902690
* @param sdc_os
26912691
* The file stream to add the propagated clock commands to.
2692-
* @param clock_modeling
2693-
* The type of clock modeling used by VPR during the CAD flow.
26942692
*/
2695-
void add_propagated_clocks_to_sdc_file(std::ofstream& sdc_os,
2696-
e_clock_modeling clock_modeling) {
2697-
2698-
// Ideal and routed clocks are handled by the code below. Other clock models
2699-
// like dedicated routing are not supported yet.
2700-
// TODO: Supporting dedicated routing should be simple; however it should
2701-
// be investigated. Tried quickly but found that the delays produced
2702-
// were off by 0.003 ns. Need to investigate why.
2703-
if (clock_modeling != e_clock_modeling::ROUTED_CLOCK && clock_modeling != e_clock_modeling::IDEAL_CLOCK) {
2704-
VPR_FATAL_ERROR(VPR_ERROR_IMPL_NETLIST_WRITER,
2705-
"Only ideal and routed clock modeling are currentlt "
2706-
"supported for post-implementation SDC file generation");
2707-
}
2693+
void add_propagated_clocks_to_sdc_file(std::ofstream& sdc_os) {
27082694

27092695
// The timing constraints contain information on all the clocks in the circuit
27102696
// (provided by the user-provided SDC file).
@@ -2751,18 +2737,15 @@ void add_propagated_clocks_to_sdc_file(std::ofstream& sdc_os,
27512737

27522738
/**
27532739
* @brief Generates a post-implementation SDC file with the given file name
2754-
* based on the timing info and clock modeling set for VPR.
2740+
* based on the timing info used for VPR.
27552741
*
27562742
* @param sdc_filename
27572743
* The file name of the SDC file to generate.
27582744
* @param timing_info
27592745
* Information on the timing used in the VPR flow.
2760-
* @param clock_modeling
2761-
* The type of clock modeling used by VPR during its flow.
27622746
*/
27632747
void generate_post_implementation_sdc(const std::string& sdc_filename,
2764-
const t_timing_inf& timing_info,
2765-
e_clock_modeling clock_modeling) {
2748+
const t_timing_inf& timing_info) {
27662749
if (!timing_info.timing_analysis_enabled) {
27672750
VTR_LOG_WARN("Timing analysis is disabled. Post-implementation SDC file "
27682751
"will not be generated.\n");
@@ -2783,7 +2766,7 @@ void generate_post_implementation_sdc(const std::string& sdc_filename,
27832766
add_original_sdc_to_post_implemented_sdc_file(sdc_os, timing_info);
27842767

27852768
// Add propagated clocks to SDC file if needed.
2786-
add_propagated_clocks_to_sdc_file(sdc_os, clock_modeling);
2769+
add_propagated_clocks_to_sdc_file(sdc_os);
27872770
}
27882771

27892772
} // namespace
@@ -2797,7 +2780,6 @@ void netlist_writer(const std::string basename,
27972780
std::shared_ptr<const AnalysisDelayCalculator> delay_calc,
27982781
const LogicalModels& models,
27992782
const t_timing_inf& timing_info,
2800-
e_clock_modeling clock_modeling,
28012783
t_analysis_opts opts) {
28022784
std::string verilog_filename = basename + "_post_synthesis.v";
28032785
std::string blif_filename = basename + "_post_synthesis.blif";
@@ -2822,8 +2804,7 @@ void netlist_writer(const std::string basename,
28222804
VTR_LOG("Writing Implementation SDC : %s\n", sdc_filename.c_str());
28232805

28242806
generate_post_implementation_sdc(sdc_filename,
2825-
timing_info,
2826-
clock_modeling);
2807+
timing_info);
28272808
}
28282809
}
28292810

vpr/src/base/netlist_writer.h

-3
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ class LogicalModels;
2424
* The logical models in the architecture.
2525
* @param timing_info
2626
* Information on the timing used in the VPR flow.
27-
* @param clock_modeling
28-
* The type of clock modeling used in the VPR flow.
2927
* @param opts
3028
* The analysis options.
3129
*/
3230
void netlist_writer(const std::string basename,
3331
std::shared_ptr<const AnalysisDelayCalculator> delay_calc,
3432
const LogicalModels& models,
3533
const t_timing_inf& timing_info,
36-
e_clock_modeling clock_modeling,
3734
t_analysis_opts opts);
3835

3936
/**

vpr/src/base/vpr_api.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1466,8 +1466,11 @@ void vpr_analysis(const Netlist<>& net_list,
14661466

14671467
//Write the post-synthesis netlist
14681468
if (vpr_setup.AnalysisOpts.gen_post_synthesis_netlist) {
1469-
netlist_writer(atom_ctx.netlist().netlist_name(), analysis_delay_calc,
1470-
Arch.models, vpr_setup.Timing, vpr_setup.clock_modeling, vpr_setup.AnalysisOpts);
1469+
netlist_writer(atom_ctx.netlist().netlist_name(),
1470+
analysis_delay_calc,
1471+
Arch.models,
1472+
vpr_setup.Timing,
1473+
vpr_setup.AnalysisOpts);
14711474
}
14721475

14731476
//Write the post-implementation merged netlist

0 commit comments

Comments
 (0)