Section 3.11

Changes (shown in blue)

typedef struct {

bit isfloat;

union { int i; shortreal f; } n; // anonymous type

} tagged_st; // named structure

 

tagged_st a[9:0]; // array of structures

Section 3.14

Changes (shown in blue)

typedef struct {

bit isfloat;

union { int i; shortreal f; } n; // anonymous type

} tagged_st; // named structure

 

typedef bit [$bits(tagged_st) - 1 : 0] tagbits; // tagged defined above

 

tagged_st a [7:0]; // unpacked array of structures

 

tagbits t = tagbits’(a[3]); // convert structure to array of bits

a[4] = tagged_st’(t); // convert array of bits back to structure

Section 18.7

Changes (shown in blue)

typedef struct {

bit isfloat;

union { int i; shortreal f; } n;

} tagged_st; // named structure

 

module mh1 (input int in1, input shortreal in2, output tagged_st out);

...

endmodule