diff options
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C | 31 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H | 9 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C index 4ad610e13..89e584c62 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C @@ -507,6 +507,37 @@ fapi_try_exit: } /// +/// @brief Get a list of ports involved in the program +/// Specialization for program<fapi2::TARGET_TYPE_MCBIST> +/// @param[in] i_target the target for this program +/// @return vector of port targets +/// +template<> +template<> +std::vector<fapi2::Target<fapi2::TARGET_TYPE_MCA>> + program<fapi2::TARGET_TYPE_MCBIST>::get_port_list<fapi2::TARGET_TYPE_MCA>( const + fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target ) +{ + typedef mss::mcbistTraits<TARGET_TYPE_MCBIST> TT; + + std::vector<fapi2::Target<fapi2::TARGET_TYPE_MCA>> l_list; + + fapi2::buffer<uint64_t> l_ports_selected; + // extract port sel to left of l_ports_selected so port relatve pos maps to bit number + iv_control.extract<TT::PORT_SEL, TT::PORT_SEL_LEN>(l_ports_selected); + + for (const auto& p : find_targets<fapi2::TARGET_TYPE_MCA>(i_target)) + { + if (l_ports_selected.getBit(mss::relative_pos<fapi2::TARGET_TYPE_MCBIST>(p))) + { + l_list.push_back(p); + } + } + + return l_list; +} + +/// /// @brief Read entries from MCBIST Read Modify Write (RMW) array /// Specialization for fapi2::TARGET_TYPE_MCA /// @param[in] i_target the target to effect diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H index 12258b142..63ef799a8 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H @@ -1766,6 +1766,15 @@ class program } /// + /// @brief Get a list of ports involved in the program + /// @tparam P fapi2 target type of port + /// @param[in] i_target the target for this program + /// @return vector of port targets + /// + template< fapi2::TargetType P > + std::vector<fapi2::Target<P>> get_port_list( const fapi2::Target<T>& i_target ); + + /// /// @brief Change MCBIST Stop-on-error conditions (end boundaries) /// @param[in] i_end the end boundary /// @note By default the MCBIST is programmed to always stop after an errored address. This API |