gen gen-item ; |
gen gen-item keeping { [soft] constraint-bool-expr ; ... }; |
if bool-expr [ then ] { action; ... } [ else if bool-expr [ then ] { action; ... } ] [ else { action; ... } ] ; |
case { bool-expr[:] { action; ... } ; [ default[:] { action; ... } ;] }; |
case expr { value[:] { action; ... } ; [ default[:] { action; ... } ;] }; |
for i from expr [ down ] to expr [step expr] [do] { action; ... }; |
for each [struct-type] (list-item) [ using index (index-name) ] in [reverse] list [do] { action; ... }; |
for each [line] [(line-name)] in file file-name [do] {action; ... }; |
while bool-expr [do] { action; ... }; |
break; // break the current loop |
continue; // go to the next iteration of the loop |
TCM2()@event-name is { TCM1(); method();}; // calling methods |
method1() is { method2(); method3(); }; // calling methods |
method() is { start TCM();}; // starting a TCM on a separate thread |
Note: A TCM can only be called from another TCM. However, a TCM can be started from a regular method or from another TCM. |
Check that bool-expr [ else dut_error( ... ) ]; |
var var-name : type; // declare a variable |
var-name = expr ; // e.g. field-name=expr, var-name=method() |
var var-name : = value; // declare and assign a variable |
Print expr[,…] [using print-options] ; |
Print struct-inst ; |
deep_copy(expr : struct-type) : struct-type |
deep_compare[_physical](inst1: struct-type, inst2: struct-type, max-diffs: int): list of string |
out ("string", expr, ...); | out ( struct-inst ); |
outf ( "string %c ...", expr ); // c is a conversion code: s, d, x, b, o, u |
set_config( category, option, option-value ) |
get_config( category, option ); |
min|max ( x: int, y: int): int | abs(x: int): int |
ipow(x: int, y: int): int | isqrt(x: int): int |
odd|even (x: int): bool | div_round_up(x: int, y: int): int |
expr.bitwise_and|or|xor|nand|nor|xnor(expr: int|uint): bit |
appendf(format, expr, ...): string | append(expr, ...): string |
expr. To_string(): string | bin|dec|hex(expr, ...): string |
str_join(list: list of string, separator: string): string | |
str_match(str: string, regular-expr: string): bool | |
str_replace(str:string, regular-expr:string, replacement:string):string | |
str_split(str: string, regular-expr: string): list of string |
system("command"): int | date_time(): string |
output_from("command"): list of string | |
output_from_check("command"): list of string | |
get_symbol(UNIX-environment-variable: string) : string | |
Files.write_string_list(file-name: string, list: list of string) |
stop_run(); // stops the simulator and invokes test finalization |