diff options
| author | Andre Marin <aamarin@us.ibm.com> | 2016-03-02 12:52:07 -0600 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 16:00:38 -0500 |
| commit | 9f784676063b529d7db8fc9c83306a4ceb345572 (patch) | |
| tree | 6deca9c7c41eac4e45326733bc31751f22d37898 /import/hwpf/fapi2/include | |
| parent | ae304b1f09472da81246169dd47a57738d1fd84c (diff) | |
| download | talos-hcode-9f784676063b529d7db8fc9c83306a4ceb345572.tar.gz talos-hcode-9f784676063b529d7db8fc9c83306a4ceb345572.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>
Diffstat (limited to 'import/hwpf/fapi2/include')
| -rw-r--r-- | import/hwpf/fapi2/include/buffer.H | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/import/hwpf/fapi2/include/buffer.H b/import/hwpf/fapi2/include/buffer.H index 625de347..d3fa45ab 100644 --- a/import/hwpf/fapi2/include/buffer.H +++ b/import/hwpf/fapi2/include/buffer.H @@ -303,6 +303,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 @@ -311,6 +312,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 |

