Config_db - parameters for set/get method

In reply to germanbravolopez:

I think it is a good idea to revisit a bit your approach to the problem you need to solve, most of the times what may seem a parameter, it is not and can be passed using a config object. Now if you really need to pass the parameter from command line normally simulators provide some switches to do so (not the purpose nor this forum), also you could selectively add to the compile list a file or package with the parameters you need and import that package where needed.

Also with the first code shown you could assign in a for loop the bits you want.


task write();
  for (int i=0; i<RDW; i++)begin
    data_b[i] = data_a[i+RDW]; //Or whatever logic meet your requirements
  end
endtask

Probably somebody else will provide you a more elaborate solution.

Anyways hope this helps.

-R

PS: I think it would be better to ask a new question as your problem is a bit different from what the original thread was about.