summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/register/iipscr.C4
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/register/prdfCaptureData.C2
-rw-r--r--src/usr/diag/prdf/common/rule/prdfRuleMetaData.C4
-rwxr-xr-xsrc/usr/diag/prdf/common/util/prdfBitString.C209
-rwxr-xr-xsrc/usr/diag/prdf/common/util/prdfBitString.H186
-rwxr-xr-xsrc/usr/diag/prdf/framework/prdfFileRegisterAccess.C10
-rwxr-xr-xsrc/usr/diag/prdf/test/prdfsimScrDB.C14
-rwxr-xr-xsrc/usr/diag/prdf/test/prdfsimServices.C10
8 files changed, 176 insertions, 263 deletions
diff --git a/src/usr/diag/prdf/common/framework/register/iipscr.C b/src/usr/diag/prdf/common/framework/register/iipscr.C
index bfc68ca33..30537d131 100755
--- a/src/usr/diag/prdf/common/framework/register/iipscr.C
+++ b/src/usr/diag/prdf/common/framework/register/iipscr.C
@@ -231,7 +231,7 @@ uint64_t SCAN_COMM_REGISTER_CLASS::GetBitFieldJustified( uint32_t i_pos,
o_value <<= len_chunk; // Make room for new chunk.
// Get chunk.
- o_value |= static_cast<uint64_t>(bs->GetFieldJustify(pos, len_chunk));
+ o_value |= static_cast<uint64_t>(bs->getFieldJustify(pos, len_chunk));
}
return o_value;
@@ -261,7 +261,7 @@ void SCAN_COMM_REGISTER_CLASS::SetBitFieldJustified( uint32_t i_pos,
value >>= i_len - (offset + len_chunk); // right justify
// Set chunk.
- bs.SetFieldJustify( i_pos + offset, len_chunk,
+ bs.setFieldJustify( i_pos + offset, len_chunk,
static_cast<CPU_WORD>(value) );
}
}
diff --git a/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C b/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C
index 63fd52692..7b94791b3 100755
--- a/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C
+++ b/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C
@@ -309,7 +309,7 @@ CaptureData & CaptureData::operator=(const uint8_t *i_flatdata)
BitStringBuffer bs(bytecount * 8);
for(uint32_t bc = 0; bc < bytecount; ++bc)
{
- bs.SetFieldJustify(bc*8,8,(CPU_WORD)(*(i_flatdata+bc))); //mp01a
+ bs.setFieldJustify(bc*8,8,(CPU_WORD)(*(i_flatdata+bc))); //mp01a
}
i_flatdata += bytecount;
diff --git a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C
index ea3fa7f76..fc7843189 100644
--- a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C
+++ b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C
@@ -741,9 +741,9 @@ SCAN_COMM_REGISTER_CLASS * RuleMetaData::createVirtualRegister(
for (uint32_t i = 0; i < l_size; i++)
{
- l_bs.SetFieldJustify(32*(2*i) , 32,
+ l_bs.setFieldJustify(32*(2*i) , 32,
(i_vReg->cv_bitStrVect[i] >> 32) & 0xFFFFFFFF);
- l_bs.SetFieldJustify(32*((2*i)+1), 32,
+ l_bs.setFieldJustify(32*((2*i)+1), 32,
(i_vReg->cv_bitStrVect[i] & 0xFFFFFFFF));
}
diff --git a/src/usr/diag/prdf/common/util/prdfBitString.C b/src/usr/diag/prdf/common/util/prdfBitString.C
index 324dca132..08701c75d 100755
--- a/src/usr/diag/prdf/common/util/prdfBitString.C
+++ b/src/usr/diag/prdf/common/util/prdfBitString.C
@@ -42,6 +42,81 @@ namespace PRDF
// BitString class
//##############################################################################
+CPU_WORD BitString::getField( uint32_t i_pos, uint32_t i_len ) const
+{
+ PRDF_ASSERT( nullptr != getBufAddr() ); // must to have a valid address
+ PRDF_ASSERT( 0 < i_len ); // must have at least one bit
+ PRDF_ASSERT( i_len <= CPU_WORD_BIT_LEN ); // i_len length must be valid
+ PRDF_ASSERT( i_pos + i_len <= getBitLen() ); // field must be within range
+
+ // The returned value.
+ CPU_WORD o_val = 0;
+
+ // Get the relative address and position of the field.
+ uint32_t relPos = 0;
+ CPU_WORD * relAddr = GetRelativePosition( relPos, i_pos );
+
+ // The return value may cross two CPU_WORD addresses. Get length of each
+ // chunk, mask to clear the right-handed bits, and the shift value to make
+ // each chunk left-justified.
+ uint32_t len0 = i_len, len1 = 0;
+ if ( CPU_WORD_BIT_LEN < relPos + i_len )
+ {
+ len0 = CPU_WORD_BIT_LEN - relPos;
+ len1 = i_len - len0;
+ }
+
+ CPU_WORD mask0 = CPU_WORD_MASK << (CPU_WORD_BIT_LEN - len0);
+ CPU_WORD mask1 = CPU_WORD_MASK << (CPU_WORD_BIT_LEN - len1);
+
+ uint32_t shift0 = relPos;
+ uint32_t shift1 = CPU_WORD_BIT_LEN - relPos;
+
+ // Get first half of the value.
+ o_val = (*relAddr << shift0) & mask0;
+
+ // Get the second half of the value, if needed
+ if ( CPU_WORD_BIT_LEN < relPos + i_len )
+ {
+ ++relAddr;
+ o_val |= (*relAddr & mask1) >> shift1;
+ }
+
+ return o_val;
+}
+
+//------------------------------------------------------------------------------
+
+void BitString::setField( uint32_t i_pos, uint32_t i_len, CPU_WORD i_val )
+{
+ PRDF_ASSERT( nullptr != getBufAddr() ); // must to have a valid address
+ PRDF_ASSERT( 0 < i_len ); // must have at least one bit
+ PRDF_ASSERT( i_len <= CPU_WORD_BIT_LEN ); // i_len length must be valid
+ PRDF_ASSERT( i_pos + i_len <= getBitLen() ); // field must be within range
+
+ // Get the relative address and position of the field.
+ uint32_t relPos = 0;
+ CPU_WORD * relAddr = GetRelativePosition( relPos, i_pos );
+
+ // The value is left-justified. Ignore all other bits.
+ CPU_WORD mask = CPU_WORD_MASK << (CPU_WORD_BIT_LEN - i_len);
+ CPU_WORD val = i_val & mask;
+
+ // Set first half of the value.
+ *relAddr &= ~(mask >> relPos); // Clear field
+ *relAddr |= (val >> relPos); // Set field
+
+ // Get the second half of the value, if needed
+ if ( CPU_WORD_BIT_LEN < relPos + i_len )
+ {
+ relAddr++;
+ *relAddr &= ~(mask << (CPU_WORD_BIT_LEN - relPos)); // Clear field
+ *relAddr |= (val << (CPU_WORD_BIT_LEN - relPos)); // Set field
+ }
+}
+
+//------------------------------------------------------------------------------
+
void BitString::setPattern( uint32_t i_sPos, uint32_t i_sLen,
CPU_WORD i_pattern, uint32_t i_pLen )
{
@@ -62,10 +137,10 @@ void BitString::setPattern( uint32_t i_sPos, uint32_t i_sLen,
uint32_t len = std::min( i_pLen, endPos - pos );
// Get this chunk's pattern value, truncate (left justified) if needed.
- CPU_WORD pattern = bso.GetField( 0, len );
+ CPU_WORD pattern = bso.getField( 0, len );
// Set the pattern in this string.
- SetField( pos, len, pattern );
+ setField( pos, len, pattern );
}
}
@@ -106,8 +181,8 @@ void BitString::setString( const BitString & i_sStr, uint32_t i_sPos,
{
uint32_t len = std::min( actLen - pos, CPU_WORD_BIT_LEN );
- CPU_WORD value = i_sStr.GetField( i_sPos + pos, len );
- SetField( i_dPos + pos, len, value );
+ CPU_WORD value = i_sStr.getField( i_sPos + pos, len );
+ setField( i_dPos + pos, len, value );
}
}
else // Copy the data backwards.
@@ -120,8 +195,8 @@ void BitString::setString( const BitString & i_sStr, uint32_t i_sPos,
{
uint32_t len = std::min( actLen - pos, CPU_WORD_BIT_LEN );
- CPU_WORD value = i_sStr.GetField( i_sPos + pos, len );
- SetField( i_dPos + pos, len, value );
+ CPU_WORD value = i_sStr.getField( i_sPos + pos, len );
+ setField( i_dPos + pos, len, value );
}
}
}
@@ -137,10 +212,10 @@ void BitString::maskString( const BitString & i_mask )
{
uint32_t len = std::min( actLen - pos, CPU_WORD_BIT_LEN );
- CPU_WORD dVal = GetField( pos, len );
- CPU_WORD sVal = i_mask.GetField( pos, len );
+ CPU_WORD dVal = getField( pos, len );
+ CPU_WORD sVal = i_mask.getField( pos, len );
- SetField( pos, len, dVal & ~sVal );
+ setField( pos, len, dVal & ~sVal );
}
}
@@ -169,98 +244,6 @@ uint32_t BitString::GetSetCount(uint32_t bit_position,
return(count);
}
-// ------------------------------------------------------------------------------------------------
-
-CPU_WORD BitString::GetField
-(
- uint32_t iBitPos,
- uint32_t iLen
- ) const
-{
- PRDF_ASSERT((iBitPos + iLen) <= iv_bitLen);
- PRDF_ASSERT(iLen <= CPU_WORD_BIT_LEN);
- CPU_WORD value = 0; //dg02a
- if(getBufAddr() != NULL) //dg02a
- { //dg02a
- CPU_WORD * address = GetRelativePosition(iBitPos,iBitPos);
- value = *address << iBitPos;
-
- if(iBitPos + iLen > CPU_WORD_BIT_LEN) // we need the rest of the value
- {
- ++address;
- value |= *address >> (CPU_WORD_BIT_LEN - iBitPos);
- }
- if(iLen < CPU_WORD_BIT_LEN) // GNUC does not handle shift overflow as expected
- { // zero bits outside desired field
- value &= ((((CPU_WORD) 1) << iLen) - 1) << (CPU_WORD_BIT_LEN - iLen);
- }
- } //dg02a
-
- return(value);
-}
-
-// ------------------------------------------------------------------------------------------------
-
-CPU_WORD BitString::GetFieldJustify
-(
- uint32_t bit_position,
- uint32_t length
- ) const
-{
- CPU_WORD value = GetField(bit_position, length);
-
- value = RIGHT_SHIFT(length, value);
-
- return(value);
-}
-
-// ------------------------------------------------------------------------------------------------
-
-void BitString::SetField
-(
- uint32_t bit_position,
- uint32_t iLen,
- CPU_WORD value
- )
-{
- PRDF_ASSERT((bit_position + iLen) <= iv_bitLen);
- PRDF_ASSERT(iLen <= CPU_WORD_BIT_LEN);
-
- if(iv_bufAddr != NULL || value != 0) //dg02a
- { //dg02a
- CPU_WORD * address = GetRelativePosition(bit_position,bit_position); // dg02c
- CPU_WORD mask = CPU_WORD_MASK;
-
- mask <<= (CPU_WORD_BIT_LEN - iLen);
-
- value &= mask;
-
- *address &= ~(mask >> bit_position); // clear field
- *address |= value >> bit_position; // set field
-
- if(bit_position + iLen > CPU_WORD_BIT_LEN) // we overflowed into the next CPU_WORD
- {
- address++;
- *address &= ~(mask << (CPU_WORD_BIT_LEN - bit_position));
- *address |= (value << (CPU_WORD_BIT_LEN - bit_position));
- }
- } //dg02a
-}
-
-// ------------------------------------------------------------------------------------------------
-
-void BitString::SetFieldJustify
-(
- uint32_t bit_position,
- uint32_t length,
- CPU_WORD value
- )
-{
- value = LEFT_SHIFT(length, value);
-
- SetField(bit_position, length, value);
-}
-
// Function Specification //////////////////////////////////////////
//
// Title: Is Set
@@ -279,7 +262,7 @@ bool BitString::IsSet
uint32_t bit_position
) const
{
- return (GetField(bit_position,1) != 0);
+ return (getField(bit_position,1) != 0);
}
// Function Specification //////////////////////////////////////////////
@@ -300,7 +283,7 @@ void BitString::Set
uint32_t bit_position
)
{
- SetField(bit_position,1,CPU_WORD_MASK);
+ setField(bit_position,1,CPU_WORD_MASK);
}
// Function Specification //////////////////////////////////////////////
@@ -321,7 +304,7 @@ void BitString::Clear
uint32_t bit_position
)
{
- SetField(bit_position,1,0);
+ setField(bit_position,1,0);
}
// Function Specification //////////////////////////////////////////
@@ -350,7 +333,7 @@ bool BitString::IsEqual( const BitString & i_string ) const
{
uint32_t len = std::min( iv_bitLen - pos, (uint32_t)CPU_WORD_BIT_LEN );
- if ( GetField(pos, len) != i_string.GetField(pos, len) )
+ if ( getField(pos, len) != i_string.getField(pos, len) )
return false; // bit strings do not match
}
@@ -378,7 +361,7 @@ bool BitString::IsZero() const
{
uint32_t len = std::min( iv_bitLen - pos, (uint32_t)CPU_WORD_BIT_LEN );
- if ( 0 != GetField(pos, len) )
+ if ( 0 != getField(pos, len) )
return false; // something is non-zero
}
@@ -445,8 +428,8 @@ BitStringBuffer operator~(const BitString & bs)
{
uint32_t len = bsb.getBitLen() - pos;
len = std::min(len,CPU_WORD_BIT_LEN);
- CPU_WORD value = ~(bsb.GetField(pos,len));
- bsb.SetField(pos,len,value);
+ CPU_WORD value = ~(bsb.getField(pos,len));
+ bsb.setField(pos,len,value);
}
return bsb;
@@ -463,8 +446,8 @@ BitStringBuffer BitString::operator&(const BitString & bs) const
{
uint32_t len = std::min(this->getBitLen(), bs.getBitLen()) - pos;
len = std::min(len,CPU_WORD_BIT_LEN);
- CPU_WORD value = this->GetField(pos,len) & bs.GetField(pos,len);
- bsb.SetField(pos,len,value);
+ CPU_WORD value = this->getField(pos,len) & bs.getField(pos,len);
+ bsb.setField(pos,len,value);
}
return bsb;
@@ -481,8 +464,8 @@ BitStringBuffer BitString::operator|(const BitString & bs) const
{
uint32_t len = std::min(this->getBitLen(), bs.getBitLen()) - pos;
len = std::min(len,CPU_WORD_BIT_LEN);
- CPU_WORD value = this->GetField(pos,len) | bs.GetField(pos,len);
- bsb.SetField(pos,len,value);
+ CPU_WORD value = this->getField(pos,len) | bs.getField(pos,len);
+ bsb.setField(pos,len,value);
}
return bsb;
@@ -610,7 +593,7 @@ std::ostream & operator<<(std::ostream & out,
{
uint32_t len = bit_string.getBitLen() - pos;
len = std::min(len,bit_field_length);
- CPU_WORD value = bit_string.GetField(pos,len);
+ CPU_WORD value = bit_string.getField(pos,len);
out << std::setw(bit_field_length/4) << std::setfill('0') << value << " ";
}
diff --git a/src/usr/diag/prdf/common/util/prdfBitString.H b/src/usr/diag/prdf/common/util/prdfBitString.H
index a54477fff..70f04875f 100755
--- a/src/usr/diag/prdf/common/util/prdfBitString.H
+++ b/src/usr/diag/prdf/common/util/prdfBitString.H
@@ -138,6 +138,64 @@ class BitString
return (i_bitLen + i_offset + CPU_WORD_BIT_LEN-1) / CPU_WORD_BIT_LEN;
}
+ /**
+ * @brief Returns a left-justified value of the given length from the bit
+ * string starting at the given position.
+ * @param i_pos The starting position of the target range.
+ * @param i_len The number of bits of the target range.
+ * @return The value of the field range specified (left-justified).
+ * @pre nullptr != getBufAddr()
+ * @pre 0 < i_len
+ * @pre i_len <= CPU_WORD_BIT_LEN
+ * @pre i_pos + i_len <= getBitLen()
+ */
+ CPU_WORD getField( uint32_t i_pos, uint32_t i_len ) const;
+
+ /**
+ * @brief Returns a right-justified value of the given length from the bit
+ * string starting at the given position.
+ * @param i_pos The starting position of the target range.
+ * @param i_len The number of bits of the target range.
+ * @return The value of the field range specified (right-justified).
+ * @pre nullptr != getBufAddr()
+ * @pre 0 < i_len
+ * @pre i_len <= CPU_WORD_BIT_LEN
+ * @pre i_pos + i_len <= getBitLen()
+ */
+ CPU_WORD getFieldJustify( uint32_t i_pos, uint32_t i_len ) const
+ {
+ return getField(i_pos, i_len) >> (CPU_WORD_BIT_LEN - i_len);
+ }
+
+ /**
+ * @brief Sets a left-justified value of the given length into the bit
+ * string starting at the given position.
+ * @param i_pos The starting position of the target range.
+ * @param i_len The number of bits of the target range.
+ * @param i_val The left-justified value to set.
+ * @pre nullptr != getBufAddr()
+ * @pre 0 < i_len
+ * @pre i_len <= CPU_WORD_BIT_LEN
+ * @pre i_pos + i_len <= getBitLen()
+ */
+ void setField( uint32_t i_pos, uint32_t i_len, CPU_WORD i_val );
+
+ /**
+ * @brief Sets a right-justified value of the given length into the bit
+ * string starting at the given position.
+ * @param i_pos The starting position of the target range.
+ * @param i_len The number of bits of the target range.
+ * @param i_val The right-justified value to set.
+ * @pre nullptr != getBufAddr()
+ * @pre 0 < i_len
+ * @pre i_len <= CPU_WORD_BIT_LEN
+ * @pre i_pos + i_len <= getBitLen()
+ */
+ void setFieldJustify( uint32_t i_pos, uint32_t i_len, CPU_WORD i_val )
+ {
+ setField( i_pos, i_len, i_val << (CPU_WORD_BIT_LEN - i_len) );
+ }
+
/** @brief Sets the entire bit string to 1's. */
void setAll() { setPattern(CPU_WORD_MASK); }
@@ -263,55 +321,6 @@ class BitString
uint32_t GetSetCount(uint32_t bit_position, uint32_t leng) const;
/*!
- Get a copy of a subfield within the bitstring
- \param starting bit position
- \param # of bits in the field
- \return Returned value is left justified (See GetFieldJustified)
- \pre (bit_position + length) <= getBitLen(); length <= CPU_WORD_BIT_LEN
- \post none
- */
- CPU_WORD GetField(uint32_t bit_position,uint32_t length) const;
-
- /*!
- Get a copy of a subfield within the bitstring
- \param starting bit position
- \param # of bits in the field
- \return Returned value is right justified (See GetField)
- \pre (bit_position + length) <= getBitLen(); length <= CPU_WORD_BIT_LEN
- \post none
- */
- CPU_WORD GetFieldJustify(uint32_t bit_position,uint32_t length) const;
-
- /*!
- Set value into a subfield within the bitstring
- \param starting bit position
- \param # of bits in the field
- \pre (bit_position + length) <= getBitLen(); length <= CPU_WORD_BIT_LEN
- \post The bits are set from value (value assumed left justified)
- \verbatim
- this -> '00100110011....'b
- SetField(3,5,0xf8000000)
- result -> '00111111011....'b
- \endverbatim
- */
- void SetField(uint32_t bit_position,uint32_t length,CPU_WORD value);
-
-
- /*!
- Set value into a subfield within the bitstring
- \param starting bit position
- \param # of bits in the field
- \pre (bit_position + length) <= getBitLen(); length <= CPU_WORD_BIT_LEN
- \post The bits are set from value (value assumed right justified)
- \verbatim
- this -> '00100110011....'b
- SetField(3,5,0x0000001f)
- result -> '00111111011....'b
- \endverbatim
- */
- void SetFieldJustify(uint32_t bit_position,uint32_t length,CPU_WORD value);
-
- /*!
Query if bit is set (1)
\returns [true|false]
\param iPos: bit position to test
@@ -346,24 +355,6 @@ class BitString
bool IsZero(void) const;
/*!
- Utility to Right justify a "Left-justified" value
- \param iLen: length of bit field to justify
- \param iValue: the value to justify
- \pre iLen <= CPU_WORD_BIT_LEN
- */
- static CPU_WORD RIGHT_SHIFT(uint32_t iLen,
- CPU_WORD iValue);
-
- /*!
- Utility to Left justify a "right-justified" value
- \param iLen: length of bit field to justify
- \param iValue: the value to justify
- \pre iLen <= CPU_WORD_BIT_LEN
- */
- static CPU_WORD LEFT_SHIFT(uint32_t l,
- CPU_WORD value);
-
- /*!
bitwise NOT
\returns a bit-wise inverted copy of the specified bit string
*/
@@ -559,67 +550,6 @@ std::ostream & operator<<( std::ostream & out,
#endif
-/*--------------------------------------------------------------------*/
-/* Inline Member Function Definitions */
-/*--------------------------------------------------------------------*/
-
-// Function Specification ///////////////////////////////////////////
-//
-// Title: RIGHT_SHIFT
-//
-// Purpose: This function shifts the bit field right so that the
-// specified number of bits are contained in the right most
-// bits in the value. The resulting value is right
-// justified.
-//
-// Side-effects: None.
-//
-// Dependencies: Parameter length(l) must be less than
-// CPU_WORD_SIZE for proper results.
-//
-// End Function Specification //////////////////////////////////////
-
-inline
-CPU_WORD BitString::RIGHT_SHIFT
-(
- uint32_t l,
- /*!i Length of bit field */
- CPU_WORD value
- /*!i Bit field value to shift */
- )
-/*!o Bit field value */
-{
- // assert(l <= CPU_WORD_BIT_LEN);
-
- return(value >> (CPU_WORD_BIT_LEN - l));
-}
-
-// Function Specification ///////////////////////////////////////////
-//
-// Title: LEFT_SHIFT
-//
-// Purpose: This function shifts the bit field left so that the
-// specified number of bits are contained in the left most
-// bits in the value. The resulting value is left
-// justified.
-//
-// Side-effects: None.
-//
-// Dependencies: Parameter length(l) must be less than
-// CPU_WORD_SIZE for proper results.
-//
-// End Function Specification //////////////////////////////////////
-
-inline
-CPU_WORD BitString::LEFT_SHIFT
-(
- uint32_t l,
- CPU_WORD value
- )
-{
- return(value << (CPU_WORD_BIT_LEN - l));
-}
-
inline
BitString & BitString::operator=
(
diff --git a/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C b/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C
index c68cf18d4..2322d4bf6 100755
--- a/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C
+++ b/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -50,15 +50,15 @@ errlHndl_t FileScomAccessor::Access(
{
case MopRegisterAccess::WRITE:
// TODO: RTC 62076 move BitString class to 64-bit
- data = (((uint64_t)bs.GetFieldJustify( 0, 32)) << 32) |
- ((uint64_t)bs.GetFieldJustify(32, 32));
+ data = (((uint64_t)bs.getFieldJustify( 0, 32)) << 32) |
+ ((uint64_t)bs.getFieldJustify(32, 32));
firData.putScom( i_target, registerId, data);
break;
case MopRegisterAccess::READ:
firData.getScom( i_target, registerId, data);
// TODO: RTC 62076 move BitString class to 64-bit
- bs.SetFieldJustify( 0, 32, data >> 32);
- bs.SetFieldJustify(32, 32, data );
+ bs.setFieldJustify( 0, 32, data >> 32);
+ bs.setFieldJustify(32, 32, data );
break;
default:
PRDF_ERR(PRDF_FUNC "Wrong Operation:%u", operation);
diff --git a/src/usr/diag/prdf/test/prdfsimScrDB.C b/src/usr/diag/prdf/test/prdfsimScrDB.C
index 0040b0874..294c17ad9 100755
--- a/src/usr/diag/prdf/test/prdfsimScrDB.C
+++ b/src/usr/diag/prdf/test/prdfsimScrDB.C
@@ -124,7 +124,7 @@ namespace PRDF
{
for(unsigned int i = 0; i < data.size(); ++i)
{
- bs.SetFieldJustify((i*32), 32, data[i]);
+ bs.setFieldJustify((i*32), 32, data[i]);
}
PRDF_TRAC( "ScrDB::Read() huid: %X, addr: %016X, data: %08X %08X",
getHuid(i_ptargetHandle), registerId, data[0],
@@ -140,7 +140,7 @@ namespace PRDF
{
PRDF_TRAC( "ScrDB::Write() huid: %X, addr: %016X, data: %08X %08X",
getHuid(i_ptargetHandle), registerId,
- bs.GetFieldJustify(0,32), bs.GetFieldJustify(32,32) );
+ bs.getFieldJustify(0,32), bs.getFieldJustify(32,32) );
unsigned int dataWordSize = bs.getBitLen()/32;
// PRDF_TRAC("dataWordSize1: %d", dataWordSize);
@@ -149,8 +149,8 @@ namespace PRDF
DataList data;
// parse all data given
- data.push_back(bs.GetFieldJustify(0,32));
- data.push_back(bs.GetFieldJustify(32,32));
+ data.push_back(bs.getFieldJustify(0,32));
+ data.push_back(bs.getFieldJustify(32,32));
// PRDF_TRAC("parse all data given");
// look for expected data
DataList expectedData;
@@ -206,13 +206,13 @@ namespace PRDF
{
PRDF_TRAC( "ScrDB::Expect() huid: %X, addr: %016X, data: %08X %08X",
getHuid(i_ptargetHandle), registerId,
- bs.GetFieldJustify(0,32), bs.GetFieldJustify(32,32) );
+ bs.getFieldJustify(0,32), bs.getFieldJustify(32,32) );
SimScrDataSet eValues;
DataList data;
// parse all data given
- data.push_back(bs.GetFieldJustify(0,32));
- data.push_back(bs.GetFieldJustify(32,32));
+ data.push_back(bs.getFieldJustify(0,32));
+ data.push_back(bs.getFieldJustify(32,32));
eValues.AddData(data);
diff --git a/src/usr/diag/prdf/test/prdfsimServices.C b/src/usr/diag/prdf/test/prdfsimServices.C
index 84d015a15..f1cd908f0 100755
--- a/src/usr/diag/prdf/test/prdfsimServices.C
+++ b/src/usr/diag/prdf/test/prdfsimServices.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -181,8 +181,8 @@ namespace PRDF
TARGETING::Target* l_ptargetHandle = string2Target(i_epath);
CPU_WORD l_cpuWord[(64)/(sizeof(CPU_WORD)*8)] = {0};
BIT_STRING_CLASS l_bs(64, l_cpuWord);
- l_bs.SetFieldJustify(0, 32, (i_data >> 32) & 0xFFFFFFFF);
- l_bs.SetFieldJustify(32, 32, (i_data & 0xFFFFFFFF));
+ l_bs.setFieldJustify(0, 32, (i_data >> 32) & 0xFFFFFFFF);
+ l_bs.setFieldJustify(32, 32, (i_data & 0xFFFFFFFF));
iv_ScrDB->processCmd(l_ptargetHandle,
l_bs,
@@ -197,8 +197,8 @@ namespace PRDF
TARGETING::Target* l_ptargetHandle = string2Target(i_epath);
CPU_WORD l_cpuWord[(64)/(sizeof(CPU_WORD)*8)] = {0};
BIT_STRING_CLASS l_bs(64, l_cpuWord);
- l_bs.SetFieldJustify(0, 32, (i_data >> 32) & 0xFFFFFFFF);
- l_bs.SetFieldJustify(32, 32, (i_data & 0xFFFFFFFF));
+ l_bs.setFieldJustify(0, 32, (i_data >> 32) & 0xFFFFFFFF);
+ l_bs.setFieldJustify(32, 32, (i_data & 0xFFFFFFFF));
iv_ScrDB->processCmd(l_ptargetHandle,
l_bs,
OpenPOWER on IntegriCloud