summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2
diff options
context:
space:
mode:
authorAndre Marin <aamarin@us.ibm.com>2016-03-02 12:52:07 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-04-22 16:10:17 -0400
commitd08b01ec1695d8bda1f60c50e90c6e91b404f243 (patch)
tree5a1cd0d49a1e05ce852a78e99be9c9804ad98867 /src/import/hwpf/fapi2
parent103d45221ad30e960c3314cd246b4fc81d7f6dc7 (diff)
downloadblackbird-hostboot-d08b01ec1695d8bda1f60c50e90c6e91b404f243.tar.gz
blackbird-hostboot-d08b01ec1695d8bda1f60c50e90c6e91b404f243.zip
Modify freq & dep. files. Add cas latency & unit tests
Change-Id: I205bf48e54fb3c8f19f973f58f8ec1d4c7345a23 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22632 Tested-by: PPE CI Tested-by: Jenkins Server Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Tested-by: Hostboot CI Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22634 Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2')
-rw-r--r--src/import/hwpf/fapi2/include/buffer.H18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/import/hwpf/fapi2/include/buffer.H b/src/import/hwpf/fapi2/include/buffer.H
index 2e49a0f68..2b916cc98 100644
--- a/src/import/hwpf/fapi2/include/buffer.H
+++ b/src/import/hwpf/fapi2/include/buffer.H
@@ -7,7 +7,7 @@
/* */
/* EKB Project */
/* */
-/* COPYRIGHT 2012,2015 */
+/* COPYRIGHT 2012,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -297,6 +297,7 @@ class buffer
/// @tparam B Bit in buffer to get.
/// @tparam C the count of bits to get, defaults to 1
/// @return true if *any* bit is on, false if *every* bit is off
+ /// @note 0 is left-most
///
template< bits_type B, bits_type C = 1>
inline bool getBit(void) const
@@ -305,6 +306,21 @@ class buffer
}
///
+ /// @brief Get the value of a bit in the buffer
+ /// @param[in] i_bit the bit number to set.
+ /// @param[in] i_count the count of bits to set, defaults to 1
+ /// @return true if *any* bit is on, false if *every* bit is off
+ /// @note 0 is left-most
+ ///
+ inline bool getBit(const bits_type& i_bit,
+ const bits_type& i_count = 1)
+ {
+ buffer<T> l_temp;
+ l_temp.setBit(i_bit, i_count);
+ return l_temp & iv_data;
+ }
+
+ ///
/// @brief Set and entire buffer to X's
/// @tparam X {0,1} depending if you want to clear (0)
/// or fill (1) a buffer
OpenPOWER on IntegriCloud