class transaction;
rand bit hsel;
rand bit hwrite;
rand bit hready;
rand bit[1:0] htrans;
rand bit[2:0] hburst;
rand bit[2:0] hsize;
rand bit[31:0] haddr;
rand bit[31:0] hwdata;
rand bit[31:0] hrdata;
constraint c1{haddr inside{[32'h0000_0000:32'h0000_FFFF]};}
constraint c2{htrans inside{2'b10, 2'b11};}
constraint c3{hsize inside{3'b000, 3'b001, 3'b010};}
constraint c4{
(hsize == 3'b001) -> (haddr[0] == 1'b0);
(hsize == 3'b010) -> (haddr[1:0] == 2'b00);
}
endclass
07-14
422
10-20
2108