packed and unpacked randc in class

1 .What is the difference between following classes

class rc1;
randc bit [3:0] rw;
endclass;

class rc2;
randc bit rw [3:0];
endclass;

class rc3;
randc bit [3:0] rw [3:0];
endclass;

rc1 rc1_h=new;
rc1_h.randomize();  //is successfull and rc1_h.rw  has got random value

rc2 rc2_h=new;
rc2_h.randomize();  //is successfull but rc2_h.rw is not getting random value

rc3 rc3_h=new;
rc3_h.randomize();  //is successfull but rc3_h.rw is not getting random value

2. what is the problem in assigning a packed to unpacked (vice versa)?

2 comments:

  1. Accounting Software
    Accounting software is a computer program that assists bookkeepers and accountants in recording and reporting a firm's financial transactions. The functionality of accounting software differs from product to product. Larger firms may choose to implement a customized solution that integrates a vast amount of data from many different departments. Small firms often choose an off-the-shelf product.

    ReplyDelete