cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fircrestsk8
Observer
Observer
3,598 Views
Registered: ‎03-14-2016

Multithreading vivado synthesis in SDSoC

Jump to solution

I noticed that synthesis in SDSoC didn't seem to be using much of my total CPU, so I looked around a bit and found the following line in the top.impl.tcl file of the p0/ipi/ folder:

launch_runs synth_1 -jobs 2

It appears the launch script is only running synthesis with 2 jobs... since SDSoC seems to be doing an out of context build, this seems wildly inefficient on my quad core computer. Most of the time is spent synthesizing the individual cores, and they can all be done in parallel. 

Any way to up this from 2 jobs to 4? I'm betting I could shave at least 15 min off my build... I've been waiting for 30 min for the IP's to finish synthesizing, and they still aren't done. 

 

--SamB

0 Kudos
1 Solution

Accepted Solutions
sskalick
Xilinx Employee
Xilinx Employee
5,691 Views
Registered: ‎06-29-2015

Hi Sam,

 

Check out the System Options on page 100 of UG1027: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_3/ug1027-sdsoc-user-guide.pdf

 

There are two options:

1. use the -maxthreads <n> options to specify the number of threads (pg. 104)

2. use the template for impl.tcl and add whatever tcl commands you want to configure synth/impl (pg.102-104)

 

Sam

View solution in original post

0 Kudos
3 Replies
sskalick
Xilinx Employee
Xilinx Employee
5,692 Views
Registered: ‎06-29-2015

Hi Sam,

 

Check out the System Options on page 100 of UG1027: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_3/ug1027-sdsoc-user-guide.pdf

 

There are two options:

1. use the -maxthreads <n> options to specify the number of threads (pg. 104)

2. use the template for impl.tcl and add whatever tcl commands you want to configure synth/impl (pg.102-104)

 

Sam

View solution in original post

0 Kudos
fircrestsk8
Observer
Observer
3,566 Views
Registered: ‎03-14-2016

Thanks Sam. What's the preferred method of adding the sdscc and sds++ command line options when using the SDx GUI? I'd like to add these options from the "Build C/C++ Settings" GUI if possible, but there seem to be a lot of different areas to add additional flags... Should I use the Other Flags box inside the Miscellaneous tab?

0 Kudos
fircrestsk8
Observer
Observer
3,559 Views
Registered: ‎03-14-2016

K, so adding the -impl-tcl to the flags box in the Miscellaneous section of the SDS Linker Build settings (not the SDS++ or SDSCC compiler options) did the trick! 100% CPU utilization during the build now, I can barely get my computer to type out this post :). I also added a -maxthreads 8 option just to be safe, but I'm not sure that was necessary.

 

Note that the maxthreads option alone did not do the trick, because it only adds the following to the top.impl.tcl:

 

set_param general.maxThreads 8

 

it doesn't change the fact that synthesis still gets called with the "jobs -2" option in the .tcl script. It would be nice if the tools used the -maxthreads option in the SDS linker to also tweak the -jobs option in the automatically generated top.impl.tcl file... 

 

Anyways, here is the contents of the .tcl I pointed to with the -impl-tcl command so other people can use it to decrease SDSoC build times:

# ***************************************************
# Run synthesis and implementation
# ***************************************************
set_property STEPS.OPT_DESIGN.IS_ENABLED true [get_runs impl_1]
set_property STEPS.OPT_DESIGN.ARGS.DIRECTIVE Default [get_runs impl_1]
set_msg_config -id {[Pfi 67-13]} -new_severity INFO
reset_run synth_1
launch_runs synth_1 -jobs 4
wait_on_run synth_1
set synth_ok 0
set synth_status [get_property STATUS [get_runs synth_1]]
set synth_progress [get_property PROGRESS [get_runs synth_1]]
if {$synth_status == "synth_design Complete!" && $synth_progress == "100%"} {
  set synth_ok 1
}
if {$synth_ok == 0} {
  puts "ERROR: \[SDSoC 0-0\]: Synthesis failed : status $synth_status : progress $synth_progress"
  exit 1
}
launch_runs impl_1 -to_step write_bitstream
wait_on_run impl_1

0 Kudos