How slprj folder gets rebuild even after moving [.slxc & .mexw64] files to different folder?
7 次查看(过去 30 天)
显示 更早的评论
Hi All, I'm using Matlab 2018b version.
When I try to simulate my reference model in accelerator mode at first it took quite large time to build. Once after generating cache files I just moved the cache files [except slprj] to different folder [which is added in matlab path]. So in my current working dir I have reference model files,init file & slprj folder.
If I try to rebuild the model again in accelerator mode it tooks very less time to get simulated. I know that the [.slxc & .mexw64] were stored in different path and also I have added the same path to matlab but my question is how the model gets rebuilded without [.slxc & .mexw64] in the current working dir?
Is there any files in [slprj] folder is mapped or referring with the [.slxc & .mexw64] ?
0 个评论
回答(1 个)
Zuber Khan
2024-9-16
Hi,
In MATLAB, when you simulate a model in "Accelerator" mode, it generates several files that help speed up subsequent simulations. These include:
.slxc files: These are Simulink cache files that store build artifacts from your model.
.mexw64 files: These are compiled MEX files that execute the model's code.
The "slprj" folder contains metadata and other files that help manage the cache. It includes information about the model's build process and dependencies. This allows MATLAB to determine if the existing cache files are still valid or if they need to be rebuilt.
The second time when you simulate a top model in accelerator mode, Simulink builds only the out-of-date files as long as the "Rebuild" configuration parameter is set to "If changes detected" (default) or "If changes in known dependencies detected". With fewer files to build, the actions complete faster.
You can refer to the following documentation link for more information.
Further, when you add the directory containing the ".slxc" and ".mexw64" files to your MATLAB path, MATLAB can locate these files even if they aren't in the current working directory.
This is why your model can be rebuilt and simulated quickly without having the ".slxc" and ".mexw64" files in the current directory.
I hope it helps.
Regards,
Zuber
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model References 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!