Macros defined for VMM:
|
|
Defined at line 23 of file RAL/vmm_ral.sv.
|
|
|
Defined at line 24 of file RAL/vmm_rw.sv.
|
|
|
Defined at line 502 of file std_lib/vmm.sv.
|
|
|
vmm_atomic_gen_using(class_name, class_name_channel, text) | |
Defined at line 27 of file std_lib/vmm_atomic_gen.sv.
|
|
|
class_atomic_gen
| |
Defined at line 23 of file std_lib/vmm_atomic_gen.sv.
|
|
|
class_atomic_gen_callbacks
| |
Defined at line 24 of file std_lib/vmm_atomic_gen.sv.
|
|
|
typedef class vmm_atomic_gen_(class_name); class vmm_atomic_gen_callbacks_(class_name) extends vmm_xactor_callbacks; virtual task post_inst_gen(vmm_atomic_gen_(class_name) gen, class_name obj, ref bit drop); endtask endclass class vmm_atomic_gen_(class_name) extends VMM_XACTOR; int unsigned stop_after_n_insts; typedef enum int {GENERATED, DONE} symbols_e; class_name randomized_obj; channel_name out_chan; local int scenario_count; local int obj_count; function new(string inst, int stream_id = -1, channel_name out_chan = null VMM_XACTOR_NEW_ARGS); super.new({text, " Atomic Generator"}, inst, stream_id VMM_XACTOR_NEW_CALL); if (out_chan == null) begin out_chan = new({text, " Atomic Generator output channel"}, inst); end this.out_chan = out_chan; this.log.is_above(this.out_chan.log); this.scenario_count = 0; this.obj_count = 0; this.stop_after_n_insts = 0; this.notify.configure(GENERATED, vmm_notify::ONE_SHOT); this.notify.configure(DONE, vmm_notify::ON_OFF); this.randomized_obj = new; endfunction: new virtual task inject(class_name obj, ref bit dropped); dropped = 0; vmm_callback(vmm_atomic_gen_callbacks_(class_name), post_inst_gen(this, obj, dropped)); if (!dropped) begin this.obj_count++; this.notify.indicate(GENERATED, obj); this.out_chan.put(obj); end endtask: inject virtual function void reset_xactor(reset_e rst_typ = SOFT_RST); super.reset_xactor(rst_typ); this.out_chan.flush(); this.scenario_count = 0; this.obj_count = 0; if (rst_typ >= FIRM_RST) begin this.notify.reset( , vmm_notify::HARD); end if (rst_typ >= HARD_RST) begin this.stop_after_n_insts = 0; this.randomized_obj = new; end endfunction: reset_xactor virtual protected task main(); bit dropped; fork super.main(); join_none while (this.stop_after_n_insts <= 0 || this.obj_count < this.stop_after_n_insts) begin this.wait_if_stopped(); this.randomized_obj.stream_id = this.stream_id; this.randomized_obj.scenario_id = this.scenario_count; this.randomized_obj.data_id = this.obj_count; if (!this.randomized_obj.randomize()) begin vmm_fatal(this.log, "Cannot randomize atomic instance"); continue; end begin class_name obj; $cast(obj, this.randomized_obj.copy()); this.inject(obj, dropped); end end this.notify.indicate(DONE); this.notify.indicate(XACTOR_STOPPED); this.notify.indicate(XACTOR_IDLE); this.notify.reset(XACTOR_BUSY); this.scenario_count++; endtask: main endclass | |
Defined at line 30 of file std_lib/vmm_atomic_gen.sv.
|
|
|
class_atomic_scenario
| |
Defined at line 43 of file std_lib/vmm_scenario_gen.sv.
|
|
|
do foreach (this.callbacks[vmm_i]) begin facade cb; if (!$cast(cb, this.callbacks[vmm_i])) continue; cb.call; end while (0) | |
Defined at line 400 of file std_lib/vmm.sv.
|
|
|
vmm_channel
| |
Defined at line 152 of file std_lib/vmm.sv.
|
|
|
class vmm_channel_(T) extends vmm_channel; function new(string name, string inst, int full = 1, int empty = 0, bit fill_as_bytes = 0); super.new(name, inst, full, empty, fill_as_bytes); endfunction: new function T unput(int offset = -1); $cast(unput, super.unput(offset)); endfunction: unput task get(output T obj, input int offset = 0); vmm_data o; super.get(o, offset); $cast(obj, o); endtask: get task peek(output T obj, input int offset = 0); vmm_data o; super.peek(o, offset); $cast(obj, o); endtask: peek task activate(output T obj, input int offset = 0); vmm_data o; super.activate(o, offset); $cast(obj, o); endtask: activate function T active_slot(); $cast(active_slot, super.active_slot()); endfunction: active_slot function T start(); $cast(start, super.start()); endfunction: start function T complete(vmm_data status = null); $cast(complete, super.complete(status)); endfunction: complete function T remove(); $cast(remove, super.remove()); endfunction: remove task tee(output T obj); vmm_data o; super.tee(o); $cast(obj, o); endtask: tee function T for_each(bit reset = 0); $cast(for_each, super.for_each(reset)); endfunction: for_each endclass | |
Defined at line 426 of file std_lib/vmm.sv.
|
|
|
T_channel
| |
Defined at line 424 of file std_lib/vmm.sv.
|
|
|
Defined at line 160 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::COMMAND_TYP)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 352 of file std_lib/vmm.sv.
|
|
|
vmm_consensus
| |
Defined at line 164 of file std_lib/vmm.sv.
|
|
|
Defined at line 24 of file std_lib/vmm_consensus.sv.
|
|
|
Defined at line 172 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::CYCLE_TYP)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 376 of file std_lib/vmm.sv.
|
|
|
vmm_data
| |
Defined at line 131 of file std_lib/vmm.sv.
|
|
|
Defined at line 148 of file std_lib/vmm.sv.
|
|
|
Defined at line 139 of file std_lib/vmm.sv.
|
|
|
Defined at line 140 of file std_lib/vmm.sv.
|
|
|
virtual function int unsigned byte_size(int kind = -1); this.__vmm_done_user = 1; byte_size = this.do_byte_size(kind); if (this.__vmm_done_user) return byte_size; return _n; endfunction: byte_size virtual function int unsigned max_byte_size(int kind = -1); this.__vmm_done_user = 1; max_byte_size = this.do_max_byte_size(kind); if (this.__vmm_done_user) return max_byte_size; return _max; endfunction | |
Defined at line 2062 of file std_lib/vmm_data_macros.sv.
|
|
|
protected static _class __vmm_rhs; function void do_all(vmm_data::do_what_e do_what, ref logic [7:0] pack[], const ref logic [7:0] unpack[]); super.__vmm_rhs = this.__vmm_rhs; this.__vmm_status = 1; super.do_all(do_what, pack, unpack); if (super.__vmm_status == 0) return; | |
Defined at line 26 of file std_lib/vmm_data_macros.sv.
|
|
|
endfunction static vmm_log log = new("_class", "class"); function new(vmm_log log = null); super.new((log == null) ? this.log : log); endfunction virtual function vmm_data allocate(); _class i = new; return i; endfunction virtual function bit is_valid(bit silent = 1, int kind = -1); return 1; endfunction virtual function string psdisplay(string prefix = ""); $sformat(this.__vmm_image, "%s(_class (%0d.%0d.%0d)):", prefix, this.stream_id, this.scenario_id, this.data_id); this.__vmm_done_user = 1; psdisplay = this.do_psdisplay(prefix); if (this.__vmm_done_user) return psdisplay; this.__vmm_prefix = prefix; this.do_all(DO_PRINT, __vmm_bytes, __vmm_bytes); return this.__vmm_image; endfunction virtual function vmm_data copy(vmm_data to = null); _class cpy; this.__vmm_done_user = 1; copy = this.do_copy(to); if (this.__vmm_done_user) return copy; if (to == null) cpy = new; else if (!$cast(cpy, to)) begin vmm_fatal(this.log, "Cannot copy to non-_class instance"); return null; end super.copy_data(cpy); this.__vmm_rhs = cpy; this.do_all(DO_COPY, __vmm_bytes, __vmm_bytes); return cpy; endfunction virtual function bit compare( vmm_data to, output string diff, input int kind = -1); _class cp; this.__vmm_done_user = 1; compare = this.do_compare(to, diff, kind); if (this.__vmm_done_user) return compare; if (!$cast(cp, to)) begin vmm_fatal(this.log, "Cannot compare to non-_class instance"); return 0; end this.__vmm_rhs = cp; this.__vmm_kind = kind; this.do_all(DO_COMPARE, __vmm_bytes, __vmm_bytes); diff = this.__vmm_image; return this.__vmm_status; endfunction virtual function int unsigned byte_pack(ref logic [7:0] bytes[], input int unsigned offset = 0, input int kind = -1); this.__vmm_done_user = 1; byte_pack = this.do_byte_pack(bytes, offset, kind); if (this.__vmm_done_user) return byte_pack; this.__vmm_offset = offset; this.__vmm_kind = kind; this.do_all(DO_PACK, bytes, __vmm_bytes); return this.__vmm_offset - offset; endfunction virtual function int unsigned byte_unpack(const ref logic [7:0] bytes[], input int unsigned offset = 0, input int len = -1, input int kind = -1); this.__vmm_done_user = 1; byte_unpack = this.do_byte_unpack(bytes, offset, len, kind); if (this.__vmm_done_user) return byte_unpack; this.__vmm_offset = offset; this.__vmm_kind = kind; this.do_all(DO_UNPACK, __vmm_bytes, bytes); return this.__vmm_offset - offset; endfunction | |
Defined at line 1959 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name=%s", this.__vmm_image, this.__vmm_prefix, this._name.name()); end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin if (__vmm_rhs._name !== this._name) begin $sformat(this.__vmm_image, "this._name (%s) !== to._name (%s)", this._name.name(), __vmm_rhs._name.name()); this.__vmm_status = 0; return; end end DO_PACK: begin int start; int count; string stemp; bit [31:0] size=0; start = this.__vmm_offset; stemp = this._name.name(); count = (stemp.len()); this.__vmm_maxbits = this._name.name(); vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int size; int index; string stemp; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) stemp = this.__vmm_maxbits; index = 0; vmm_data_member_enum_set_name(this._name,stemp,index) end endcase | |
Defined at line 787 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach(this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) begin $sformat(this.__vmm_image, "%s %0d: %s ", this.__vmm_image, i, this._name[i].name()); if (_count == 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; end end _count++; end $sformat(this.__vmm_image, "%s", this.__vmm_image); end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin __vmm_rhs._name[i]=this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[%0d] exists but to._name[%0d] does not", i, i); this.__vmm_status = 0; return; end else if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] (%s) !== to._name[%0d] (%s)", i, this._name[i].name, i, __vmm_rhs._name[i].name); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int index; string stemp; bit [31:0] size=0; start = this.__vmm_offset; this.__vmm_maxbits = 0; size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) foreach (this._name[j]) begin this.__vmm_maxbits = 0; stemp = this._name[j].name(); count = (stemp.len()); this.__vmm_maxbits = this._name[j].name(); index = j; vmm_data_member_scalar_packint(pack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int index=0; string stemp; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; for (int j=0; j < size; j++) begin this.__vmm_maxbits =0; vmm_data_member_scalar_unpackint(unpack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) stemp = this.__vmm_maxbits; count = 0; vmm_data_member_enum_set_name(this._name[index],stemp,count) this.__vmm_maxbits =""; end end endcase | |
Defined at line 991 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach(this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) begin $sformat(this.__vmm_image, "%s \"%s\":%s", this.__vmm_image, i, this._name[i].name); if (_count == 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; end end _count++; end end DO_COPY: begin __vmm_rhs._name.delete(); foreach (this._name[i]) begin __vmm_rhs._name[i] = this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] exists but to._name[\"%s\"] does not", i, i); this.__vmm_status = 0; return; end else if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[\"%s\"] (%s) !== to._name[\"%s\"] (%s)", i, this._name[i].name, i, __vmm_rhs._name[i].name); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int index; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; start = this.__vmm_offset; stemp = this._name.first(sindextemp); index = 0; size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin this.__vmm_maxbits =0; sindextemp = j; sindexcount = sindextemp.len(); this.__vmm_maxbits = sindextemp; vmm_data_member_scalar_packint(pack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) this.__vmm_maxbits =0; stemp = this._name[j].name(); count = (stemp.len()); vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = this._name[j].name(); vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int start; int count; int index; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; index = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; for (int j=0; j < size; j++) begin this.__vmm_maxbits = 0; vmm_data_member_scalar_unpackint(unpack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) sindextemp = this.__vmm_maxbits; this.__vmm_maxbits = 0; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) stemp = this.__vmm_maxbits; index = 0; vmm_data_member_enum_set_name(this._name[sindextemp],stemp,index) this.__vmm_maxbits =""; end end endcase | |
Defined at line 1090 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int size =0; size = $size(this._name); $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, size); for (int i = 0; i < size; i++) begin $sformat(this.__vmm_image, "%s %s", this.__vmm_image, this._name[i].name()); if (i == 2 && size > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = size - 3; end end end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin foreach (this._name[i]) begin if (__vmm_rhs._name[i] !== this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] (%s) !== to._name[%0d] (%s)", i, this._name[i].name(), i, __vmm_rhs._name[i].name()); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; string stemp; bit [31:0] size=0; start = this.__vmm_offset; vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin stemp = this._name[j].name(); count = (stemp.len()); this.__vmm_maxbits = this._name[j].name(); vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) size++; end vmm_data_member_scalar_packint(pack,size,start,0) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int index; string stemp; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; for (int j=0; j < size; j++) begin vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) stemp = this.__vmm_maxbits; index = 0; vmm_data_member_enum_set_name(this._name[j],stemp,index) this.__vmm_maxbits =""; end end endcase | |
Defined at line 837 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.size()); for (int i = 0; i < this._name.size(); i++) begin $sformat(this.__vmm_image, "%s %s", this.__vmm_image, this._name[i].name()); if (i == 2 && this._name.size() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = this._name.size() - 3; end end end DO_COPY: begin __vmm_rhs._name = new [this._name.size()]; foreach(this._name[i]) __vmm_rhs._name[i] = this._name[i]; end DO_COMPARE: begin if (__vmm_rhs._name.size() !== this._name.size()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.size(), __vmm_rhs._name.size()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (__vmm_rhs._name[i] !== this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] (%s) !== to._name[%0d] (%s)", i, this._name[i].name(), i, __vmm_rhs._name[i].name()); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int index; int element; string stemp; bit [31:0] size=0; start = this.__vmm_offset; size = this._name.size(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin stemp = this._name[j].name(); count = (stemp.len()); this.__vmm_maxbits = this._name[j].name(); vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int index; int start; string stemp; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this._name = new [size]; this.__vmm_maxbits =0; for (int j=0; j < size; j++) begin this.__vmm_maxbits =""; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) stemp = this.__vmm_maxbits; index = 0; vmm_data_member_enum_set_name(this._name[j],stemp,index) this.__vmm_maxbits =""; end end endcase | |
Defined at line 909 of file std_lib/vmm_data_macros.sv.
|
|
|
if ( __stemp == __name.name()) begin __name = __name; __index =0; end else begin while ( __stemp != __name.name()) begin __name = __name.next(); if ( __index > __name.num() ) break; __index++; end end | |
Defined at line 68 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin if ( _name == null ) begin vmm_warning(this.log, " vmm_data _name object does not exist, no action"); end else begin string _prefix = this.__vmm_prefix; $sformat(this.__vmm_image, "%s\n%s _name is %s", this.__vmm_image, this.__vmm_prefix, (this._name == null) ? "null" : ""); this.__vmm_prefix = _prefix; end end DO_COPY: begin if ( _name == null ) begin vmm_warning(this.log, " vmm_data _name object does not exist, no action"); end else begin __vmm_rhs._name = this._name; end end DO_COMPARE: begin string diff; if ( _name == null ) begin vmm_warning(this.log, " vmm_data _name object does not exist, no action"); end else begin if (this._name != __vmm_rhs._name) begin this.__vmm_image = "this._name !== to._name"; this.__vmm_status = 0; return; end end end DO_PACK: begin if ( _name == null ) begin vmm_warning(this.log, " vmm_data _name object does not exist, no action"); end else begin end end DO_UNPACK: begin this._name = null; end endcase | |
Defined at line 1203 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach(this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) $sformat(this.__vmm_image, "%s %0d: %s", this.__vmm_image, i,(this._name[i] == null) ? "null" : ""); if (_count== 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, "\n..."}; end _count++; end end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin __vmm_rhs._name[i] = new; __vmm_rhs._name[i] = this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[%0d] exists but to._name[%0d] does not", i, i); this.__vmm_status = 0; return; end if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_PACK: begin end DO_UNPACK: begin foreach (this._name[i]) begin this._name[i] = null; end end endcase | |
Defined at line 1334 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach(this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) $sformat(this.__vmm_image, "%s \"%s\": %s", this.__vmm_image, i,(this._name[i] == null) ? "null" : ""); if (_count== 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, "\n..."}; end _count++; end end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin __vmm_rhs._name[i] = new; __vmm_rhs._name[i] = this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] exists but to._name[\"%s\"] does not", i, i); this.__vmm_status = 0; return; end if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[\"%s\"] !== to._name[\"%s\"]", i, i); this.__vmm_status = 0; return; end end end DO_PACK: begin end DO_UNPACK: begin foreach (this._name[i]) begin this._name[i] = null; end end endcase | |
Defined at line 1386 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int size =0; size = $size(this._name); $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, size); for (int i = 0; i < size; i++) begin $sformat(this.__vmm_image, "%s %s", this.__vmm_image, (this._name[i] == null) ? "null" : ""); if (i == 2 && size > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = size - 3; end end end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin foreach (this._name[i]) begin if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_PACK: begin end DO_UNPACK: begin foreach (this._name[i]) begin this._name[i] = null; end end endcase | |
Defined at line 1251 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.size()); for (int i = 0; i < this._name.size(); i++) begin $sformat(this.__vmm_image, "%s %s", this.__vmm_image, (this._name[i] == null) ? "null" : ""); if (i == 2 && this._name.size() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = this._name.size() - 3; end end end DO_COPY: begin __vmm_rhs._name = new[this._name.size()]; foreach(this._name[i]) begin __vmm_rhs._name[i] = this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.size() !== this._name.size()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.size(), __vmm_rhs._name.size()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_PACK: begin end DO_UNPACK: begin foreach (this._name[i]) begin this._name[i] = null; end end endcase | |
Defined at line 1289 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name='h%0h", this.__vmm_image, this.__vmm_prefix, this._name); end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin if (__vmm_rhs._name !== this._name) begin $sformat(this.__vmm_image, "this._name ('h%0h) !== to._name ('h%0h)", this._name, __vmm_rhs._name); this.__vmm_status = 0; return; end end DO_PACK: begin int start; int count; start = this.__vmm_offset; vmm_data_member_scalar_count(this._name,count) this.__vmm_maxbits = this._name; vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; start = this.__vmm_offset; vmm_data_member_scalar_count(this._name,count) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) this._name = this.__vmm_maxbits; vmm_data_member_update_offset(this.__vmm_offset,count) end endcase | |
Defined at line 38 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach (this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) $sformat(this.__vmm_image, "%s %0d:`%0h", this.__vmm_image, i, this._name[i]); if (_count == 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; end _count++; end end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin __vmm_rhs._name[i]=this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[%0d] exists but to._name[%0d] does not", i, i); this.__vmm_status = 0; return; end else if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d]:'h%0h !== to._name[%0d]:'h%0h", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int index; int element=0; bit [31:0] size=0; start = this.__vmm_offset; element = this._name.first(index); vmm_data_member_scalar_count(element,count) element = 0; size = this._name.num(); foreach (this._name[j]) begin this.__vmm_maxbits = this._name[j]; index = j; if (element == 0 ) begin vmm_data_member_update_offset(this.__vmm_offset,8) element = 1; end vmm_data_member_scalar_packint(pack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_scalar_packint(pack,count,(start+4),0) end DO_UNPACK: begin int start; int count; int index; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) for (int j=0; j < size; j++) begin vmm_data_member_scalar_unpackint(unpack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this._name[index] = this.__vmm_maxbits; end end endcase | |
Defined at line 211 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach (this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) $sformat(this.__vmm_image, "%s \"%s\":'h%0h", this.__vmm_image, i, this._name[i]); if (_count == 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; end _count++; end end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin __vmm_rhs._name[i] = this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if(!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] exists but to._name[\"%s\"] does not", i, i); this.__vmm_status = 0; return; end else if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[\"%s\"]:'h%0h !== to._name[\"%s\"]:'h%0h", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; start = this.__vmm_offset; stemp = this._name.first(sindextemp); size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin this.__vmm_maxbits =0; sindextemp = j; sindexcount = sindextemp.len(); this.__vmm_maxbits = sindextemp; vmm_data_member_scalar_packint(pack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) this.__vmm_maxbits =0; vmm_data_member_scalar_count(this._name[j],count) vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = this._name[j]; vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int start; int count; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; this.__vmm_maxbits = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) for (int j=0; j < size; j++) begin vmm_data_member_scalar_unpackint(unpack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) sindextemp = this.__vmm_maxbits; vmm_data_member_update_offset(this.__vmm_offset,sindexcount) this.__vmm_maxbits = 0; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) this._name[sindextemp] = this.__vmm_maxbits; vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 303 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int size =0; size = $size(this._name); $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, size); for (int i = 0; i < size; i++) begin $sformat(this.__vmm_image, "%s 'h%0h", this.__vmm_image, this._name[i]); if (i == 2 && size > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = size - 3; end end end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin foreach (this._name[i]) begin if (__vmm_rhs._name[i] !== this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] ('h%0h) !== to._name[%0d] ('h%0h)", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; bit [31:0] size=0; start = this.__vmm_offset; vmm_data_member_update_offset(this.__vmm_offset,8) foreach (this._name[j]) begin if ( j == 0 ) vmm_data_member_scalar_count(this._name[j],count) this.__vmm_maxbits = this._name[j]; vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) size++; end vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_scalar_packint(pack,count,(start+4),0) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int start; int count; bit [31:0] size = 0; vmm_data_member_scalar_unpackint(unpack,size,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) for (int j=0; j < size; j++) begin vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) this._name[j] = this.__vmm_maxbits; vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 76 of file std_lib/vmm_data_macros.sv.
|
|
|
__count = $bits(__name)/8; if ($bits(__name)%8 ) __count++; | |
Defined at line 23 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.size()); for (int i = 0; i < this._name.size(); i++) begin $sformat(this.__vmm_image, "%s 'h%0h", this.__vmm_image, this._name[i]); if (i == 2 && this._name.size() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = this._name.size() - 3; end end end DO_COPY: begin __vmm_rhs._name = new [this._name.size()]; foreach(this._name[i]) __vmm_rhs._name[i]=this._name[i]; end DO_COMPARE: begin if (__vmm_rhs._name.size() !== this._name.size()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.size(), __vmm_rhs._name.size()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (__vmm_rhs._name[i] !== this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] ('h%0h) !== to._name[%0d] ('h%0h)", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int index; bit [31:0] size=0; start = this.__vmm_offset; size = this._name.size(); foreach (this._name[j]) begin if ( j == 0) begin vmm_data_member_scalar_count(this._name[j],count) vmm_data_member_update_offset(this.__vmm_offset,8) end this.__vmm_maxbits = this._name[j]; vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_scalar_packint(pack,count,(start+4),0) end DO_UNPACK: begin int start; int count; int index; bit [31:0] size = 0; vmm_data_member_scalar_unpackint(unpack,size,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) this._name = new [size]; for (int j=0; j < size; j++) begin vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) this._name[j] = this.__vmm_maxbits; vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 139 of file std_lib/vmm_data_macros.sv.
|
|
|
for (int i=0; i < __count; i++) begin __pack[__offset+i] = __maxbits[i*8 +: 8]; end | |
Defined at line 29 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
if ( __endian) begin {__pack[__st],__pack[__st+1],__pack[__st+2],__pack[__st+3]} = __index; end else begin {__pack[__st+3],__pack[__st+2],__pack[__st+1],__pack[__st]} = __index; end | |
Defined at line 43 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
for (int i=0; i < __count; i++) begin __maxbits[i*8 +: 8] = __unpack[__offset+i]; end | |
Defined at line 36 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
if ( __endian) begin __index = {__unpack[__st],__unpack[__st+1],__unpack[__st+2],__unpack[__st+3]}; end else begin __index = {__unpack[__st+3],__unpack[__st+2],__unpack[__st+1],__unpack[__st]}; end | |
Defined at line 53 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name=\"%s\"", this.__vmm_image, this.__vmm_prefix, this._name); end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin if (__vmm_rhs._name != this._name) begin $sformat(this.__vmm_image, "this._name (\"%s\") !== to._name (\"%s\")", this._name, __vmm_rhs._name); this.__vmm_status = 0; return; end end DO_PACK: begin int start; int count; start = this.__vmm_offset; count = (this._name.len()); this.__vmm_maxbits = 0; vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = this._name; vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int size; this.__vmm_maxbits = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) this._name = this.__vmm_maxbits; vmm_data_member_update_offset(this.__vmm_offset,count) end endcase | |
Defined at line 407 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach(this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) $sformat(this.__vmm_image, "%s %0d:\"%s\"", this.__vmm_image, i, this._name[i]); if (_count == 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; end _count++; end $sformat(this.__vmm_image, "%s\"", this.__vmm_image); end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin __vmm_rhs._name[i]=this._name[i]; end end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[%0d] exists but to._name[%0d] does not", i, i); this.__vmm_status = 0; return; end else if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] (\"%s\") !== to._name[%0d] (\"%s\")", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int index; bit [31:0] size=0; start = this.__vmm_offset; this.__vmm_maxbits = 0; size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) foreach (this._name[j]) begin this.__vmm_maxbits = 0; count = (this._name[j].len()); this.__vmm_maxbits = this._name[j]; index = j; vmm_data_member_scalar_packint(pack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int start; int count; int index; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; for (int j=0; j < size; j++) begin vmm_data_member_scalar_unpackint(unpack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this._name[index] = this.__vmm_maxbits; this.__vmm_maxbits = 0; end end endcase | |
Defined at line 596 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.num()); foreach (this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) $sformat(this.__vmm_image, "%s \"%s\":\"%s\"", this.__vmm_image, i, this._name[i]); if (_count == 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; end _count++; end end DO_COPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) __vmm_rhs._name[i] = this._name[i]; end DO_COMPARE: begin if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] exists but to._name[\"%s\"] does not", i, i); this.__vmm_status = 0; return; end else if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[\"%s\"] (\"%s\") !== to._name[\"%s\"] (\"%s\")", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; string sindextemp; int sindexcount; bit [31:0] size=0; start = this.__vmm_offset; size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin this.__vmm_maxbits =0; sindextemp = j; sindexcount = sindextemp.len(); this.__vmm_maxbits = sindextemp; vmm_data_member_scalar_packint(pack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) this.__vmm_maxbits =0; count = this._name[j].len(); vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = this._name[j]; vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int start; int count; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; this.__vmm_maxbits = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) for (int j=0; j < size; j++) begin this.__vmm_maxbits = 0; vmm_data_member_scalar_unpackint(unpack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) sindextemp = this.__vmm_maxbits; this.__vmm_maxbits = 0; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this._name[sindextemp] = this.__vmm_maxbits; end end endcase | |
Defined at line 687 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int size =0; size = $size(this._name); $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, size); for (int i = 0; i < size; i++) begin $sformat(this.__vmm_image, "%s \"%s\"", this.__vmm_image, this._name[i]); if (i == 2 && size > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = size - 3; end end end DO_COPY: begin __vmm_rhs._name = this._name; end DO_COMPARE: begin foreach (this._name[i]) begin if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] (%s) !== to._name[%0d] (%s)", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; string stemp; bit [31:0] size=0; start = this.__vmm_offset; vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; foreach (this._name[j]) begin count = (this._name[j].len()); this.__vmm_maxbits = this._name[j]; vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) size++; end vmm_data_member_scalar_packint(pack,size,start,0) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; bit [31:0] size = 0; start = this.__vmm_offset; this.__vmm_maxbits =0; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) for (int j=0; j < size; j++) begin this.__vmm_maxbits =""; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this._name[j] = this.__vmm_maxbits; this.__vmm_maxbits =""; end end endcase | |
Defined at line 452 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin $sformat(this.__vmm_image, "%s\n%s _name[%0d]=", this.__vmm_image, this.__vmm_prefix, this._name.size()); for (int i = 0; i < this._name.size(); i++) begin $sformat(this.__vmm_image, "%s \"%s\"", this.__vmm_image, this._name[i]); if (i == 2 && this._name.size() > 5) begin this.__vmm_image = {this.__vmm_image, " ..."}; i = this._name.size() - 3; end end end DO_COPY: begin __vmm_rhs._name = new [this._name.size()]; foreach(this._name[i]) __vmm_rhs._name[i] = this._name[i]; end DO_COMPARE: begin if (__vmm_rhs._name.size() !== this._name.size()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.size(), __vmm_rhs._name.size()); this.__vmm_status = 0; return; end foreach (this._name[i]) begin if (__vmm_rhs._name[i] != this._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] (%s) !== to._name[%0d] (%s)", i, this._name[i], i, __vmm_rhs._name[i]); this.__vmm_status = 0; return; end end end DO_PACK: begin int start; int count; int firstcount; string stemp; bit [31:0] size=0; start = this.__vmm_offset; size = this._name.size(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; foreach (this._name[j]) begin count = (this._name[j].len()); this.__vmm_maxbits = this._name[j]; vmm_data_member_scalar_packint(pack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int index; int start; bit [31:0] size = 0; start = this.__vmm_offset; this.__vmm_maxbits =0; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this._name = new [size]; for (int j=0; j < size; j++) begin this.__vmm_maxbits =""; vmm_data_member_scalar_unpackint(unpack,count,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,count,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,count) this._name[j] = this.__vmm_maxbits; this.__vmm_maxbits =""; end end endcase | |
Defined at line 520 of file std_lib/vmm_data_macros.sv.
|
|
|
__offset = __offset + __count; | |
Defined at line 63 of file std_lib/vmm_data_macros_utils.sv.
|
|
|
this.__vmm_status = this.do_''_name(do_what, this.__vmm_prefix, this.__vmm_image, this.__vmm_rhs, this.__vmm_kind, this.__vmm_offset, pack, unpack); if (__vmm_status == 0) return; | |
Defined at line 1951 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin if ( _name == null ) begin vmm_warning(this.log, " do-print 1jvmm_data _name object does not exist, no action"); end else begin string _prefix = this.__vmm_prefix; $sformat(this.__vmm_image, "%s\n%s", this.__vmm_image, this._name.psdisplay({this.__vmm_prefix, " _name: "})); this.__vmm_prefix = _prefix; end end DO_COPY: begin if (_name == null) begin vmm_warning(this.log, " do-copy 1vmm_data _name object does not exist, no action"); end else begin case (_how & HOW_TO_COPY) DO_REFCOPY: begin __vmm_rhs._name = this._name; end DO_DEEPCOPY: begin $cast(__vmm_rhs._name, this._name.copy()); end endcase end end DO_COMPARE: begin if (_name == null) begin vmm_warning(this.log, " do-ccompare 1 vmm_data _name object does not exist, no action"); end else begin case (_how & HOW_TO_COMPARE) DO_REFCOMPARE: begin if (this._name != __vmm_rhs._name) begin $sformat(this.__vmm_image, "this._name !== to._name"); this.__vmm_status = 0; return; end end DO_DEEPCOMPARE: begin string diff; if (!this._name.compare(__vmm_rhs._name, diff)) begin $sformat(this.__vmm_image, "this._name !== to._name: %s ", diff); this.__vmm_status = 0; return; end end endcase end end DO_PACK: begin int count=0; if (_name == null) begin vmm_warning(this.log, " vmm_data _name object does not exist, no action"); end else begin count = this._name.byte_pack(pack, this.__vmm_offset, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end end DO_UNPACK: begin int count=0; this._name = new(); count = this._name.byte_unpack(unpack, this.__vmm_offset, this.__vmm_len, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end endcase | |
Defined at line 1438 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; string _prefix = this.__vmm_prefix; foreach (this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) begin string pf; $sformat(pf, "%s _name[%0d]", this.__vmm_prefix, i); $sformat(this.__vmm_image, "%s\n%s", this.__vmm_image, this._name[i].psdisplay(pf)); if (_count== 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, "\n", _prefix, "..."}; end _count++; end end this.__vmm_prefix = _prefix; end DO_COPY: begin case (_how & HOW_TO_COPY) DO_REFCOPY: begin __vmm_rhs._name.delete(); foreach (this._name[i]) begin __vmm_rhs._name[i] = this._name[i]; end end DO_DEEPCOPY: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin $cast(__vmm_rhs._name[i], this._name[i].copy()); end end endcase end DO_COMPARE: begin string diff; if (__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), __vmm_rhs._name.num()); this.__vmm_status = 0; return; end case (_how & HOW_TO_COMPARE) DO_REFCOMPARE: begin __vmm_rhs._name.delete(); foreach (this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[%0d] exists but to._name[%0d] does not", i, i); this.__vmm_status = 0; return; end if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_DEEPCOMPARE: begin __vmm_rhs._name.delete(); foreach(this._name[i]) begin if (!__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[%0d] exists but to._name[%0d] does not", i, i); this.__vmm_status = 0; return; end if (!this._name[i].compare(__vmm_rhs._name[i], diff)) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]: %s", i, i, diff); this.__vmm_status = 0; return; end end end endcase end DO_PACK: begin int start; int count; int index; string stemp; bit [31:0] size=0; start = this.__vmm_offset; this.__vmm_maxbits = 0; size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) foreach (this._name[j]) begin this.__vmm_maxbits = 0; index = j; vmm_data_member_scalar_packint(pack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) count = this._name[j].byte_pack(pack, this.__vmm_offset, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int index=0; string stemp; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; for (int j=0; j < size; j++) begin this.__vmm_maxbits =0; vmm_data_member_scalar_unpackint(unpack,index,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) this._name[index] = new(); count = this._name[index].byte_unpack(unpack, this.__vmm_offset, this.__vmm_len, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 1697 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int _count = 0; string _prefix = this.__vmm_prefix; foreach (this._name[i]) begin if (_count <= 2 || _count >= this._name.num()-2) begin string pf; $sformat(pf, "%s _name[\"%s\"]", this.__vmm_prefix, i); $sformat(this.__vmm_image, "%s\n%s", this.__vmm_image, this._name[i].psdisplay(pf)); if (_count== 2 && this._name.num() > 5) begin this.__vmm_image = {this.__vmm_image, "\n", _prefix, "..."}; end _count++; end end this.__vmm_prefix = _prefix; end DO_COPY: begin case (_how & HOW_TO_COPY) DO_REFCOPY: begin this.__vmm_rhs._name.delete(); foreach (this._name[i]) begin this.__vmm_rhs._name[i] = this._name[i]; end end DO_DEEPCOPY: begin this.__vmm_rhs._name.delete(); foreach(this._name[i]) begin $cast(this.__vmm_rhs._name[i], this._name[i].copy()); end end endcase end DO_COMPARE: begin string diff; if (this.__vmm_rhs._name.num() !== this._name.num()) begin $sformat(this.__vmm_image, "this._name.num() (%0d) !== to._name.num() (%0d)", this._name.num(), this.__vmm_rhs._name.num()); this.__vmm_status = 0; return; end case (_how & HOW_TO_COMPARE) DO_REFCOMPARE: begin this.__vmm_rhs._name.delete(); foreach (this._name[i]) begin if (!this.__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] exists but to._name[\"%s\"] does not", i, i); this.__vmm_status = 0; return; end if (this._name[i] != this.__vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_DEEPCOMPARE: begin this.__vmm_rhs._name.delete(); foreach(this._name[i]) begin if (!this.__vmm_rhs._name.exists(i)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] exists but to._name[\"%s\"] does not", i, i); this.__vmm_status = 0; return; end if (!this._name[i].compare(this.__vmm_rhs._name[i], diff)) begin $sformat(this.__vmm_image, "this._name[\"%s\"] !== to._name[\"%s\"]: %s", i, i, diff); this.__vmm_status = 0; return; end end end endcase end DO_PACK: begin int start; int count; int index; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; start = this.__vmm_offset; stemp = this._name.first(sindextemp); index = 0; size = this._name.num(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin this.__vmm_maxbits =0; sindextemp = j; sindexcount = sindextemp.len(); this.__vmm_maxbits = sindextemp; vmm_data_member_scalar_packint(pack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_pack(pack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) this.__vmm_maxbits =0; count = this._name[j].byte_pack(pack, this.__vmm_offset, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int start; int count; int index; string sindextemp; int sindexcount; string stemp; bit [31:0] size=0; index = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; for (int j=0; j < size; j++) begin this.__vmm_maxbits = 0; vmm_data_member_scalar_unpackint(unpack,sindexcount,this.__vmm_offset,0) vmm_data_member_update_offset(this.__vmm_offset,4) vmm_data_member_scalar_unpack(unpack,this.__vmm_maxbits,sindexcount,this.__vmm_offset) vmm_data_member_update_offset(this.__vmm_offset,sindexcount) sindextemp = this.__vmm_maxbits; this.__vmm_maxbits = 0; this._name[sindextemp] = new(); count = this._name[sindextemp].byte_unpack(unpack, this.__vmm_offset, this.__vmm_len, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 1816 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin int size =0; string _prefix = this.__vmm_prefix; size = $size(this._name); for (int i = 0; i < size; i++) begin string pf; $sformat(pf, "%s _name[%0d]: ", this.__vmm_prefix, i); $sformat(this.__vmm_image, "%s\n%s", this.__vmm_image, this._name[i].psdisplay(pf)); if (i == 2 && size > 5 ) begin this.__vmm_image = {this.__vmm_image, "\n", _prefix, "..."}; i = size -3; end end this.__vmm_prefix = _prefix; end DO_COPY: begin case (_how & HOW_TO_COPY) DO_REFCOPY: begin __vmm_rhs._name = this._name; foreach (this._name[i]) begin __vmm_rhs._name[i] = this._name[i]; end end DO_DEEPCOPY: begin __vmm_rhs._name = this._name; foreach(this._name[i]) begin $cast(__vmm_rhs._name[i], this._name[i].copy()); end end endcase end DO_COMPARE: begin string diff; case (_how & HOW_TO_COMPARE) DO_REFCOMPARE: begin foreach (this._name[i]) begin if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_DEEPCOMPARE: begin foreach(this._name[i]) begin if (!this._name[i].compare(__vmm_rhs._name[i],diff)) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]: %s", i, i, diff); this.__vmm_status = 0; return; end end end endcase end DO_PACK: begin int start; int count; bit [31:0] size=0; start = this.__vmm_offset; vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin count = this._name[j].byte_pack(pack, this.__vmm_offset, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) size++; end vmm_data_member_scalar_packint(pack,size,start,0) this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int index; string stemp; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; for (int j=0; j < size; j++) begin this._name[j] = new(); count = this._name[j].byte_unpack(unpack, this.__vmm_offset, this.__vmm_len, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 1509 of file std_lib/vmm_data_macros.sv.
|
|
|
case (do_what & _do) DO_PRINT: begin string _prefix = this.__vmm_prefix; for (int i = 0; i < this._name.size(); i++) begin string pf; $sformat(pf, "%s _name[%0d]: ", this.__vmm_prefix, i); $sformat(this.__vmm_image, "%s\n%s", this.__vmm_image, this._name[i].psdisplay(pf)); if (i == 2 && this._name.size() > 5) begin this.__vmm_image = {this.__vmm_image, "\n", _prefix, "..."}; i = this._name.size() - 3; end end this.__vmm_prefix = _prefix; end DO_COPY: begin case (_how & HOW_TO_COPY) DO_REFCOPY: begin __vmm_rhs._name = new [this._name.size()]; foreach (this._name[i]) begin __vmm_rhs._name[i] = this._name[i]; end end DO_DEEPCOPY: begin __vmm_rhs._name = new [this._name.size()]; foreach(this._name[i]) begin $cast(__vmm_rhs._name[i], this._name[i].copy()); end end endcase end DO_COMPARE: begin string diff; if (__vmm_rhs._name.size() !== this._name.size()) begin $sformat(this.__vmm_image, "this._name.size() (%0d) !== to._name.size() (%0d)", this._name.size(), __vmm_rhs._name.size()); this.__vmm_status = 0; return; end case (_how & HOW_TO_COMPARE) DO_REFCOMPARE: begin foreach (this._name[i]) begin if (this._name[i] != __vmm_rhs._name[i]) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]", i, i); this.__vmm_status = 0; return; end end end DO_DEEPCOMPARE: begin foreach(this._name[i]) begin if (!this._name[i].compare(__vmm_rhs._name[i],diff)) begin $sformat(this.__vmm_image, "this._name[%0d] !== to._name[%0d]: %s", i, i, diff); this.__vmm_status = 0; return; end end end endcase end DO_PACK: begin int start; int count; int index; int element; string stemp; bit [31:0] size=0; start = this.__vmm_offset; size = this._name.size(); vmm_data_member_scalar_packint(pack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits = 0; foreach (this._name[j]) begin count = this._name[j].byte_pack(pack, this.__vmm_offset, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end this.__vmm_len = this.__vmm_offset; end DO_UNPACK: begin int count; int start; int index; string stemp; bit [31:0] size = 0; start = this.__vmm_offset; vmm_data_member_scalar_unpackint(unpack,size,start,0) vmm_data_member_update_offset(this.__vmm_offset,4) this.__vmm_maxbits =0; foreach (this._name[j]) begin this._name[j] = new(); count = this._name[j].byte_unpack(unpack, this.__vmm_offset, this.__vmm_len, this.__vmm_kind); vmm_data_member_update_offset(this.__vmm_offset,count) end end endcase | |
Defined at line 1600 of file std_lib/vmm_data_macros.sv.
|
|
|
Defined at line 134 of file std_lib/vmm.sv.
|
|
|
Defined at line 136 of file std_lib/vmm.sv.
|
|
|
Defined at line 135 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::DEBUG_TYP, vmm_log::DEBUG_SEV)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 320 of file std_lib/vmm.sv.
|
|
|
_q = '{}
| |
Defined at line 37 of file std_lib/vmm_scenario_gen.sv.
|
|
|
If you get a syntax error on this line, the file is corrupt. Make sure you unpack the VMM distribution file with gunzip then tar, not a Windows tool | |
Defined at line 22 of file std_lib/vmm.sv.
|
|
|
If you get a syntax error on this line, the file is corrupt. Make sure you unpack the VMM distribution file with gunzip then tar, not a Windows tool | |
Defined at line 22 of file std_lib/vmm.sv.
|
|
|
If you get a syntax error on this line, the file is corrupt. Make sure you unpack the VMM distribution file with gunzip then tar, not a Windows tool | |
Defined at line 22 of file std_lib/vmm.sv.
|
|
|
If you get a syntax error on this line, the file is corrupt. Make sure you unpack the VMM distribution file with gunzip then tar, not a Windows tool | |
Defined at line 22 of file std_lib/vmm.sv.
|
|
|
If you get a syntax error on this line, the file is corrupt. Make sure you unpack the VMM distribution file with gunzip then tar, not a Windows tool | |
Defined at line 22 of file std_lib/vmm.sv.
|
|
|
If you get a syntax error on this line, the file is corrupt. Make sure you unpack the VMM distribution file with gunzip then tar, not a Windows tool | |
Defined at line 22 of file std_lib/vmm.sv.
|
|
|
Defined at line 47 of file std_lib/vmm.sv.
|
|
|
vmm_env
| |
Defined at line 242 of file std_lib/vmm.sv.
|
|
|
Defined at line 259 of file std_lib/vmm.sv.
|
|
|
Defined at line 250 of file std_lib/vmm.sv.
|
|
|
Defined at line 251 of file std_lib/vmm.sv.
|
|
|
Defined at line 245 of file std_lib/vmm.sv.
|
|
|
Defined at line 247 of file std_lib/vmm.sv.
|
|
|
Defined at line 246 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::FAILURE_TYP, vmm_log::ERROR_SEV)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 276 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::FAILURE_TYP, vmm_log::FATAL_SEV)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 284 of file std_lib/vmm.sv.
|
|
|
Defined at line 24 of file HAL/vmm_hw.sv.
|
|
|
Defined at line 49 of file HAL/vmm_hw_rtl.sv.
|
|
|
Defined at line 95 of file data/vmm_1.0.1.svdoc.
|
|
|
Defined at line 25 of file HAL/vmm_hw_arch_null.sv.
|
|
|
Defined at line 74 of file HAL/vmm_hw_rtl.sv.
|
|
|
1024
| |
Defined at line 27 of file HAL/vmm_hw.sv.
|
|
|
Defined at line 25 of file HAL/vmm_hw_rtl.sv.
|
|
|
endinterface
| |
Defined at line 83 of file HAL/vmm_hw_rtl.sv.
|
|
|
interface
| |
Defined at line 82 of file HAL/vmm_hw_rtl.sv.
|
|
|
Defined at line 25 of file HAL/vmm_hw_port.sv.
|
|
|
class_inject_item_scenario
| |
Defined at line 42 of file std_lib/vmm_scenario_gen.sv.
|
|
|
vmm_log
| |
Defined at line 176 of file std_lib/vmm.sv.
|
|
|
Defined at line 184 of file std_lib/vmm.sv.
|
|
|
Defined at line 117 of file std_lib/vmm.sv.
|
|
|
Defined at line 24 of file RAL/vmm_mam.sv.
|
|
|
do if (log.start_msg(vmm_log::NOTE_TYP)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 336 of file std_lib/vmm.sv.
|
|
|
vmm_notify
| |
Defined at line 188 of file std_lib/vmm.sv.
|
|
|
Defined at line 196 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::PROTOCOL_TYP)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 360 of file std_lib/vmm.sv.
|
|
|
64
| |
Defined at line 27 of file RAL/vmm_ral.sv.
|
|
|
64
| |
Defined at line 31 of file RAL/vmm_ral.sv.
|
|
|
do if (log.start_msg(vmm_log::REPORT_TYP)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 344 of file std_lib/vmm.sv.
|
|
|
Defined at line 30 of file RAL/vmm_rw.sv.
|
|
|
Defined at line 37 of file RAL/vmm_rw.sv.
|
|
|
Defined at line 24 of file sb/vmm_sb.sv.
|
|
|
Defined at line 24 of file sb/vmm_sb_ds.sv.
|
|
|
class_scenario
| |
Defined at line 40 of file std_lib/vmm_scenario_gen.sv.
|
|
|
class_scenario_election
| |
Defined at line 44 of file std_lib/vmm_scenario_gen.sv.
|
|
|
class_scenario_election_valid
| |
Defined at line 45 of file std_lib/vmm_scenario_gen.sv.
|
|
|
vmm_scenario_gen_using(class_name, class_name_channel, text) | |
Defined at line 49 of file std_lib/vmm_scenario_gen.sv.
|
|
|
class_scenario_gen
| |
Defined at line 46 of file std_lib/vmm_scenario_gen.sv.
|
|
|
class_scenario_gen_callbacks
| |
Defined at line 47 of file std_lib/vmm_scenario_gen.sv.
|
|
|
class vmm_scenario_(class_name) extends VMM_DATA; static vmm_log log; local int next_scenario_kind = 0; local int max_length = 0; local string scenario_names[*]; int stream_id; int scenario_id; rand int unsigned scenario_kind; rand int unsigned length; rand class_name items[]; class_name using; rand int unsigned repeated = 0; static int unsigned repeat_thresh = 100; constraint vmm_scenario_valid_(class_name) { scenario_kind >= 0; scenario_kind < next_scenario_kind; length >= 0; length <= max_length; items.size() == length; repeated >= 0; solve scenario_kind before length VMM_SOLVE_BEFORE_OPT; solve length before items.size() VMM_SOLVE_BEFORE_OPT; } constraint repetition { repeated == 0; } function new(VMM_DATA_NEW_ARGS); super.new(this.log VMM_DATA_NEW_CALL); if (this.log == null) begin this.log = new({text, " Scenario"}, "Class"); this.notify.log = this.log; end using = null; endfunction: new virtual function void display(string prefix = ""); $display(this.psdisplay(prefix)); endfunction: display virtual function string psdisplay(string prefix = ""); int i; $sformat(psdisplay, "%sScenario \"%s\": kind=%0d, length=%0d (max=%0d), repeated=%0d\n", prefix, this.scenario_name(this.scenario_kind), this.scenario_kind, this.length, this.max_length, this.repeated); foreach (this.items[i]) begin psdisplay = {psdisplay, this.items[i].psdisplay(vmm_sformatf("%s Item #%0d: ", prefix, i))}; end endfunction: psdisplay function int unsigned define_scenario(string name, int unsigned max_len); define_scenario = this.next_scenario_kind++; this.scenario_names[define_scenario] = name; if (max_len > this.max_length) this.max_length = max_len; endfunction: define_scenario function void redefine_scenario(int unsigned scenario_kind, string name, int unsigned max_len); this.scenario_names[scenario_kind] = name; if (max_len > this.max_length) this.max_length = max_len; endfunction: redefine_scenario function string scenario_name(int unsigned scenario_kind); if (!this.scenario_names.exists(scenario_kind)) begin vmm_error(this.log, vmm_sformatf("Cannot find scenario name: undefined scenario kind %0d", scenario_kind)); return "?"; end scenario_name = this.scenario_names[scenario_kind]; endfunction: scenario_name function void allocate_scenario(class_name using = null); this.items = new [this.max_length]; foreach (this.items[i]) begin if (using == null) this.items[i] = new; else $cast(this.items[i], using.copy()); this.items[i].stream_id = this.stream_id; this.items[i].scenario_id = this.scenario_id; this.items[i].data_id = i; end endfunction: allocate_scenario function void fill_scenario(class_name using = null); int i; if (this.items.size() < this.max_length) begin this.items = new [this.max_length] (this.items); end foreach (this.items[i]) begin if (this.items[i] != null) continue; if (using == null) this.items[i] = new; else $cast(this.items[i], using.copy()); this.items[i].stream_id = this.stream_id; this.items[i].scenario_id = this.scenario_id; this.items[i].data_id = i; end endfunction: fill_scenario function void pre_randomize(); this.fill_scenario(this.using); endfunction: pre_randomize virtual task apply(channel_name channel, ref int unsigned n_insts); int i; for (i = 0; i < this.length; i++) begin class_name item; $cast(item, this.items[i].copy()); channel.put(item); end n_insts = this.length; endtask: apply endclass class vmm_inject_item_scenario_(class_name) extends vmm_scenario_(class_name); function new(class_name obj VMM_DATA_NEW_ARGS); super.new(VMM_DATA_NEW_CALL); this.items = new [1]; this.items[0] = obj; this.length = 1; this.repeated = 0; endfunction: new virtual task apply(channel_name channel, ref int unsigned n_insts); channel.put(this.items[0]); n_insts = 1; endtask: apply endclass class vmm_atomic_scenario_(class_name) extends vmm_scenario_(class_name); int unsigned ATOMIC; constraint atomic_scenario { if (scenario_kind == ATOMIC) { length == 1; repeated == 0; } } function new(VMM_DATA_NEW_ARGS); super.new(VMM_DATA_NEW_CALL); this.ATOMIC = this.define_scenario("Atomic", 1); this.scenario_kind = this.ATOMIC; this.length = 1; endfunction: new virtual function string psdisplay(string prefix = ""); psdisplay = super.psdisplay(prefix); endfunction:psdisplay function void pre_randomize(); super.pre_randomize(); endfunction virtual task apply(channel_name channel, ref int unsigned n_insts); super.apply(channel, n_insts); endtask: apply endclass class vmm_scenario_election_(class_name); int stream_id; int scenario_id; int unsigned n_scenarios; int unsigned last_selected[$]; int unsigned next_in_set; vmm_scenario_(class_name) scenario_set[$]; rand int select; constraint vmm_scenario_election_valid_(class_name) { select >= 0; select < n_scenarios; } constraint round_robin { select == next_in_set; } endclass typedef class vmm_scenario_gen_(class_name); class vmm_scenario_gen_callbacks_(class_name) extends vmm_xactor_callbacks; virtual task pre_scenario_randomize(vmm_scenario_gen_(class_name) gen, ref vmm_scenario_(class_name) scenario); endtask virtual task post_scenario_gen(vmm_scenario_gen_(class_name) gen, vmm_scenario_(class_name) scenario, ref bit dropped); endtask endclass class vmm_scenario_gen_(class_name) extends VMM_XACTOR; int unsigned stop_after_n_insts; int unsigned stop_after_n_scenarios; typedef enum int {GENERATED, DONE} symbols_e; vmm_scenario_election_(class_name) select_scenario; vmm_scenario_(class_name) scenario_set[$]; channel_name out_chan; protected int scenario_count; protected int inst_count; function new(string inst, int stream_id = -1, channel_name out_chan = null VMM_XACTOR_NEW_ARGS); super.new({text, " Scenario Generator"}, inst, stream_id VMM_XACTOR_NEW_CALL); if (out_chan == null) begin out_chan = new({text, " Scenario Generator output channel"}, inst); end this.out_chan = out_chan; this.log.is_above(this.out_chan.log); this.scenario_count = 0; this.inst_count = 0; this.stop_after_n_insts = 0; this.stop_after_n_scenarios = 0; this.select_scenario = new; begin vmm_atomic_scenario_(class_name) sc = new; this.scenario_set.push_back(sc); end this.notify.configure(GENERATED); this.notify.configure(DONE, vmm_notify::ON_OFF); endfunction: new function int unsigned get_n_insts(); get_n_insts = this.inst_count; endfunction: get_n_insts function int unsigned get_n_scenarios(); get_n_scenarios = this.scenario_count; endfunction: get_n_scenarios virtual task inject_obj(class_name obj); vmm_inject_item_scenario_(class_name) scenario = new(obj); this.inject(scenario); endtask: inject_obj virtual task inject(vmm_scenario_(class_name) scenario); bit drop = 0; scenario.stream_id = this.stream_id; scenario.scenario_id = this.scenario_count; foreach (scenario.items[i]) begin scenario.items[i].stream_id = scenario.stream_id; scenario.items[i].scenario_id = scenario.scenario_id; scenario.items[i].data_id = i; end vmm_callback(vmm_scenario_gen_callbacks_(class_name), post_scenario_gen(this, scenario, drop)); if (!drop) begin this.scenario_count++; this.notify.indicate(GENERATED, scenario); if (scenario.repeated > scenario.repeat_thresh) begin vmm_warning(this.log, vmm_sformatf("A scenario will be repeated %0d times...", scenario.repeated)); end repeat (scenario.repeated + 1) begin int unsigned n_insts = 0; scenario.apply(this.out_chan, n_insts); this.inst_count += n_insts; end end endtask: inject virtual function void reset_xactor(reset_e rst_typ = SOFT_RST); super.reset_xactor(rst_typ); this.scenario_count = 0; this.inst_count = 0; this.out_chan.flush(); vmm_delQ(this.select_scenario.last_selected); if (rst_typ >= FIRM_RST) begin this.notify.reset( , vmm_notify::HARD); end if (rst_typ >= HARD_RST) begin vmm_atomic_scenario_(class_name) sc = new; this.stop_after_n_insts = 0; this.stop_after_n_scenarios = 0; this.select_scenario = new; this.scenario_set.push_back(sc); end endfunction: reset_xactor virtual protected task main(); vmm_scenario_(class_name) the_scenario; fork super.main(); join_none while ((this.stop_after_n_insts <= 0 || this.inst_count < this.stop_after_n_insts) && (this.stop_after_n_scenarios <= 0 || this.scenario_count < this.stop_after_n_scenarios)) begin this.wait_if_stopped(); this.select_scenario.stream_id = this.stream_id; this.select_scenario.scenario_id = this.scenario_count; this.select_scenario.n_scenarios = this.scenario_set.size(); this.select_scenario.scenario_set = this.scenario_set; if (this.select_scenario.last_selected.size() == 0) this.select_scenario.next_in_set = 0; else this.select_scenario.next_in_set = ((this.select_scenario.last_selected[$] + 1) % this.scenario_set.size()); if (!this.select_scenario.randomize()) begin vmm_fatal(this.log, "Cannot select scenario descriptor"); continue; end if (this.select_scenario.select < 0 || this.select_scenario.select >= this.scenario_set.size()) begin vmm_fatal(this.log, vmm_sformatf("Select scenario #%0d is not within available set (0-%0d)", this.select_scenario.select, this.scenario_set.size()-1)); continue; end this.select_scenario.last_selected.push_back(this.select_scenario.select); while (this.select_scenario.last_selected.size() > 10) begin void'(this.select_scenario.last_selected.pop_front()); end the_scenario = this.scenario_set[this.select_scenario.select]; if (the_scenario == null) begin vmm_fatal(this.log, vmm_sformatf("Selected scenario #%0d does not exist", this.select_scenario.select)); continue; end the_scenario.stream_id = this.stream_id; the_scenario.scenario_id = this.scenario_count; foreach (the_scenario.items[i]) begin if (the_scenario.items[i] == null) continue; the_scenario.items[i].stream_id = the_scenario.stream_id; the_scenario.items[i].scenario_id = the_scenario.scenario_id; the_scenario.items[i].data_id = i; end vmm_callback(vmm_scenario_gen_callbacks_(class_name), pre_scenario_randomize(this, the_scenario)); if (the_scenario == null) continue; if (!the_scenario.randomize()) begin vmm_fatal(this.log, $psprintf("Cannot randomize scenario descriptor #%0d", this.select_scenario.select)); continue; end this.inject(the_scenario); end this.notify.indicate(DONE); this.notify.indicate(XACTOR_STOPPED); this.notify.indicate(XACTOR_IDLE); this.notify.reset(XACTOR_BUSY); this.scenario_count++; endtask: main endclass | |
Defined at line 52 of file std_lib/vmm_scenario_gen.sv.
|
|
|
class_scenario_valid
| |
Defined at line 41 of file std_lib/vmm_scenario_gen.sv.
|
|
|
$psprintf
| |
Defined at line 59 of file std_lib/vmm.sv.
|
|
|
Defined at line 28 of file std_lib/vmm_scenario_gen.sv.
|
|
|
vmm_str_backref(n+1)
| |
Defined at line 100 of file std_lib/vmm.sv.
|
|
|
vmm_str_match(str, regex)
| |
Defined at line 97 of file std_lib/vmm.sv.
|
|
|
vmm_str_postmatch()
| |
Defined at line 99 of file std_lib/vmm.sv.
|
|
|
vmm_str_prematch()
| |
Defined at line 98 of file std_lib/vmm.sv.
|
|
|
vmm_subenv
| |
Defined at line 221 of file std_lib/vmm.sv.
|
|
|
Defined at line 24 of file subenv/vmm_subenv.sv.
|
|
|
Defined at line 238 of file std_lib/vmm.sv.
|
|
|
Defined at line 229 of file std_lib/vmm.sv.
|
|
|
Defined at line 230 of file std_lib/vmm.sv.
|
|
|
Defined at line 224 of file std_lib/vmm.sv.
|
|
|
Defined at line 226 of file std_lib/vmm.sv.
|
|
|
Defined at line 225 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::DEBUG_TYP, vmm_log::TRACE_SEV)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 312 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::TRANSACTION_TYP)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 368 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::USER_TYP_n)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 384 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::DEBUG_TYP, vmm_log::VERBOSE_SEV)) begin void'(log.text(msg)); log.end_msg(); end while (0) | |
Defined at line 328 of file std_lib/vmm.sv.
|
|
|
do if (log.start_msg(vmm_log::FAILURE_TYP, vmm_log::WARNING_SEV)) begin void'(log.text(msg)); log.end_msg(); end while(0) | |
Defined at line 268 of file std_lib/vmm.sv.
|
|
|
vmm_xactor
| |
Defined at line 200 of file std_lib/vmm.sv.
|
|
|
Defined at line 217 of file std_lib/vmm.sv.
|
|
|
Defined at line 208 of file std_lib/vmm.sv.
|
|
|
Defined at line 209 of file std_lib/vmm.sv.
|
|
|
Defined at line 203 of file std_lib/vmm.sv.
|
|
|
Defined at line 205 of file std_lib/vmm.sv.
|
|
|
Defined at line 204 of file std_lib/vmm.sv.
|