노하우24 메인게시판

[VIVADO] 여러 종류의 합성 모드와 구현 모드를 실행 시키는 스크립트

페이지 정보

작성자 최고관리자 작성일21-03-02 08:29 조회3,116회 댓글0건

본문

다음 내용을 vivado_run.tcl 로 저장하여 구현할 디자인 프로젝트를 로드한 다음, tcl 명령 창에서 실행하면 됨

 

최종 타이밍 결과 값을 확인 할 수 있으므로, 시간만 많다면 제일 좋은 전략을 확인 할 수 있음

 

-------------- cut here ---------

# 모든 종류의 합성전략과 구현 전략을 실행 시키는 스크립트

# 사용방법:

# 1. vivado 에서 구현 하고자 하는 디자인을 연다.

# 2. tcl 명령 창에서 source vivado_run.tcl 입력

#   만약, 에러가 난다면 빨간색으로... 출력되고 아니라면 그냥 변화 없음.(프로그램 소스코드가 출력됨)

# 3. tcl 명령 창에서, ImplTrial::launch 입력 하면, 프로그램 시작.

 

 

namespace eval ImplTrial {

    set version 2018

    set coreNum 3

 

    proc getCurDateTime {} {

        return [clock format [clock seconds]]

    }

 

    namespace eval Synth {

        set flow "Vivado Synthesis ${ImplTrial::version}"

        namespace eval Strategy {

            set Default                   {}

            set Flow_AreaOptimized_high   {Flow_AreaOptimized_high}

            set Flow_AreaOptimized_medium {Flow_AreaOptimized_medium}

            set Flow_AreaMultThresholdDSP {Flow_AreaMultThresholdDSP}

            set Flow_AlternateRoutability {Flow_AlternateRoutability}

            set Flow_PerfThresholdCarry   {Flow_PerfThresholdCarry}

            set Flow_PerfOptimized_high   {Flow_PerfOptimized_high}

            set Flow_RuntimeOptimized     {Flow_RuntimeOptimized}

        }

 

        set strategies [list \

                            $Strategy::Default \

                            $Strategy::Flow_AreaOptimized_high \

                            $Strategy::Flow_AreaOptimized_medium \

                            $Strategy::Flow_AreaMultThresholdDSP \

                            $Strategy::Flow_AlternateRoutability \

                            $Strategy::Flow_PerfThresholdCarry \

                            $Strategy::Flow_PerfOptimized_high \

                            $Strategy::Flow_RuntimeOptimized]

        proc launchRun {index} {

            set name synth_s${index}

            puts "--------------------------------------------------------------------------------"

            puts "| ${name} began @ [ImplTrial::getCurDateTime]"

            puts "--------------------------------------------------------------------------------"

            variable flow

            variable strategies

            create_run ${name} -flow ${flow} -strategy [lindex ${strategies} ${index}]

            launch_runs ${name} -jobs ${ImplTrial::coreNum}

            wait_on_run ${name}

            puts "--------------------------------------------------------------------------------"

            puts "| ${name} finished @ [ImplTrial::getCurDateTime]"

            puts "--------------------------------------------------------------------------------"

        }

    }

 

    namespace eval Implementation {

        set flow "Vivado Implementation ${ImplTrial::version}"

        namespace eval Strategy {

            set Default                               {}

            set Performance_Explore                   {Performance_Explore}

            set Performance_ExplorePostRoutePhysOpt   {Performance_ExplorePostRoutePhysOpt}

            set Performance_WLBlockPlacement          {Performance_WLBlockPlacement}

            set Performance_WLBlockPlacementFanoutOpt {Performance_WLBlockPlacementFanoutOpt}

            set Performance_NetDelay_high             {Performance_NetDelay_high}

            set Performance_NetDelay_low              {Performance_NetDelay_low}

            set Performance_Retiming                  {Performance_Retiming}

            set Performance_ExtraTimingOpt            {Performance_ExtraTimingOpt}

            set Performance_RefinePlacement           {Performance_RefinePlacement}

            set Performance_SpreadSLLs                {Performance_SpreadSLLs}

            set Performance_BalanceSLLs               {Performance_BalanceSLLs}

            set Congestion_SpreadLogic_high           {Congestion_SpreadLogic_high}

            set Congestion_SpreadLogic_medium         {Congestion_SpreadLogic_medium}

            set Congestion_SpreadLogic_low            {Congestion_SpreadLogic_low}

            set Congestion_SpreadLogic_Explore        {Congestion_SpreadLogic_Explore}

            set Congestion_SSI_SpreadLogic_high       {Congestion_SSI_SpreadLogic_high}

            set Congestion_SSI_SpreadLogic_low        {Congestion_SSI_SpreadLogic_low}

            set Congestion_SSI_SpreadLogic_Explore    {Congestion_SSI_SpreadLogic_Explore}

            set Area_Explore                          {Area_Explore}

            set Area_ExploreSequential                {Area_ExploreSequential}

            set Area_ExploreWithRemap                 {Area_ExploreWithRemap}

            set Power_DefaultOpt                      {Power_DefaultOpt}

            set Power_ExploreArea                     {Power_ExploreArea}

            set Flow_RunPhysOpt                       {Flow_RunPhysOpt}

            set Flow_RunPostRoutePhysOpt              {Flow_RunPostRoutePhysOpt}

            set Flow_RuntimeOptimized                 {Flow_RuntimeOptimized}

            set Flow_Quick                            {Flow_Quick}

        }

 

        set strategies [list \

                            $Strategy::Default \

                            $Strategy::Performance_Explore \

                            $Strategy::Performance_ExplorePostRoutePhysOpt \

                            $Strategy::Performance_WLBlockPlacement \

                            $Strategy::Performance_WLBlockPlacementFanoutOpt \

                            $Strategy::Performance_NetDelay_high \

                            $Strategy::Performance_NetDelay_low \

                            $Strategy::Performance_Retiming \

                            $Strategy::Performance_ExtraTimingOpt \

                            $Strategy::Performance_RefinePlacement \

                            $Strategy::Performance_SpreadSLLs \

                            $Strategy::Performance_BalanceSLLs \

                            $Strategy::Congestion_SpreadLogic_high \

                            $Strategy::Congestion_SpreadLogic_medium \

                            $Strategy::Congestion_SpreadLogic_low \

                            $Strategy::Congestion_SpreadLogic_Explore \

                            $Strategy::Congestion_SSI_SpreadLogic_high \

                            $Strategy::Congestion_SSI_SpreadLogic_low \

                            $Strategy::Congestion_SSI_SpreadLogic_Explore \

                            $Strategy::Area_Explore \

                            $Strategy::Area_ExploreSequential \

                            $Strategy::Area_ExploreWithRemap \

                            $Strategy::Power_DefaultOpt \

                            $Strategy::Power_ExploreArea \

                            $Strategy::Flow_RunPhysOpt \

                            $Strategy::Flow_RunPostRoutePhysOpt \

                            $Strategy::Flow_RuntimeOptimized \

                            $Strategy::Flow_Quick]

 

        proc launchRun {index_s index_i} {

            set impl_name impl_${index_s}_${index_i}

            set synth_name synth_s${index_s}

            puts "--------------------------------------------------------------------------------"

            puts "| ${impl_name} began @ [ImplTrial::getCurDateTime]"

            puts "--------------------------------------------------------------------------------"

            variable flow

            variable strategies

            create_run ${impl_name} -parent_run ${synth_name} -flow ${flow} -strategy [lindex ${strategies} ${index_i}]

            launch_runs ${impl_name} -to_step write_bitstream -jobs ${ImplTrial::coreNum}

            wait_on_run ${impl_name}

 

            puts "--------------------------------------------------------------------------------"

            puts "| ${impl_name} finished @ [ImplTrial::getCurDateTime]"

            puts "--------------------------------------------------------------------------------"

        }

    }

 

    proc launchRun {} {

        puts "================================================================================"

        puts "| ImplTrial::laucnRun began @ [ImplTrial::getCurDateTime]"

        puts "================================================================================"

        for {set i 0} {$i < [llength ${Synth::strategies}]} {incr i} {

            Synth::launchRun $i

            for {set j 0} {$j < [llength ${Implementation::strategies}]} {incr j} {

                Implementation::launchRun $i $j

            }

        }

        puts "================================================================================"

        puts "| ImplTrial::laucnRun finished @ [ImplTrial::getCurDateTime]"

        puts "================================================================================"

    }

}

-------------- cut here ---------​

 

 

댓글목록

등록된 댓글이 없습니다.