00001 //
00002 // -------------------------------------------------------------
00003 // Copyright 2004-2008 Synopsys, Inc.
00004 // All Rights Reserved Worldwide
00005 //
00006 // Licensed under the Apache License, Version 2.0 (the
00007 // "License"); you may not use this file except in
00008 // compliance with the License. You may obtain a copy of
00009 // the License at
00010 //
00011 // http://www.apache.org/licenses/LICENSE-2.0
00012 //
00013 // Unless required by applicable law or agreed to in
00014 // writing, software distributed under the License is
00015 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00016 // CONDITIONS OF ANY KIND, either express or implied. See
00017 // the License for the specific language governing
00018 // permissions and limitations under the License.
00019 // -------------------------------------------------------------
00020 //
00021
00022 `ifdef VMM_RAL_FAST_SRCH
00023 class vmm_ral_reg_by_offset_map;
00024 vmm_ral_reg reg_by_offset[*];
00025 endclass : vmm_ral_reg_by_offset_map
00026 `endif
00027
00028
00029 virtual class vmm_ral_block_or_sys;
00030 static vmm_log log = new("RAL", "Block/Sys");
00031
00032 vmm_ral::path_e default_access = vmm_ral::DEFAULT;
00033
00034 static local int unsigned block_or_sys_id_factory = 0;
00035 static vmm_ral_block_or_sys all_blocks_and_systems[*];
00036 local int unsigned block_or_sys_id = 0;
00037
00038 local bit locked;
00039
00040 local string name;
00041 local string typename;
00042
00043 protected string domains[];
00044 local string in_domains[]; // For each domain
00045 local int unsigned n_bytes[]; // For each domain
00046 local vmm_ral::endianness_e endian[]; // For each domain
00047 local bit [`VMM_RAL_ADDR_WIDTH-1:0] base_addr[]; // For each domain
00048 local string constr[]; // Constraint blocks
00049
00050 local vmm_ral_sys parent;
00051 protected vmm_ral_access ral_access;
00052
00053 local string attributes[string];
00054
00055 local int has_cover;
00056 local int cover_on;
00057
00058 extern function new(vmm_ral_sys parent,
00059 string block_or_sys,
00060 string name,
00061 string typename,
00062 int unsigned n_bytes,
00063 vmm_ral::endianness_e endian,
00064 bit [`VMM_RAL_ADDR_WIDTH-1:0] base_addr,
00065 string domain = "",
00066 int cover_on = vmm_ral::NO_COVERAGE,
00067 int has_cover = vmm_ral::NO_COVERAGE);
00068
00069 /*local*/ extern virtual function void Xlock_modelX();
00070 /*local*/ extern function bit Xis_lockedX();
00071 /*local*/ extern virtual function void add_domain(int unsigned n_bytes,
00072 vmm_ral::endianness_e endian,
00073 string domain);
00074 /*local*/ extern virtual function void map_domain(string domain,
00075 string in_domain,
00076 bit [`VMM_RAL_ADDR_WIDTH-1:0] base_addr);
00077 /*local*/ extern virtual function void Xregister_ral_accessX(vmm_ral_access access);
00078 /*local*/ extern function void Xadd_constraintsX(string name);
00079
00080 extern virtual function string get_name();
00081 extern virtual function string get_type();
00082 extern virtual function string get_fullname();
00083 extern function void get_domains(ref string names[]);
00084 extern virtual function vmm_ral_sys get_parent();
00085 extern virtual function bit [`VMM_RAL_ADDR_WIDTH-1:0] get_base_addr(string domain = "");
00086 extern function int C_addr_of();
00087 extern virtual function int unsigned get_n_bytes(string domain = "");
00088 extern virtual function vmm_ral::endianness_e get_endian(string domain = "");
00089 extern virtual function vmm_ral::path_e get_default_access();
00090 extern virtual function string get_parent_domain(string domain = "");
00091 extern virtual function string get_external_domain(string domain = "");
00092
00093 extern virtual function void display(string prefix = "",
00094 string domain = "");
00095 extern virtual function string psdisplay(string prefix = "",
00096 string domain = "");
00097
00098 extern virtual function void get_fields(ref vmm_ral_field fields[],
00099 input string domain = "");
00100 extern virtual function vmm_ral_field get_field_by_name(string name);
00101
00102 extern virtual function void get_registers(ref vmm_ral_reg regs[],
00103 input string domain = "");
00104 extern virtual function void get_virtual_registers(ref vmm_ral_vreg vregs[],
00105 input string domain = "");
00106 extern virtual function vmm_ral_reg get_reg_by_name(string name);
00107 extern virtual function vmm_ral_reg get_reg_by_offset(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00108 string domain = "");
00109
00110 extern virtual function void get_memories(ref vmm_ral_mem mems[],
00111 input string domain = "");
00112 extern virtual function vmm_ral_mem get_mem_by_name(string name);
00113 extern virtual function vmm_ral_mem get_mem_by_offset(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00114 string domain = "");
00115
00116 extern virtual function void get_constraints(ref string names[]);
00117
00118 extern virtual function void set_attribute(string name,
00119 string value);
00120 extern virtual function string get_attribute(string name,
00121 bit inherited = 1);
00122 extern virtual function void get_all_attributes(ref string names[],
00123 input bit inherited = 1);
00124
00125 extern virtual function void power_down(bit retain = 0);
00126 extern virtual function void power_up(string power_domains = "");
00127
00128 extern virtual function bit can_cover(int models);
00129 extern virtual function int set_cover(int is_on);
00130 extern virtual function bit is_cover_on(int is_on = vmm_ral::ALL_COVERAGE);
00131
00132 extern virtual function void reset(string domain = "",
00133 vmm_ral::reset_e kind = vmm_ral::HARD);
00134 extern virtual function bit needs_update();
00135 extern virtual task update(output vmm_rw::status_e status,
00136 input vmm_ral::path_e path = vmm_ral::DEFAULT);
00137 extern virtual task mirror(output vmm_rw::status_e status,
00138 input vmm_ral::check_e check = vmm_ral::QUIET,
00139 input vmm_ral::path_e path = vmm_ral::DEFAULT);
00140
00141 extern virtual task readmemh(string filename);
00142 extern virtual task writememh(string filename);
00143
00144 extern function void prepend_callback(vmm_ral_callbacks cbs);
00145 extern function void append_callback(vmm_ral_callbacks cbs);
00146 extern function void unregister_callback(vmm_ral_callbacks cbs);
00147
00148 extern protected function int get_domain_index(string domain);
00149
00150 extern function int unsigned get_block_or_sys_ID();
00151
00152 extern virtual function int unsigned get_block_or_sys_size(string domain = "");
00153
00154 extern virtual function bit set_offset(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00155 string domain = "");
00156
00157 extern virtual function bit Xcheck_child_overlapX(int unsigned my_offset,
00158 int unsigned my_size,
00159 string domain = "",
00160 vmm_ral_block blk,
00161 vmm_ral_sys sys);
00162
00163 extern virtual function bit Xset_base_addrX(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00164 string domain = "");
00165
00166 protected virtual function void domain_coverage(string domain,
00167 int idx);
00168 endfunction
00169 endclass: vmm_ral_block_or_sys
00170
00171
00172 function vmm_ral_block_or_sys::new(vmm_ral_sys parent,
00173 string block_or_sys,
00174 string name,
00175 string typename,
00176 int unsigned n_bytes,
00177 vmm_ral::endianness_e endian,
00178 bit [`VMM_RAL_ADDR_WIDTH-1:0] base_addr,
00179 string domain = "",
00180 int cover_on = vmm_ral::NO_COVERAGE,
00181 int has_cover = vmm_ral::NO_COVERAGE);
00182 this.locked = 0;
00183
00184 this.name = name;
00185 this.typename = typename;
00186 begin
00187 vmm_ral_block_or_sys p = parent;
00188 if (p == this) parent = null;
00189 end
00190 this.parent = parent;
00191
00192 this.domains = new [1]; this.domains[0] = domain;
00193 this.in_domains= new [1]; this.in_domains[0]= "";
00194 this.n_bytes = new [1]; this.n_bytes[0] = n_bytes;
00195 this.endian = new [1]; this.endian[0] = endian;
00196 this.base_addr = new [1]; this.base_addr[0] = base_addr;
00197
00198 this.has_cover = has_cover;
00199 this.cover_on = vmm_ral::NO_COVERAGE;
00200 void'(this.set_cover(cover_on));
00201
00202 this.block_or_sys_id = ++this.block_or_sys_id_factory;
00203 all_blocks_and_systems[this.block_or_sys_id] = this;
00204 this.domain_coverage(domain, 0);
00205 endfunction: new
00206
00207 function void vmm_ral_block_or_sys::Xlock_modelX();
00208 this.locked = 1;
00209 endfunction: Xlock_modelX
00210
00211
00212 function bit vmm_ral_block_or_sys::Xis_lockedX();
00213 Xis_lockedX = this.locked;
00214 endfunction: Xis_lockedX
00215
00216
00217 function void vmm_ral_block_or_sys::add_domain(int unsigned n_bytes,
00218 vmm_ral::endianness_e endian,
00219 string domain);
00220 int n;
00221
00222 if (this.locked) begin
00223 `vmm_error(this.log, "Cannot add domain to locked model");
00224 return;
00225 end
00226
00227 n = this.domains.size();
00228 this.domains = new [n+1] (this.domains); this.domains[n] = domain;
00229 this.in_domains= new [n+1] (this.in_domains);this.in_domains[n]= "";
00230 this.n_bytes = new [n+1] (this.n_bytes); this.n_bytes[n] = n_bytes;
00231 this.endian = new [n+1] (this.endian); this.endian[n] = endian;
00232 this.base_addr = new [n+1] (this.base_addr); this.base_addr[n] = 0;
00233 this.domain_coverage(domain, n);
00234 endfunction: add_domain
00235
00236
00237 function void vmm_ral_block_or_sys::map_domain(string domain,
00238 string in_domain,
00239 bit [`VMM_RAL_ADDR_WIDTH-1:0] base_addr);
00240 int n;
00241
00242 n = this.get_domain_index(domain);
00243 if (n < 0) return;
00244
00245 if (this.in_domains[n] != "") begin
00246 `vmm_error(this.log, $psprintf("Domain \"%s\" already mapped in domain \"%s\" @'h%h in %s",
00247 domain, in_domains[n], base_addr[n],
00248 this.get_fullname()));
00249 return;
00250 end
00251
00252 this.in_domains[n] = in_domain;
00253 this.base_addr[n] = base_addr;
00254 endfunction: map_domain
00255
00256
00257 function void vmm_ral_block_or_sys::Xregister_ral_accessX(vmm_ral_access access);
00258 endfunction
00259
00260 function void vmm_ral_block_or_sys::Xadd_constraintsX(string name);
00261 int n;
00262
00263 if (this.locked) begin
00264 `vmm_error(this.log, "Cannot add constraints to locked model");
00265 return;
00266 end
00267
00268 // Check if the constraint block already exists
00269 foreach (this.constr[i]) begin
00270 if (this.constr[i] == name) begin
00271 `vmm_warning(this.log, $psprintf("Constraint \"%s\" already added",
00272 name));
00273 return;
00274 end
00275 end
00276
00277 // Append the constraint name to the list
00278 n = this.constr.size();
00279 this.constr = new [n+1] (this.constr);
00280 this.constr[n] = name;
00281 endfunction: Xadd_constraintsX
00282
00283
00284 function string vmm_ral_block_or_sys::get_name();
00285 get_name = this.name;
00286 endfunction: get_name
00287
00288
00289 function string vmm_ral_block_or_sys::get_type();
00290 return this.typename;
00291 endfunction: get_type
00292
00293
00294 function string vmm_ral_block_or_sys::get_fullname();
00295 vmm_ral_block_or_sys bos;
00296
00297 get_fullname = this.get_name();
00298
00299 // Do not include top-level name in full name
00300 bos = this.get_parent();
00301 if (bos == null) return get_fullname;
00302 if (bos.get_parent() == null) return get_fullname;
00303
00304 get_fullname = {this.parent.get_fullname(), ".", get_fullname};
00305 endfunction: get_fullname
00306
00307
00308 function void vmm_ral_block_or_sys::get_domains(ref string names[]);
00309 names = new [this.domains.size()] (this.domains);
00310 endfunction: get_domains
00311
00312
00313 function vmm_ral_sys vmm_ral_block_or_sys::get_parent();
00314 get_parent = this.parent;
00315 endfunction: get_parent
00316
00317 function bit vmm_ral_block_or_sys::Xset_base_addrX(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00318 string domain = "");
00319 int i;
00320
00321 i = this.get_domain_index(domain);
00322 if (i < 0)
00323 begin
00324 return 0;
00325 end
00326 this.base_addr[i] = offset;
00327 Xset_base_addrX = 1;
00328
00329 endfunction
00330
00331 function bit [`VMM_RAL_ADDR_WIDTH-1:0] vmm_ral_block_or_sys::get_base_addr(string domain = "");
00332 int i;
00333
00334 i = this.get_domain_index(domain);
00335 if (i < 0) return 0;
00336 get_base_addr = this.base_addr[i];
00337 endfunction: get_base_addr
00338
00339
00340 function int vmm_ral_block_or_sys::C_addr_of();
00341 return this.get_block_or_sys_ID();
00342 endfunction
00343
00344
00345 function int unsigned vmm_ral_block_or_sys::get_n_bytes(string domain = "");
00346 int i;
00347
00348 i = this.get_domain_index(domain);
00349 if (i < 0) return 0;
00350 get_n_bytes = this.n_bytes[i];
00351 endfunction: get_n_bytes
00352
00353
00354 function vmm_ral::endianness_e vmm_ral_block_or_sys::get_endian(string domain = "");
00355 int i;
00356
00357 i = this.get_domain_index(domain);
00358 if (i < 0) return vmm_ral::LITTLE_ENDIAN;
00359 get_endian = this.endian[i];
00360 endfunction: get_endian
00361
00362
00363 function vmm_ral::path_e vmm_ral_block_or_sys::get_default_access();
00364 if (this.default_access != vmm_ral::DEFAULT) begin
00365 return this.default_access;
00366 end
00367
00368 if (this.parent != null) begin
00369 return this.parent.get_default_access();
00370 end
00371
00372 // Default access is defined by RAL access
00373 if (this.ral_access != null) begin
00374 get_default_access = this.ral_access.default_path;
00375 end
00376 else begin
00377 `vmm_fatal(log, $psprintf("RAL model for \"%s\" is not associated with a RAL access interface", this.get_fullname()));
00378 get_default_access = vmm_ral::BFM;
00379 end
00380
00381 if (get_default_access == vmm_ral::DEFAULT) begin
00382 // Front door by default
00383 get_default_access = vmm_ral::BFM;
00384 end
00385 endfunction: get_default_access
00386
00387
00388 function string vmm_ral_block_or_sys::get_parent_domain(string domain = "");
00389 int i;
00390
00391 // if this is the top-most block or system, there is no parent!
00392 if (this.parent == null) return domain;
00393
00394 i = this.get_domain_index(domain);
00395 if (i < 0) return domain;
00396
00397 return this.in_domains[i];
00398 endfunction: get_parent_domain
00399
00400
00401 function string vmm_ral_block_or_sys::get_external_domain(string domain = "");
00402 int i;
00403
00404 // if this is the top-most block or system, there is no parent!
00405 if (this.parent == null) return domain;
00406
00407 i = this.get_domain_index(domain);
00408 if (i < 0) return domain;
00409 return this.parent.get_external_domain(this.in_domains[i]);
00410 endfunction: get_external_domain
00411
00412
00413 function void vmm_ral_block_or_sys::display(string prefix = "",
00414 string domain = "");
00415 $write("%s\n", this.psdisplay(prefix, domain));
00416 endfunction: display
00417
00418
00419 function string vmm_ral_block_or_sys::psdisplay(string prefix = "",
00420 string domain = "");
00421 return "";
00422 endfunction
00423
00424
00425 function void vmm_ral_block_or_sys::get_fields(ref vmm_ral_field fields[],
00426 input string domain = "");
00427 endfunction
00428
00429
00430 function vmm_ral_field vmm_ral_block_or_sys::get_field_by_name(string name);
00431 endfunction
00432
00433 function void vmm_ral_block_or_sys::get_registers(ref vmm_ral_reg regs[],
00434 input string domain = "");
00435 endfunction
00436
00437
00438 function void vmm_ral_block_or_sys::get_virtual_registers(ref vmm_ral_vreg vregs[],
00439 input string domain = "");
00440 endfunction
00441
00442
00443 function vmm_ral_reg vmm_ral_block_or_sys::get_reg_by_name(string name);
00444 endfunction
00445
00446 function vmm_ral_reg vmm_ral_block_or_sys::get_reg_by_offset(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00447 string domain = "");
00448 endfunction
00449
00450 function void vmm_ral_block_or_sys::get_memories(ref vmm_ral_mem mems[],
00451 input string domain = "");
00452 endfunction
00453
00454
00455 function vmm_ral_mem vmm_ral_block_or_sys::get_mem_by_name(string name);
00456 endfunction
00457
00458 function vmm_ral_mem vmm_ral_block_or_sys::get_mem_by_offset(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00459 string domain = "");
00460 endfunction
00461
00462 function void vmm_ral_block_or_sys::get_constraints(ref string names[]);
00463 names = new [this.constr.size()] (this.constr);
00464 endfunction: get_constraints
00465
00466
00467 function void vmm_ral_block_or_sys::set_attribute(string name,
00468 string value);
00469 string whatami;
00470 vmm_ral_block blk;
00471
00472 if ($cast(blk, this)) whatami = "block";
00473 else whatami = "system";
00474
00475 if (name == "") begin
00476 `vmm_error(this.log, $psprintf("Cannot set anonymous attribute \"\" in %s \"%s\". Please specify an attribute name.",
00477 name, whatami, this.get_fullname()));
00478 return;
00479 end
00480
00481 if (this.attributes.exists(name)) begin
00482 if (value != "") begin
00483 `vmm_warning(this.log, $psprintf("Redefining attributed \"%s\" in %s \"%s\" to \"%s\".",
00484 name, whatami, this.get_fullname(), value));
00485 this.attributes[name] = value;
00486 end
00487 else begin
00488 this.attributes.delete(name);
00489 end
00490 return;
00491 end
00492
00493 if (value == "") begin
00494 `vmm_warning(this.log, $psprintf("Attempting to delete non-existent attribute \"%s\" in %s \"%s\".",
00495 name, whatami, this.get_fullname()));
00496 return;
00497 end
00498
00499 this.attributes[name] = value;
00500 endfunction: set_attribute
00501
00502
00503 function string vmm_ral_block_or_sys::get_attribute(string name,
00504 bit inherited = 1);
00505 if (this.attributes.exists(name)) begin
00506 return this.attributes[name];
00507 end
00508
00509 if (inherited && this.parent != null) return this.parent.get_attribute(name);
00510
00511 return "";
00512 endfunction: get_attribute
00513
00514
00515 function void vmm_ral_block_or_sys::get_all_attributes(ref string names[],
00516 input bit inherited = 1);
00517 string tmp[];
00518 string name;
00519 bit ok;
00520 int i;
00521
00522 if (inherited && this.parent != null) this.parent.get_all_attributes(tmp);
00523
00524 i = tmp.size();
00525 tmp = new [tmp.size() + this.attributes.num()] (tmp);
00526
00527 ok = this.attributes.first(name);
00528 while (ok) begin
00529 int found = 0;
00530 foreach (tmp[j]) begin
00531 if (tmp[j] == name) begin
00532 found = 1;
00533 break;
00534 end
00535 end
00536 if (!found) tmp[i++] = name;
00537 ok = this.attributes.next(name);
00538 end
00539 names = new [i] (tmp);
00540 endfunction: get_all_attributes
00541
00542
00543 function void vmm_ral_block_or_sys::power_down(bit retain = 0);
00544 endfunction: power_down
00545
00546
00547 function void vmm_ral_block_or_sys::power_up(string power_domains = "");
00548 endfunction: power_up
00549
00550
00551 function bit vmm_ral_block_or_sys::can_cover(int models);
00552 return ((this.has_cover & models) == models);
00553 endfunction: can_cover
00554
00555 function int vmm_ral_block_or_sys::set_cover(int is_on);
00556 if (is_on == vmm_ral::NO_COVERAGE) begin
00557 this.cover_on = is_on;
00558 return this.cover_on;
00559 end
00560
00561 if ((this.has_cover & is_on) == 0) begin
00562 `vmm_warning(this.log, $psprintf("\"%s\" - Cannot turn ON any coverage becasue the corresponding coverage model was not generated.", this.get_fullname()));
00563 return this.cover_on;
00564 end
00565
00566 if (is_on & vmm_ral::REG_BITS) begin
00567 if (this.has_cover & vmm_ral::REG_BITS) begin
00568 this.cover_on |= vmm_ral::REG_BITS;
00569 end else begin
00570 `vmm_warning(this.log, $psprintf("\"%s\" - Cannot turn ON Register Bit coverage becasue the corresponding coverage model was not generated.", this.get_fullname()));
00571 end
00572 end
00573
00574 if (is_on & vmm_ral::FIELD_VALS) begin
00575 if (this.has_cover & vmm_ral::FIELD_VALS) begin
00576 this.cover_on |= vmm_ral::FIELD_VALS;
00577 end else begin
00578 `vmm_warning(this.log, $psprintf("\"%s\" - Cannot turn ON Field Value coverage becasue the corresponding coverage model was not generated.", this.get_fullname()));
00579 end
00580 end
00581
00582 if (is_on & vmm_ral::ADDR_MAP) begin
00583 if (this.has_cover & vmm_ral::ADDR_MAP) begin
00584 this.cover_on |= vmm_ral::ADDR_MAP;
00585 end else begin
00586 `vmm_warning(this.log, $psprintf("\"%s\" - Cannot turn ON Address Map coverage becasue the corresponding coverage model was not generated.", this.get_fullname()));
00587 end
00588 end
00589
00590 set_cover = this.cover_on;
00591 endfunction: set_cover
00592
00593
00594 function bit vmm_ral_block_or_sys::is_cover_on(int is_on);
00595 if (this.can_cover(is_on) == 0) return 0;
00596 return ((this.cover_on & is_on) == is_on);
00597 endfunction: is_cover_on
00598
00599
00600 function void vmm_ral_block_or_sys::reset(string domain = "",
00601 vmm_ral::reset_e kind = vmm_ral::HARD);
00602 endfunction
00603
00604 function bit vmm_ral_block_or_sys::needs_update();
00605 return 0;
00606 endfunction
00607
00608
00609 task vmm_ral_block_or_sys::update(output vmm_rw::status_e status,
00610 input vmm_ral::path_e path = vmm_ral::DEFAULT);
00611 endtask
00612
00613 task vmm_ral_block_or_sys::mirror(output vmm_rw::status_e status,
00614 input vmm_ral::check_e check = vmm_ral::QUIET,
00615 input vmm_ral::path_e path = vmm_ral::DEFAULT);
00616 endtask
00617
00618 task vmm_ral_block_or_sys::readmemh(string filename);
00619 endtask
00620
00621 task vmm_ral_block_or_sys::writememh(string filename);
00622 endtask
00623
00624 function void vmm_ral_block_or_sys::prepend_callback(vmm_ral_callbacks cbs);
00625 endfunction: prepend_callback
00626
00627
00628 function void vmm_ral_block_or_sys::append_callback(vmm_ral_callbacks cbs);
00629 endfunction: append_callback
00630
00631
00632 function void vmm_ral_block_or_sys::unregister_callback(vmm_ral_callbacks cbs);
00633 endfunction: unregister_callback
00634
00635
00636 function int vmm_ral_block_or_sys::get_domain_index(string domain);
00637 // If the domain is "" and there is only one domain,
00638 // assume it is the one domain available to avoid
00639 // having to always have to specify domains
00640 if (domain == "" && this.domains.size() == 1) return 0;
00641
00642 foreach (this.domains[i]) begin
00643 if (this.domains[i] == domain) return i;
00644 end
00645 `vmm_warning(this.log, $psprintf("Unknown domain name \"%s\" in %s.",
00646 domain, this.get_fullname()));
00647 return -1;
00648 endfunction: get_domain_index
00649
00650
00651 function int unsigned vmm_ral_block_or_sys::get_block_or_sys_ID();
00652 get_block_or_sys_ID = this.block_or_sys_id;
00653 endfunction
00654
00655 function int unsigned vmm_ral_block_or_sys::get_block_or_sys_size(string domain = "");
00656 endfunction
00657
00658 function bit vmm_ral_block_or_sys::set_offset(bit [`VMM_RAL_ADDR_WIDTH-1:0] offset,
00659 string domain = "");
00660 endfunction
00661
00662 function bit vmm_ral_block_or_sys::Xcheck_child_overlapX(int unsigned my_offset,
00663 int unsigned my_size,
00664 string domain = "",
00665 vmm_ral_block blk,
00666 vmm_ral_sys sys);
00667 endfunction
00668
00669
00670 function vmm_ral_block_or_sys vmm_ral_get_block_or_sys_by_ID(int unsigned id);
00671 vmm_ral_block_or_sys bos;
00672 if (bos.all_blocks_and_systems.exists(id))
00673 vmm_ral_get_block_or_sys_by_ID = bos.all_blocks_and_systems[id];
00674 else vmm_ral_get_block_or_sys_by_ID = null;
00675 endfunction
00676