Casting_static_casting_system_verilog

In reply to dave_59:

Hi Dave,

  1. static_size_conversion;
    My intention is to convert num of 32 bit into 8 bit. After casting, num should accept only up to 255 as a maximum value for 8 bit number, but if I randomize also, its taking as 32 bit number, then looks like conversion is unsuccessful. Any reason/example to share ?

Thank You,