Many fields within Kactus2 accept expresions as their input value for easy and fast configuration. The function sign f(x) is used to identify these fields. The input should conform to the SystemVerilog syntax to be acceptable.
Constant numeric values can be given as decimal values (e.g. 15) or by explicitly defining the base (e.g. 'h0F for 15 in hexadecimal). The possible bases are 'b (binary), 'o (octal), 'd (decimal) and 'h (hexadecimal). Also fractional numbers (e.g. 0.25) can be used where applicable. Other numeric formats, e.g. 0x000F and 0b0010, will not be accepted.
String values must be given within double quotes e.g. "This is a string value".
Boolean true and false are accepted and will be interpret as 1 and 0, respectively.
Kactus2 supports the following operations:
Operator(s) | Description | Example |
---|---|---|
+,-,*,/ | Basic arithmetic operations | 2*4 (8) |
** | Power operation | 2**4 (16) |
<,>,<=,>=,==,!= | Comparison of two values | 4 >= 2 (true) |
$clog2() | Ceiling of logarithm of base 2 | $clog(9) (4) |