Skip to content

Commit

Permalink
Merge pull request f4pga#1906 from antmicro/allow-custom-top-module
Browse files Browse the repository at this point in the history
xc7: yosys: allow custom top module instead of using only auto-top
  • Loading branch information
litghost committed Jan 5, 2021
2 parents 65874e7 + 3c6219f commit 45cc311
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions xc/xc7/toolchain_wrappers/symbiflow_synth
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ fi

DATABASE_DIR=${DATABASE_DIR:=$(prjxray-config)}

export TOP=${TOP}
export USE_ROI="FALSE"
export INPUT_XDC_FILE=${XDC_FILES[*]}
export OUT_JSON=$TOP.json
Expand Down
6 changes: 5 additions & 1 deletion xc/xc7/yosys/synth.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ if { $::env(USE_ROI) == "TRUE" } {
# Re-targetting FD to FDREs
techmap -map $::env(TECHMAP_PATH)/retarget.v

hierarchy -check -auto-top
if { [info exists ::env(TOP)] && $::env(TOP) != "" } {
hierarchy -check -top $::env(TOP)
} else {
hierarchy -check -auto-top
}

# Start flow after library reading
synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -nowidelut -run prepare:check
Expand Down

0 comments on commit 45cc311

Please sign in to comment.