Delta ISPSoft — 8.4.2 Creating an Union

ISPSoft User Manual 8.4 Union 8.4.1 Definition of Union Similar with structured type, the difference is that all the members of Union share the same memory location and the memory space allocated for a union is the storage required for the largest member of the union. Thus, any changes to a single member’s value will change all other members’ values as the following table shows, which displays a total memory of 32 bits (2 words) occupied by 4 members under a union. 8.4.2 Creating an Union Right-click DUT (Data Unit Type) in the project management area to see the option New. Click New to bring out a New DUT window.

Input a name, select the type as Structure and then click OK to confirm the setting. After that, a new DUT will appear under the DUT option. 8-16 UNION Values Member Data WORD 1 WORD 0 Name Type Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 uni1 ARRAY 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 uni2 WORD 12,039 (16#2F07) uni3 ARRAY 32,769(16#8001) 12,039 (16#2F07) uni4 DWORD 2,147,561,223(16#80012F07)