11.3.6. Real-time simulation example: Dhrystone

To work through this example, you must create a map file. (If a map file is included in the files you copied from the toolkit directory, edit it to match the one shown here.) Call it armsd.map.


00000000 80000000 RAM 4 RW 135/85 135/85

This describes a system that has:

If you are using the command-line tools:

  1. Load the executable produced in Code and data sizes example: Dhrystone into the debugger, telling the debugger that its clock speed is 20MHz:


    armsd -clock 20MHz -nofpe dhry

    As the debugger loads, you can see the information about the memory system that the debugger has obtained from the armsd.map file.

  2. Type go at the armsd prompt to begin execution.

  3. When requested for the number of Dhrystones, enter 30000.

  4. When the application completes, record the number of Dhrystones per second reported. This is your performance figure.

If you are using the Windows toolkit:

ADW and ADU by default use a file called armsd.map as their map file. To change to the map file you have created:

  1. Select Configure Debugger from the Options menu. This displays the Debugger configuration dialog.

  2. Select the Memory Maps tab to change the default memory map. Click the Local Map File button and select the map file you created.

The association is now set up, and you can run the program.

  1. If you use ADW and are running APM then click on the Debug button to start ADW and load the project. If you use ADU then start ADU and select Load Image... from the File menu to load the project. If a dialog box prompts you to save the changes to the project file, click Yes.

  2. To set up the debugger to run at the required clock speed:

    1. Select Configure Debugger from the Options menu.

    2. Select ARMulator from the Target Environment box on Target page of the Debugger Configuration dialog.

    3. Click the Configure button.

    4. Ensure the Emulated radio button is selected, set the Clock Speed to 20MHz, and click OK.

    5. Click OK on the Debugger Configuration dialog. The image is reloaded.

  3. Click the Go button to begin execution, and again when the breakpoint on main is reached.

  4. When requested for the number of Dhrystones, enter 30000.

  5. When the application completes, record the number of Dhrystones per second reported. This is your performance figure.

When the debugger is configured to emulate a processor of the required clock speed (in this case 20MHz), you can repeat the simulation by clicking on Execute

rather than Debug in APM.

Note

You may obtain slightly different figures, depending on the version of the compiler, linker, and library in use, and the processor for which the ARMulator is configured.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential