Jump to content

mano

Members
  • Posts

    2
  • Joined

  • Last visited

mano's Achievements

Member

Member (1/2)

0

Reputation

  1. thanks mea1201. Using do_compare would let me implement the method to my liking. This is a viable alternative. I was also a bit concerned for unsuspecting users who might use the compare method assuming it will do what they expect (return fail if a comparison mismatch is found, inclusive of X's and Z's). I was a bit suprised when i couldn't find any discussion in this area. I was hoping for some reasoning behind the current implementation of the compare method.
  2. `uvm_field_int(variable-name, UVM_COMPARE) does comparison with ‘==’, instead of ‘===’ Won't this pose problems when comparing data types which can contain ‘x’ or ‘z’ (e.g logic) ? <QUOTE UVM 1.1, uvm_object_defines.svh> // MACRO: `uvm_field_int // // Implements the data operations for any packed integral property. // //| `uvm_field_int(ARG,FLAG) // // ~ARG~ is an integral property of the class, and ~FLAG~ is a bitwise OR of // one or more flag settings as described in <Field Macros> above. `define uvm_field_int(ARG,FLAG) \ begin \ case (what__) \ UVM_CHECK_FIELDS: \ begin \ __m_uvm_status_container.do_field_check(`"ARG`", this); \ end \ UVM_COPY: \ begin \ if(local_data__ == null) return; \ if(!((FLAG)&UVM_NOCOPY)) ARG = local_data__.ARG; \ end \ UVM_COMPARE: \ begin \ if(local_data__ == null) return; \ if(!((FLAG)&UVM_NOCOMPARE)) begin \ if(ARG !== local_data__.ARG) begin \ void'(__m_uvm_status_container.comparer.compare_field(`"ARG`", ARG, local_data__.ARG, $bits(ARG))); \ if(__m_uvm_status_container.comparer.result && (__m_uvm_status_container.comparer.show_max <= __m_uvm_status_container.comparer.result)) return; \ end \ end \ end \ </QUOTE UVM 1.1, uvm_object_defines.svh>
×
×
  • Create New...