Free Floating-Point Madness: VERIMark 2
VERIMark is a simple markup language designed for easy cusomization of Verilog files. All the source files for the generators of the Free Floating-Point Madness project are marked-up using VERIMark.
The tag set of VERIMark is small and simple. A full description follows.
The following describes VERIMark Version 2.
Please click Here for Version 1.
Tags
- DECLARE - Declare variables for use in EVAL
### DECLARE var [text | yesno] ###
Variables are one of two types in VERIMark: text/numeric or yesno (boolean). Variables not used otherwise before an EVAL tag must be DECLAREd as some type.
- EVAL - Evaluate a mathematical expression
### EVAL var exp ###
Evaluates expression exp and assigns to variable var. Expression can contain variables, numbers, and arithmatic and logical operators. Variables not used otherwise before an EVAL tag must be DECLAREd.
- IF - Single-line conditional
### IF var ### ...
If var is true, include the rest of the line. If var is false, do not include the rest of the line.
- IFI - Conditional Include
### IFI var file ###
If var is true, include the contents of file. If var is false, do nothing.
- NAME - The name of the hardware
### NAME name ###
This can appear anywhere in the code, but it is suggested that you place it at the top.
- NOTE - A generation note
### NOTE
...
###
This is the ONLY multiline tag, and is used to provide notes about generation to the user.
- RUN - External program execute
### RUN file [var1 [var2 [...]]] ###
Run file with args as command-line arguments and include the output.
- VARIABLE - Substitution
### var ###
Substitue in the value of var. Only one VARIABLE tag may be used per line.
- VARBUS - Create a bus with n possisble signals
### VARBUS width signal1 signal2 [...] ###
This will generate a series of `define statements for a variable-width bus. width is the name of the constant that will hold the width of the bus. The signals are the names of the constants that will hold the location of each signal in the bus. Hint: Use the signals to also serve as conditional includes of the hardware to calculate that signal.
- VERSION - The version of the hardware
### VERSION ver ###
This IMPORTANT tag can be placed anywhere, but it is recommened that you place it at the top of your source. Its purpose is twofold: 1) provide a convienient way to include version information that is distinctly part of the markup and, more importantly, 2) provide version-checking for the parser. If a user tries to submit an older set of variables to the parser, it will generate an error and stop parsing.
Layout Specificiations
- All instructions should be on a single line, with the exception of NOTE.
- Instructions should appear at the beginning of the line, with the exception of VARIABLE.
Page last updated 04 October 2001, Mark E. Phair.