The members of your transaction definitions may be any collection of the following types, which have direct support in UVMC. For any type not listed, there is likely a supported type to which your converter can adapt.
UVMC Type Support | |
The members of your transaction definitions may be any collection of the following types, which have direct support in UVMC. | |
Supported Data Types | The following types are supported by UVMC for packing and unpacking via the streaming operators. |
Type-Support Examples | How to run the example demonstrating type support |
The following types are supported by UVMC for packing and unpacking via the streaming operators.
SV | SC longint | long long int | int shortint | short byte | char bit | bool | longint unsigned | unsigned long long int unsigned | unsigned int shortint unsigned | unsigned short byte unsigned | unsigned char bit unsigned | bool | shortreal | float real | double string | string time | sc_time | T | T T arr[N] | T arr[N]; T q[$] | vector<T> T da[] | list<T> T aa[KEY] | map<KEY,T> | sc_bit | sc_bit sc_logic | sc_logic sc_lv [L:R] | sc_lv<N> sc_bv [L:R] | sc_bv<N> | bit [N-1:0] | sc_int<N> bit [N-1:0] | sc_uint<N> bit [N-1:0] | sc_bigint<N> bit [N-1:0] | sc_biguint<N>
Integral size | Each integral field is limited to 4K bits |
Total size | Each packed transaction is limited to 4K bytes |
Arrays | Supports one dimension only |
`uvm_field macros | Instead of implementing the do_* methods directly, you may opt to employ the `uvm_field macros, which expand into code that implements these operations for most types. This is not recommended. The field macros expand into large amounts of code that affect run-time performance in every simulation in which they are used. They limit the upper-bound on accelleration performance. The code they expand into is unreadable and may hinder debug should you ever have to step through it. For details on these and other costs associated with `uvm_field and all other UVM macros, see the white paper, OVM/UVM Macros: A Cost-Benefit Analysis, at http://www.verificationacademy.com |
How to run the example demonstrating type support
See <Getting Started> for setup requirements for running the examples.
> make help
Choose an example to run from the menu, say
> make all
This compiles and runs an example demonstrating packing and unpacking of all directly supported data types allowed as members of your transaction classes. Other types require conversion to the supported types.
//------------------------------------------------------------// // Copyright 2009-2015 Mentor Graphics Corporation // // All Rights Reserved Worldwide // // // // Licensed under the Apache License, Version 2.0 (the // // "License"); you may not use this file except in // // compliance with the License. You may obtain a copy of // // the License at // // // // http://www.apache.org/licenses/LICENSE-2.0 // // // // Unless required by applicable law or agreed to in // // writing, software distributed under the License is // // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR // // CONDITIONS OF ANY KIND, either express or implied. See // // the License for the specific language governing // // permissions and limitations under the License. // //------------------------------------------------------------//