Synthesis with Synplify

FPGA 2011. 12. 6. 17:51

FPGA에서 design을 수행하기 위해서는 먼저 design RTL을 synthesis해야 한다.
Synthesis하는 과정은 사용자가 작성한 RTL을 FPGA에 담기위해서 AND, OR, flip-flop, memory와 같은 logic element로 분해하는 과정을 말한다.

Synthesis과정은 Xilinx ISE를 통해 할 수도 있지만, 보통은 Synplify를 통해 수행한다.

다음은 Synplify를 통해 synthesis하는 명령어이다.

syplify_premier_dp -license_wait -batch -tcl ${TopName}.tcl

각각의 option에 대해서 살펴보면

-license_wait: License가 부족할 때 license queuing을 하라는 option이다.
-batch: Batch모드로 synplify를 수행하라는 option이다.
-tcl ${TopName}.tcl: Batch모드에서 수행할 command가 정리되어 있는 ${TopName}.tcl 파일이다.

그럼 Synplify에서 합성하기 위한 synthesis script인 tcl 파일에 대해서 알아보도록 하자.

1. Synthesis Script (tcl 파일)
Synthesis script는 크게 다음과 같은 순으로 작성되어 있다.

1. Create project
2. Add implementation
3. Set options
4. Add source files
5. Set result file
6. Run
7. Save project

그럼 실제 synthesis에 사용되는 synthesis script를 보며 각각에 대해 알아보도록 하자

# 아래서 사용될 path를 지정해주는 script이다.
set CURDIR [pwd]
set RTLDIR ./../../rtl
set PRJDIR ./../proj
set VLGDIR ./../verilog

# 1. Create project (프로젝트를 생성해주고 일단 한번 저장한다.)
project -new ${PRJDIR}/${TopName}.prj
project -save ${PRJDIR}/${TopName}.prj

# 2. Add implementation(결과물을 저장할 path라고 생각하면 된다.)
impl -add ${PRJDIR}/syn

# 3. Set options
# Set the target technology, part number,
# package, and speed grade options.
set_option -technology VIRTEX6
set_option -part XC6VLX760
set_option -package FF1760
set_option -speed_grade -1

set_option -enable64bit 1
set_option -fsm_explorer 0
set_option -resource_sharing 1
set_option -retiming 0
set_option -pipe 0
set_option -vlog_std v2001
set_option -compiler_compatible 1
set_option -write_verilog 1 
set_option -maxfan 1000 
set_option -enable_prepacking 0 
#set_option -run_prop_extract 1 
#set_option -fixgatedclocks 0 
#set_option -fixgeneratedclocks 0 
#set_option -par_use_xflow 1 
#set_option -par_use_xilinx_partition 1 
#set_option -resolve_multiple_driver 1 
#set_option -gcc_prepass 0 
#set_option -no_sequential_opt 0 
#set_option -createhierarchy 0 
#set_option -symbolic_fsm_compiler 1 
#set_option -auto_constrain_io 1 
#set_option -write_apr_constraint 0

set_option -hdl_define -set "FPGA"
set_option include_path "${RTLDIR}/include"

# 4. Add source files
# Load the necessary Verilog files.
# Add the top-level design last.

add_file -verilog ${RTLDIR}/A.v
add_file -verilog ${VLGDIR}/B.v
add_file -verilog ${RTLDIR}/Top.v
add_file -constraint cons.sdc

set_option -top_module Top

# Turn on the Symbolic FSM Compiler to
# re-encode the state machine into one-hot.

set_option -symbolic_fsm_compiler false

# Set the design frequency.
set_option -frequency 50

# 5. Set result file
project -result_file "${TopName}.edf"

# 6. Run
# Synthesize the existing Project
project -run -fg -all

# 7. Save project
project -save

각각의 option을 정리하면 다음과 같다.

set_option -technology VIRTEX6: Target FPGA의 technology를 설정해준다.
set_option -part XC6VLX760: Target FPGA의 part number를 설정해준다.
set_option -package FF1760: Target FPGA의 package number를 설정해준다.

set_option -hdl_define -set "FPGA": RTL에 적용될 definition을 설정해준다.
set_option include_path "${RTLDIR}/include": RTL에서 include된 파일을 찾을 위치를 지정해준다.
set_option -write_verilog 1: 합성된 결과물인 EDIF파일 이외에
                                       합성 결과를 verilog로도 저장할 것을 지정해준다.
set_option -top_module Top: 합성될 design의 top module을 지정해준다.
set_option -frequency 50: 합성된 결과가 FPGA상에서 수행될 frequency를 지정해준다 (단위 MHz)
set_option -vlog_std v2001: 합성될 design의 RTL language인 verilog의 버전을 명시한다.

set_option -speed_grade -1
set_option -enable64bit 1
set_option -fsm_explorer 0
set_option -resource_sharing 1
set_option -retiming 0
set_option -pipe 0

set_option -compiler_compatible 1
set_option -maxfan 1000
set_option -enable_prepacking 0
set_option -run_prop_extract 1
set_option -fixgatedclocks 0
set_option -fixgeneratedclocks 0
set_option -par_use_xflow 1
set_option -par_use_xilinx_partition 1
set_option -resolve_multiple_driver 1
set_option -gcc_prepass 0
set_option -no_sequential_opt 0
set_option -createhierarchy 0
set_option -symbolic_fsm_compiler 1
set_option -auto_constrain_io 1
set_option -write_apr_constraint 0
set_option -symbolic_fsm_compiler false


 더 자세한 사항은 아래 첨부파일을 참고하도록 한다.

위의 synthesis script

'FPGA' 카테고리의 다른 글

Mapping, PNR with Xilinx ISE  (0) 2011.12.09
Posted by sunshowers
,