| << | >> |
Variable declaration
Syntax
direct declaration: type-modifier type-specifier declaration-list declaration-list: variable-name or variable-name, declaration-list type-specifier: bool int real signal time type-modifier: const declaration by assignment: variable-name = expression
Description
There is two ways of variable declaration in SpecMan: direct and
by assignment.
Variable declared in direct way (exported) can be
changed from outside the program and visible in program
interface.
Variable declared by assignment are visible only inside
the program. Type of the variable in this case is equal to the type
of expression it assigned to.
Example:
time t, tau %% direct declaration int k signal a, b p = ['a', 'b'] %% declaration by assignment t90 = t + 25 ns %% declaration by assignment
| << | >> |