wiki:Doc/panc/stdtpl/units

pan/units Template

This template contains multiplier definitions (as global variables) that allow the consistent use of units throughout a machine configuration. The base units assumed by this template are megabytes (MB) and megahertz (MHz); that is, those multipliers have a value of 1. The multipliers and their values are:

  • mb or MB = 1
  • gb or GB = 1024 * MB;
  • tb or TB = 1024 * GB;
  • MHz = 1
  • GHz = 1000 * MHz;

Once this template has been included in a configuration:

  include { 'pan/units' };

the above multipliers are available as global variables. The following example shows their use:

  variable myspeed = 366 * GHz;
  variable mysize = 24 * GB;

Using these units consistently throughout is clearer and helps avoid inconsistencies in the parameters.

Last modified 16 years ago Last modified on Nov 30, 2007, 11:01:32 AM