What is the difference between struct and unit in specman e?

1 answer

Answer

1115159

2026-10-15 02:50

+ Follow

both struct and unit are objects just like in any other OOP.

the difference is in the time of creation of the object. while struct can be created and recreated at any time during the run (just like doing x=new(); in other OOP languages), units are created only at the beginning, and are static, meaning that they cannot be deallocated during run-time. however, their fields can still be changed.

in other Words, all the units that are under sys (top level) are automatically generated at "world creation", and no other units can be created. structs are used for dynamic data that is allocated and dealloacated during the run

ReportLike(0)ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.