|HOME |ABOUT |ARTICLES |ACK |FEEDBACK |TOC |LINKS |BLOG |JOBS |


Tutorials



UNITS




Units are similar to structs. It also contain all struct members, i.e. fields, methods, etc. Units are static. It is created during start of the simulation and stays until the end of simulation. Units are generated in Pre-run generation phase. We will task about the generation phases in more detailed later. Units are associated with an HDL hierarchy instance. Predefine method hdl_path() is used for setting the unit's associated HDL path. For accessing parent enclosing unit , predefined method get_enclosing_unit() is used.



Syntax: unit unit-type [like base-unit-type] { [unit-member; ...]};

EXAMPLE:
unit XYZ_router {
channels: list of XYZ_channel is instance;
keep channels.size() == 3;
keep for each in channels {.hdl_path() ==
append("chan", index); };
};

Units Vs Structs



The decision of whether to model a DUT component with a unit or a struct often depends on your verification strategy. You intend to test the DUT component both standalone and integrated into a larger system. Modeling the DUT component with a unit instead of a struct allows you to use relative path names when referencing HDL objects. Your e program has methods that access many signals at runtime. The correctness of all signal references within units are determined and checked during pre-run generation. If your e program does not contain user units, the absolute HDL references within structs are also checked during pre-run generation. However, if your e program does contain user units, the relative HDL references within structs are checked at run time. In this case, using units rather than structs can enhance runtime performance


Index
Introduction
E Basics
Data Types
Operators
Struct
Units
List
Methods
Concurrency Actions
Constraints
Extend
When And Like
Events
Temporal Expressions
Temporal Operators 1
Temporal Operators 2
Synchronizing With The Simulator
Wait And Sync
Physical Virual Feilds
Packing N Unpacking
Pre Run N On The Fly
Coverage
Commands
Extendable Methods
Non Extendable Methods
And Gate Evc

Report a Bug or Comment on This section - Your input is what keeps Testbench.in improving with time!





<< PREVIOUS PAGE

TOP

NEXT PAGE >>

copyright © 2007-2017 :: all rights reserved www.testbench.in::Disclaimer