Constraining an Object's Object's Variable

In reply to dsherman0623:

That should be


logic[15:0] myLogic1;
if(!randomize(myLogic1))  `uvm_error(.. 
.. 
constraint A::myLogic1_const{
  myB.myLogic1[15:14] != 2'b01;} 

 [/systemverilog ] 
Did your code really passed the compiler? 
Ben systemverilog.us