cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
5,883 Views
Registered: ‎05-22-2017

Is OOC supported in non-project flow?

Jump to solution

Hi Xilinx forum,

 

While improving the execution time of my scripted workflow (Vivado 2017.1), I got confused by different information that is around about the possibility of Out-Of-Context (OOC) runs for IP blocks in non-projet mode. In UG892 - Vivado Design Flows (p. 76) it is stated that a OOC checkpoint (.dcp) can be directly used:

 

"Adding a Vivado IP file also uses the design checkpoint file if it exists in the IP directory."

 

So, reading in UG835 - Vivado Design Suite Tcl Guide states for the read_ip command:

 

"When using the read_ip command all output products associated with the IP core, including the design checkpoint file (DCP) will be read into the in-memory design."

 

For the synth_ip command it states that the -force option:

 

"Force re-synthesis of the specified IP objects, even if the generated output products for the specified IP are all current."

 

However, the synthesis runs every time in my workflow. Then I also found this statement in AR# 68921:

 

"Out of Context (OOC) flow is not supported in non-project mode.

The synthesized output (for example, the DCP file) of a previously generated OOC IP core will not be read into memory when the IP core is read in using read_ip."

 

I got confused but thought I can read the .dcp file directly if exists by using the read_checkpoint command if it exists. In a Vivado document (unfortunately I don't find it anymore), it is discouraged to do so.

 

Does somebody can explain me if it is possible to avoid the re-synthesis of the IPs in non-project mode for every run. Would it also be possible to generate a .dcp for block designs? I just found that per-IP-OOC is not possible for block designs but nothing about complete OOC runs for them.

 

Thank you

Chris

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
8,488 Views
Registered: ‎05-22-2017

Re: Is OOC supported in non-project flow?

Jump to solution

Thank you for you answers!

@vemulad : Yes, generate_target and synth_ip generate their output products everytime I call them. So it seems that at least in non-project mode (2017.1) the -force option is constantly activated. Would be nice to have that in updated in the documentation.

The answer of Avrum showed me the solution. To conclude:

To generate the .dcp file, I call the synth_ip command. The next time I just call read_ip and Vivado automatically reads the .dcp file. In my tcl script I use now some logic similar to make, i.e. I check if the .xci file is newer than the .dcp file. Here is the code snippet:

 

# Out-Of-Context synthesis for IPs
foreach ip [get_ips] {
  set ip_filename [get_property IP_FILE $ip]
  set ip_dcp [file rootname $ip_filename]
  append ip_dcp ".dcp"
  set ip_xml [file rootname $ip_filename]
  append ip_xml ".xml"

  if {([file exists $ip_dcp] == 0) || [expr {[file mtime $ip_filename ] > [file mtime $ip_dcp ]}]} {

    # remove old files of IP, if still existing
    reset_target all $ip
    file delete $ip_xml

    # re-generate the IP
    generate_target all $ip
    set_property generate_synth_checkpoint true [get_files $ip_filename]
    synth_ip $ip
  }
}


There is actually an addition that I figured out while testing. If the output products are kept and only the .xci file is updated, a black_box error appears in the opt_design command. I solved that by reseting all the IP before the regeneration. Having a look at the timestamps of the files, it seems not everything is re-generated and some old files cause the issue.

The question that remains. Is it also possible to generate a .dcp file for block designs? In my view, they are also this kind of mini-projects as mentioned by Avrum. So, a .dcp generation should be possible.

Chris

View solution in original post

4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
5,867 Views
Registered: ‎09-20-2012

Re: Is OOC supported in non-project flow?

Jump to solution

Hi @chamch

 

As per my understanding, the generate_target/synth_ip will generate IP output products only if they are out of date unless you use -force switch. 

 

Are you saying that the tool is regenerating the files each time you run the script even when the IP output products are generated and up to date?

Thanks,
Deepika.
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left)
0 Kudos
Guide
Guide
5,831 Views
Registered: ‎01-23-2009

Re: Is OOC supported in non-project flow?

Jump to solution

You are right to be confused here... The methodology of using IP in non-project mode changed a number of times since the introduction of Vivado, and some of the documentation isn't consistent with the latest view.

 

An IP core is, by definition, a mini-project. By the fact that it has output products that live in a specific directory location relative to the IP's top directory, it is inherently project mode. Furthermore, it has to be - the concept of generated targets, etc... force it to be.

 

So, when you create an IP you work in project mode - either a "real" project or a "Manage IP" project. In that environment, each IP you generate creates an "IP directory". In that IP directory are a large number of files, including

  - the .xci file - this is the "proxy" for the entire IP

  - the .dcp file (if the IP was built OOC)

  - the synthesis targets (in a subdirectory) - often synthesizable code for the IP

     - includes constraints for the IP
  - simulation directory, example design directory ...

 

All of these are "project like". The .xci is (sort of) the master file of the IP, and the rest of the directory stuff are the "generated targets" for the IP.

 

In project mode the dependency management stuff kicks in - automatically generating targets as necessary for the process you are going to do in your project.

 

In non-project mode, obviously the dependency management is disabled. Nonetheless,  you still need to use the entire project directory of the IP in your non-project design. You add it to your design with read_ip (not read_checkpoint), using the .xci as the "file" to read. But the .xci really points to the things that the non-project design needs - namely the DCP and the XDC files. These must have been generated in your original project - the non-project environment can't generate the targets for you (unless that has changed recently, and you can force it to with the generate_target command).

 

So, it does use the .dcp file, but you don't actually specify the .dcp file - you tell the tool about the .xci file, and it uses the .dcp file referenced by the .xci file  (along with the .xdc constraints) in your non-project design.

 

Avrum

Tags (2)
Highlighted
Observer
Observer
8,489 Views
Registered: ‎05-22-2017

Re: Is OOC supported in non-project flow?

Jump to solution

Thank you for you answers!

@vemulad : Yes, generate_target and synth_ip generate their output products everytime I call them. So it seems that at least in non-project mode (2017.1) the -force option is constantly activated. Would be nice to have that in updated in the documentation.

The answer of Avrum showed me the solution. To conclude:

To generate the .dcp file, I call the synth_ip command. The next time I just call read_ip and Vivado automatically reads the .dcp file. In my tcl script I use now some logic similar to make, i.e. I check if the .xci file is newer than the .dcp file. Here is the code snippet:

 

# Out-Of-Context synthesis for IPs
foreach ip [get_ips] {
  set ip_filename [get_property IP_FILE $ip]
  set ip_dcp [file rootname $ip_filename]
  append ip_dcp ".dcp"
  set ip_xml [file rootname $ip_filename]
  append ip_xml ".xml"

  if {([file exists $ip_dcp] == 0) || [expr {[file mtime $ip_filename ] > [file mtime $ip_dcp ]}]} {

    # remove old files of IP, if still existing
    reset_target all $ip
    file delete $ip_xml

    # re-generate the IP
    generate_target all $ip
    set_property generate_synth_checkpoint true [get_files $ip_filename]
    synth_ip $ip
  }
}


There is actually an addition that I figured out while testing. If the output products are kept and only the .xci file is updated, a black_box error appears in the opt_design command. I solved that by reseting all the IP before the regeneration. Having a look at the timestamps of the files, it seems not everything is re-generated and some old files cause the issue.

The question that remains. Is it also possible to generate a .dcp file for block designs? In my view, they are also this kind of mini-projects as mentioned by Avrum. So, a .dcp generation should be possible.

Chris

View solution in original post

Highlighted
Moderator
Moderator
5,632 Views
Registered: ‎04-24-2013

Re: Is OOC supported in non-project flow?

Jump to solution

Hi Chamch,

 

Chapter 4 of User Guide 939 has some really good information on using OOC in non project mode along with a complete tcl script that you should find useful.

 

Also chapter 4 of User Guide 892 has information and a sample script for non-project flow. It is less focused on IP and more on project creation.

 

Best Regards
Aidan

------------------------------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if this answered your question
Give Kudos to a post which you think is helpful and may help other users
------------------------------------------------------------------------------------------------------------------