Flags (optional)
Mason gives access to some features
that will only occasionally be useful. To take advantage of these
features, Mason allows for flags to be set. The available flags have been grouped by function:
Special File Outputs
Generates particular files
that augment the design process.
Create a PADS ASCII file
(see the PADS
output video)
- Create a PADS ASCII file using the given file
name
- Mason actually outputs two files
- one treats
each microstrip component
as a separate device and also outputs the pre-defined decals (like 0402
for lumped resistors)
- The second file outputs what is
effectively a
single decal which can be defined in concert with an external schematic
capture tool (like DxDesigner); appends "combined.asc" to the file name.
- As of version 4.5, you can output PCB files from subcircuits
- <flag PADS-ASCII=”receiver.asc” />
Output a file with all the Monte Carlo runs
- Output a
file with all the statistical data, useful for post processing
- This is what the included Mason Plot program reads for statistical analysis
- File
is the same as the output, + ".stat" (fixed to simplify plotting)
- Only
shows the outputs from the last Monte Carlo run
- Create both files, individual devices and combined as one decal
- <flag PADS-ASCII=”receiver.asc” />
- Create just the layout with individual devices
- <flag PADS-INDIVIDUAL =”receiver.asc” />
- Create just the layout with combined devices
- <flag PADS-COMBINED =”receiver.asc” />
- Define which of the components will be used to start the layout (can affect the angle things end up)
- <flag FIRST-POST =”TL1” />
Output a primitive
file and a MATLAB file based on a network of primitive files
- Output a new
primitive file which can be used for future runs
- The variables in
the model will be the arguments for the primitive file
- The arguments for each part must be prefaced with the RefDes + '___' (three underscores)
- ANT1 has a property __eps_r, __eps_r = ANT1___eps_r
- This assumes two underscores are being used for the argument name prefix
- The variable name feeding into the device's argument MUST follow the save pattern as the device's argument name, e.g. if the argument for the device TL1 is "loss_tangent", the variable feeding it MUST be "TL1___loss_tangent", and NOT "TL1___loss_tan"
- No
Touchstone files may be used- strictly primitives (dynamic models)
- Calculations
can be used to manipulate the arguments (variables)
- Optimizations
and statistics can't be used
- Must use 50-ohm ports
- Be
careful using S_X_Y in your calculations (e.g. "S_2_1 = S_1_2"); this
doesn't map well in the new primitive files since "S_2_1" in this case
will get mapped to something like "T1_S_2_1 = S_1_2", where S_1_2 will
not have been defined.
- See also: Creating new parts in the TinyCAD library
- Example File: compensated_tee_junction
- The definitive guide is here: Make New Primitive Files
- Also creates a similarly
named Matlab/ Octave file
- <flag
make_primitive=”new_primitive.xml” />
- Note, in TinyCAD, the flag is written without quotes: make_primitive=new_primitive.xml
Output File Data Formats
These flags control the output of the Touchstone (S-Parameter) file that Mason generates.
Show Optimization details
- Update the Touchstone output file every
time an improvement is found
- Potentially slows down the run
- <flag
opt_output="true" />
Output Data Format
- This modifies how the data is saved
to the output file. The default is a complex pair of real and imaginary
numbers.
- This flag takes one of three arguments
- RI
- real
and imaginary (no punctuation)
- example: 0.707 0.707
- MA
- magnitude
and angle (degrees)
- example: 1 45
- dB
- dB
and angle (degrees)
- example: 0 45
- <flag
output_data_format=”dB”></flag>
Output
Frequency Format
- This modifies how the data is saved to the
output file. The default is in Hz.
- This flag takes one of the
following arguments: kHz, MHz, GHz, THz
- <flag
output_frequency_format=”MHz”></flag>
Set
Width
- The output file by default uses 25 characters per
column of data. This allows you to change that width.
- <flag
set_width=”22”></flag>
Output version
- By default Mason will use a modified Touchstone
format (version 1.1) which puts all the S-Parameters per frequency on a
single line
- Version 1.0 does not flip S_2_1 and S_1_2 for
two ports versus very other port
- Version 1.2 is a true
Touchstone format
- <flag output_version=”1.2”></flag>
Random Number Generation Controls
Controls how random numbers are handled, primary used for making optimizers and statistics based on random numbers into repeatable runs.
Seed the random number generator (see validation)
- Normally
Mason will seed the random number generator with a time stamp. Use of
this flag allows for a specific seed value to be used.
- <flag seed=”0”></flag>
Use a file with random numbers instead of generating them (see validation)
- Use pre-generated random numbers from a file (better cross--platform agreement)
- <flag seed_file==”validation/random.txt”></flag>
Debug/ Developer Specific
These generally won't be useful unless your developing for the code.
Control if the builtin primitive code is used
- Some of the primitives in the library have been changed into compiled code
- The compiled code is taken from the XML files that come with the download (but is not linked to the XML files)
- If a primitive file is referenced that is not compiled in, the code will default to using the XML file if it exists (you do not need to set turbo_cp to "false" just to use new primitives)
- If you edit the XML files in the library, you can set turbo_cp to "false"
- <flag turbo_cp="true" /> (uses the compiled code)
Output figure of merit
- Output all figures of merit in the order the goal was entered
- The
output will be the squares, for the sum of the squares figure of
merit-- sum and root the output to get the actual figure of merit
- Might not be implemented in version 2.0 yet...
- <flag fom_output=”fom.txt” />
Add extra comments during the run
- Output some details useful for knowing a little more what's going on
- First step towards debugging...
- <flag verbose="true" />
- Enable multi-threaded runs [beta]
- Controls the number of threads used in the run
- Default is 1
- <flag threads="2" />