Setting the IP Cache - 2021.1 English

Vivado Design Suite User Guide: Designing with IP (UG896)

Document ID
UG896
Release Date
2021-07-08
Version
2021.1 English

To speed up generation of the synthesis output products for an IP using the default OOC flow in Project Mode, the IP Cache option is enabled by default. With the cache enabled, when you generate an IP using the default OOC flow for synthesis, the Vivado tool creates synthesis output products (such as DCP and stub files) and a cache entry.

Cache ID: Unique series of random character and number for reference generated.

A cache entry consists of two directories on disk:

  • <cache ID>: Contains the XCI, DCP, sim_netlist, and stub files.
  • <cache ID>.logs: Contains the synthesis log (runme.log).

After the cache is populated, and when you create a new customization of the IP with the same properties, the IP are not synthesized again during generation. Instead, the Vivado references the cache and copies the synthesis output. The IP refers to the already synthesized IP, eliminating the need to run OOC synthesis for other IP of the same customization.

When you generate an IP with the cache enabled, the Vivado tool creates a design run as normal if there is no cache hit. However, if there is a cache hit, then the synthesis results (DCP and stub files) are copied from the cache directory to the IP directory and renamed. No design run is created, though an entry is added which reports the cache hit, as shown in the following figure.

Figure 1. Design Runs Status

After generation, a dialog box informs you if a cache hit has occurred.

The following is an example of the INFO message that the Vivado tools produce in the Tcl Console and stores in the vivado.log:

INFO: [IP_Flow 19-4993] Using cached IP synthesis design for IP fifo_0, 
cache-ID = aa71c47ae9ccd380; cache size = 0.383 MB.

This shows you the cache ID used as well as the current size of the IP Cache.

For a cache hit to occur, the IP must be customized identically and have the same part and language settings. After you generate the IP, that IP does not reference the cache location. All output products for an IP are stored local to the project. The cache is only referenced during the generation of IP output products.

CAUTION:
IP Cache can grow large, depending on the number of IP present.

To manage the IP Cache, use the config_ip_cache Tcl command. Using this command, you can list the cache contents and the size of the cache in KB. Additionally, you can run the config_ip_cache -zip_cache command to zip up the cache entries used in the current project. This zipped cache can be used as a read-only user repository cache without having to unzip the file. See the Vivado Design Suite Tcl Command Reference Guide (UG835) for more information.

Configuring IP Cache for New Projects

By default, all new projects have the IP Cache enabled and configured to be local to the project; however, it can be advantageous to have multiple people/groups point to the same cache location. This can reduce the use of disk space because each user does not need to generate the same IP used by others.

To configure newly-created projects to disable the cache or specify a remote location as a default, you can use the Vivado_init.tcl and add a parameter to control the project.defaultIPCacheSetting. See this link for more information from the Vivado Design Suite User Guide: Using Tcl Scripting (UG894) about the Vivado_init.tcl file and initialization scripts.

When using a shared cache, create a directory specifically for the IP cache and point to that directory. IP cache entries are created under that directory, and a parent directory is not created. If you set the remote location somewhere where there are many other sub-directories, it slows the project creation because the Vivado tool scans the directories for cache entries.

Setting Cache in the Vivado_init.tcl Example

The following is an example of how to disable the IP Cache using the Vivado_init.tcl file:

set_param project.defaultIPCacheSetting none

The following is an example on setting the IP Cache to be in a remote location:

  • Linux: set_param project.defaultIPCacheSetting /wrk/staff/smith/ip_cache/
  • Windows: set_param project.defaultIPCacheSetting c:/<project_dir>/ip_cache/