Added DDR5 DDIMM capacity calculation

Added the calculation for the capacity of a ddr5 ddimm

Change-Id: Ia20c2828db8ee695747ca90f62b2a2458ccd5394
Signed-off-by: jinuthomas <jinu.joy.thomas@in.ibm.com>
diff --git a/vpd-parser/memory_vpd_parser.hpp b/vpd-parser/memory_vpd_parser.hpp
index 21a45b9..36e84e2 100644
--- a/vpd-parser/memory_vpd_parser.hpp
+++ b/vpd-parser/memory_vpd_parser.hpp
@@ -57,12 +57,56 @@
     kwdVpdMap readKeywords(Binary::const_iterator iterator);
 
     /**
-     * @brief This function calculates dimm size from DIMM VPD
+     * @brief This function calculates dimm size from DDIMM VPD
      *
      * @param[in] iterator - iterator to buffer containing VPD
      * @return calculated data or 0 in case of any error.
      */
-    auto getDimmSize(Binary::const_iterator iterator);
+    size_t getDDimmSize(Binary::const_iterator iterator);
+
+    /**
+     * @brief This function calculates DDR4 based DDIMM's capacity
+     *
+     * @param[in] iterator - iterator to buffer containing VPD
+     * @return calculated data or 0 in case of any error.
+     */
+    auto getDdr4BasedDDimmSize(Binary::const_iterator iterator);
+
+    /**
+     * @brief This function calculates DDR5 based DDIMM's capacity
+     *
+     * @param[in] iterator - iterator to buffer containing VPD
+     * @return calculated data or 0 in case of any error.
+     */
+    auto getDdr5BasedDDimmSize(Binary::const_iterator iterator);
+
+    /**
+     * @brief This function calculates DDR5 based die per package
+     *
+     * @param[in] l_ByteValue - the bit value for calculation
+     * @return die per package value.
+     */
+    uint8_t getDDR5DiePerPackage(uint8_t l_ByteValue);
+
+    /**
+     * @brief This function calculates DDR5 based density per die
+     *
+     * @param[in] l_ByteValue - the bit value for calculation
+     * @return density per die.
+     */
+    uint8_t getDDR5DensityPerDie(uint8_t l_ByteValue);
+
+    /**
+     * @brief This function checks the validity of the bits
+     *
+     * @param[in] l_ByteValue - the byte value with relevant bits
+     * @param[in] shift - shifter value to selects needed bits
+     * @param[in] minValue - minimum value it can contain
+     * @param[in] maxValue - maximum value it can contain
+     * @return true if valid else false.
+     */
+    bool checkValidValue(uint8_t l_ByteValue, uint8_t shift, uint8_t minValue,
+                         uint8_t maxValue);
 
     // vdp file to be parsed
     const Binary& memVpd;