屏蔽寄存器中的某些字段取决于硬件通用

时间:2019-04-25 16:36:38

标签: uvm

我是UVM的初学者,请问一个问题。 作为注册字段访问的声明,如下:

   virtual function void build();
      this.SEC0 = uvm_reg_field::type_id::create("SEC0",,get_full_name());
      this.SEC0.configure(this, 1, 0, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC1 = uvm_reg_field::type_id::create("SEC1",,get_full_name());
      this.SEC1.configure(this, 1, 1, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC2 = uvm_reg_field::type_id::create("SEC2",,get_full_name());
      this.SEC2.configure(this, 1, 2, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC3 = uvm_reg_field::type_id::create("SEC3",,get_full_name());
      this.SEC3.configure(this, 1, 3, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC4 = uvm_reg_field::type_id::create("SEC4",,get_full_name());
      this.SEC4.configure(this, 1, 4, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC5 = uvm_reg_field::type_id::create("SEC5",,get_full_name());
      this.SEC5.configure(this, 1, 5, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC6 = uvm_reg_field::type_id::create("SEC6",,get_full_name());
      this.SEC6.configure(this, 1, 6, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC7 = uvm_reg_field::type_id::create("SEC7",,get_full_name());
      this.SEC7.configure(this, 1, 7, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC8 = uvm_reg_field::type_id::create("SEC8",,get_full_name());
      this.SEC8.configure(this, 1, 8, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC9 = uvm_reg_field::type_id::create("SEC9",,get_full_name());
      this.SEC9.configure(this, 1, 9, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC10 = uvm_reg_field::type_id::create("SEC10",,get_full_name());
      this.SEC10.configure(this, 1, 10, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC11 = uvm_reg_field::type_id::create("SEC11",,get_full_name());
      this.SEC11.configure(this, 1, 11, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC12 = uvm_reg_field::type_id::create("SEC12",,get_full_name());
      this.SEC12.configure(this, 1, 12, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC13 = uvm_reg_field::type_id::create("SEC13",,get_full_name());
      this.SEC13.configure(this, 1, 13, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC14 = uvm_reg_field::type_id::create("SEC14",,get_full_name());
      this.SEC14.configure(this, 1, 14, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC15 = uvm_reg_field::type_id::create("SEC15",,get_full_name());
      this.SEC15.configure(this, 1, 15, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC16 = uvm_reg_field::type_id::create("SEC16",,get_full_name());
      this.SEC16.configure(this, 1, 16, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC17 = uvm_reg_field::type_id::create("SEC17",,get_full_name());
      this.SEC17.configure(this, 1, 17, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC18 = uvm_reg_field::type_id::create("SEC18",,get_full_name());
      this.SEC18.configure(this, 1, 18, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC19 = uvm_reg_field::type_id::create("SEC19",,get_full_name());
      this.SEC19.configure(this, 1, 19, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC20 = uvm_reg_field::type_id::create("SEC20",,get_full_name());
      this.SEC20.configure(this, 1, 20, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC21 = uvm_reg_field::type_id::create("SEC21",,get_full_name());
      this.SEC21.configure(this, 1, 21, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC22 = uvm_reg_field::type_id::create("SEC22",,get_full_name());
      this.SEC22.configure(this, 1, 22, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC23 = uvm_reg_field::type_id::create("SEC23",,get_full_name());
      this.SEC23.configure(this, 1, 23, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC24 = uvm_reg_field::type_id::create("SEC24",,get_full_name());
      this.SEC24.configure(this, 1, 24, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC25 = uvm_reg_field::type_id::create("SEC25",,get_full_name());
      this.SEC25.configure(this, 1, 25, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC26 = uvm_reg_field::type_id::create("SEC26",,get_full_name());
      this.SEC26.configure(this, 1, 26, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC27 = uvm_reg_field::type_id::create("SEC27",,get_full_name());
      this.SEC27.configure(this, 1, 27, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC28 = uvm_reg_field::type_id::create("SEC28",,get_full_name());
      this.SEC28.configure(this, 1, 28, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC29 = uvm_reg_field::type_id::create("SEC29",,get_full_name());
      this.SEC29.configure(this, 1, 29, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC30 = uvm_reg_field::type_id::create("SEC30",,get_full_name());
      this.SEC30.configure(this, 1, 30, "RW", 0, 1'h0, 1, 0, 0);
      this.SEC31 = uvm_reg_field::type_id::create("SEC31",,get_full_name());
      this.SEC31.configure(this, 1, 31, "RW", 0, 1'h0, 1, 0, 0);
   endfunction: build
....

并且我具有通用值“ 28”,字段28、29、30和31应该被视为保留。因为我应该检查该泛型的多个值,所以有什么想法可以根据此泛型的值自动配置每个字段的访问类型? 非常感谢您的支持。

0 个答案:

没有答案