diff options
Diffstat (limited to 'midterm/SRC/transaction.sv')
| -rw-r--r-- | midterm/SRC/transaction.sv | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/midterm/SRC/transaction.sv b/midterm/SRC/transaction.sv new file mode 100644 index 0000000..1253fc2 --- /dev/null +++ b/midterm/SRC/transaction.sv @@ -0,0 +1,15 @@ +import typedef_pkg::*; + +class transaction; + rand operation_t operation; + rand operand_t operand_a; + rand operand_t operand_b; + + result_t expected_result; + result_t actual_result; + + function void print(); + $display("op=%s operand_a=%0d operand_b=%0d expected=%0d actual=%0d", operation.name(), + operand_a, operand_b, expected_result, actual_result); + endfunction +endclass |