Speeding up Simulink compile times and the use of CUDA cores
2 次查看(过去 30 天)
显示 更早的评论
I am running a master script file which calls a number of files in successive order. #1 is a simulink simulation that takes in data from the audio card, demodulates and filters it then puts the data stream on workspace as bunch of bits in order. #5 is another simulink file takes pre-arranged and entered bits from the workspace, modulates, adds coding and then transmits it through the audio device which is the sound card again. Both of these models have over 20 blocks in them. Both have them additional side circuits that check to make sure that they won't run longer than necessary such as stopping the simulation if there is no signal at the input etc..
When I am continuously running the master file and supplying it with signal intermittently, my what I call transceiver is basically deaf for long periods of time because it takes on average 25-30 seconds to compile the simulink models. It will first run the receiver for a 10 seconds, if it detects a signal, it will stop the receiver simulink file,run the rest of the code and then run the transmitter to send it's answer. Then it will stop the transmitter and run receiver again waiting for more data. So to go around just one time, I am spending 60 seconds or so in compiling area. I tried to run the accelerator mode but it does not seem to be making a big difference.
Question 1) When I run the simulation under accelerator or rapid accelerator, do I need to let it build the mex file and then later go back and call that mex file or the original .slx simulink file? I feel like I am doing something wrong since nothing is accelerating. A professor of mine checked the code and said that the check sum is not changing from compile to compile, so I do not know why matlab is recompiling the model every time it wants to run it.
Question 2) I have 2 brand new graphics cards running in SLI(parallel) with 1536 cuda cores each. Is there any way I can run my simulink files on those cores to speed up the compiling part of the model? I realistically need to lower the compiling to sub 5 seconds in order to have a viable model that would work with a real radio transceiver. I have access to almost all the simulink toolboxes through my school.
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!