(Solved):
10. Create the SystemVerilog code for the following requirements: a) Create a user defined type, n ...
10. Create the SystemVerilog code for the following requirements: a) Create a user defined type, nibble, of 4 bits b) Create a real variable, \( r \), and initialize it to \( 4.33 \) c) Create a short int variable, i_pack d) Create an unpacked array, \( k \), containing 4 elements of your user defined type nibble and initialize it to \( 4^{\prime} \mathrm{h} 0,4^{\prime} \mathrm{hF}, 4^{\prime} \mathrm{hE} \), and \( 4^{\prime} \mathrm{hD} \) e) Print out \( k \) f) Stream \( k \) into i_pack right to left on a bit basis and print it out g) Stream \( k \) into i_pack right to left on a nibble basis and print it out h) Type convert real \( r \) into a nibble, assign it to \( k[0] \), and print out \( k \)