xilinx.environment.getcachepath is used to get the path Model Composer currently uses to store the simulation cache.
xilinx.environment.setcachepath is used to change the path Model Composer uses to store the simulation cache.
When you simulate a Simulink model containing Xilinx IP in Model Composer, the Vivado simulator simulation data for that particular IP configuration is cached to speed up the simulation.
Model Composer establishes the simulation cache at a default location at startup, and you can determine the current path to the simulation cache with the xilinx.environment.getcachepath command. If you need to change the location of the simulation cache, use the xilinx.environment.setcachepath command. You will need to have write permission on the destination path directory. The new path will apply for the remainder of your Model Composer session.
One reason you would use xilinx.environment.setcachepath is to set the path if you do not have write permission on the default directory Model Composer uses for caching simulation data.
- Example 1: Getting the current simulation cache path
>> xilinx.environment.getcachepath ans = C:\Users\my_login/AppData/Local/Xilinx/Sysgen/SysgenVivado/win64.o
- Example 2: Setting a new simulation cache path
>> xilinx.environment.setcachepath('C:\sim_cache') ans = C:\sim_cache >> xilinx.environment.getcachepath ans = C:\sim_cache