| Contents | Index |
MATLAB command line
xpcbench(model) xpcbench(model,P1) xpcbench(model,P1,P2) xpcbench(model,P1,P2,P3)
| Argument | Value | Description |
|---|---|---|
model | 'minimal' | Benchmark the default minimal model. |
| 'f14' | Benchmark the default f14 model (one f14 system). | |
| 'f14*5' | Benchmark the default f14*5 model (five copies of the f14 system). | |
| 'f14*10' | Benchmark the default f14*10 model (ten copies of the f14 system). | |
| 'f14*25' | Benchmark the default f14*25 model (25 copies of the f14 system). | |
| 'this' | Benchmark all five default models (the default minimal model plus all four default f14 models). | |
| 'usermdl' | Benchmark your model, usermdl.mdl. | |
Up to three optional arguments: P1, P2, and P3 | '-reboot' | Reboot the target computer after testing each model. |
| '-cleanup' | Delete build files after running benchmarks. | |
| '-verbose' | Plot and display results in the MATLAB Command Window. |
xpcbench benchmarks the real-time execution performance of xPC Target applications on your target computer and compares the result with prestored benchmark results from other computers.
The prestored target computer benchmark results of five models (applications) are provided, each model compiled using a sampling of the currently supported compilers (see http://www.mathworks.com/support/compilers/current_release/). Compare these results with those for your target computer. Results are labeled by CPU type, CPU clock rate, and the compiler used to compile the application.
The five benchmark models are:
| Benchmark | Description |
|---|---|
| minimal | Based on a minimal model consisting of just three blocks (Constant, Gain, Termination). This model has neither continuous nor discrete states. The result of this benchmark gives an impression about the target computer interrupt latencies. |
| f14 | Based on the standard Simulink example model f14. Type f14 in the MATLAB Command Window to open the model and view the model (62 blocks, 10 continuous states). |
| f14*5 | Five f14 systems modeled in subsystems (310 blocks, 50 continuous states). This benchmark is five times more demanding than benchmark F14. |
| f14*10 | Ten f14 systems (620 blocks, 100 continuous states). |
| f14*25 | 25 f14 systems (1550 blocks, 250 continuous states). |
xpcbench without an argument displays two plot figures, each containing different representations of the prestored target computer benchmark results. The first plot lists, for each target computer tested, the smallest achievable sample time for the five benchmarks, in microseconds. The second plot contains a bar graph of all computers, ranked by relative performance.
Note
|
xpcbench(model) benchmarks your target computer using argument model. You can specify:
All five default benchmarks ('this')
One of the five default benchmarks ('minimal', 'f14', 'f14*5', 'f14*10', 'f14*25')
Your model ('usermdl')
Before you run xpcbench, you must connect the host machine to the target computer and run the xPC Target test, xpctest, with no failures.
Benchmark execution can take several minutes to complete, including:
Generating the benchmark models
Building and downloading the xPC Target applications
Searching for the smallest achievable sample time
Displaying the performance results in the MATLAB Command Window, along with the prestored results for the other target computers
res = xpcbench returns the prestored benchmark results in a structure array with fields:
| Field Name | Contents |
|---|---|
| Machine | Target computer information string containing CPU type, CPU speed, compiler |
| BenchResults | Target computer benchmark performance for the five default models 'minimal', 'f14', 'f14*5', 'f14*10', 'f14*25' |
| Desc | Target computer descriptor string containing machine type, RAM size, cache size |
res = xpcbench(model) returns the benchmark results for model in a structure with fields:
| Field Name | Contents |
|---|---|
| Name | Name of model |
| nBlocks | Number of blocks in model |
| BuildTime | Elapsed time in seconds to build model |
| BenchTime | Elapsed time in seconds to run benchmark for model |
| Tsmin | Minimal achievable sample time in seconds for model |
Prestored benchmark results showing what to expect of representative processors.
Boot the target computer using your chosen method.
Connect it to the host computer.
xpctest
res = xpcbench; res(1)
ans =
Machine: 'Intel Celeron M 600MHz (VisualC10.0)'
BenchResults: [1.0000e-05 1.4000e-05 2.5000e-05
4.4000e-05 1.0800e-04]
Desc: [1x70 char]The array contains benchmark results for each processor type, in arbitrary order.
xpcbench


Benchmark using the five default models.
Boot the target computer using your chosen method.
Connect it to the host computer.
xpctest
res = xpcbench('this');
res(1)ans =
Name: 'Minimal'
nBlocks: 3
BuildTime: 28.2558
BenchTime: 23.3845
Tsmin: 8.3770e-06xpcbench('this')


Benchmark using model f14*5 only.
Boot the target computer using your chosen method.
Connect it to the host computer.
xpctest
res = xpcbench('f14*5')
resres =
Name: 'F14*5'
nBlocks: 310
BuildTime: 32.8377
BenchTime: 29.7613
Tsmin: 1.3148e-05xpcbench('f14*5')Benchmark results for model: F14*5 Number of blocks in model: 310 Elapsed time for model build (sec): 38.3 Elapsed time for model benchmark (sec): 29.7 Minimal achievable sample time (microsec): 14.1
Benchmark the target computer using the five default models, rebooting after each test.
Boot the target computer using your chosen method.
Connect it to the host computer.
xpctest
xpcbench('this','-reboot')


Benchmark the target computer using model xpcosc.mdl, delete the build files when done, and display full results in the MATLAB Command Window.
Boot the target computer using your chosen method.
Connect it to the host computer.
xpctest
xpcbench('xpcosc','-cleanup','-verbose');
Benchmark results for model: xpcosc Number of blocks in model: 287 Elapsed time for model build (sec): 28.7 Elapsed time for model benchmark (sec): 26.1 Minimal achievable sample time (microsec): 5.5
Benchmark the target computer using the five default models, reboot after each test, store the results in res, delete the build files when done, and display full results in the MATLAB Command Window.
Boot the target computer using your chosen method.
Connect it to the host computer.
xpctest
res = xpcbench('this','-reboot','-cleanup','-verbose');


res(1)
ans =
Name: 'Minimal'
nBlocks: 3
BuildTime: 51.2185
BenchTime: 23.4161
Tsmin: 4.9727e-06
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |