How slprj folder gets rebuild even after moving [.slxc & .mexw64] files to different folder?
조회 수: 6 (최근 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!