summaryrefslogtreecommitdiffstats
path: root/src/occ_405/wof
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2017-01-10 07:35:12 -0600
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-02-01 11:19:59 -0500
commit4d6a99902a2a377a12dbef720fea81873fb920cc (patch)
treec6fbf8303c5775bb423b8405cfe37a0566df5a43 /src/occ_405/wof
parent009f439d2aa9df1944eb08b7f1fc30006abd8137 (diff)
downloadtalos-occ-4d6a99902a2a377a12dbef720fea81873fb920cc.tar.gz
talos-occ-4d6a99902a2a377a12dbef720fea81873fb920cc.zip
WOF: Function to calculate the Active Quad step number
Change-Id: I3acafe872623838fa2ad16e8c85288dddb275fb5 RTC: 130216 Depends-on: I2249777134608d9f79bdc85692a3acbf7907c3f5 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34657 Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Tested-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405/wof')
-rw-r--r--src/occ_405/wof/wof.c19
-rw-r--r--src/occ_405/wof/wof.h13
2 files changed, 27 insertions, 5 deletions
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index f222359..bad31b6 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -88,7 +88,7 @@ void wof_main(void)
/**
- * calculate_step
+ * calculate_step_from_start
*
* Description: Calculates the step number for the current VDN/VDD
*
@@ -135,3 +135,20 @@ uint16_t calculate_step_from_start(uint16_t i_ceff_vdx,
return l_current_step;
}
+
+
+/**
+ * calc_quad_step_from_start
+ *
+ * Description: Calculates the step number for the current number
+ * of active quads
+ *
+ * Param[in]: i_num_active_quads - The current number of active quads.
+ *
+ * Return: The calculated step for current active quads
+ */
+uint8_t calc_quad_step_from_start( uint8_t i_num_active_quads )
+{
+ return (G_wof_header.active_quads_size == ACTIVE_QUAD_SZ_MIN) ? 0 :
+ (i_num_active_quads - 1);
+}
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index 6d3948d..52a5ff0 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -31,7 +31,8 @@
// Define
//******************************************************************************
#define MIN_BCE_REQ_SIZE 256
-
+#define ACTIVE_QUAD_SZ_MIN 1
+#define ACTIVE_QUAD_SZ_MAX 6
typedef struct __attribute__ ((packed))
{
@@ -67,8 +68,12 @@ typedef struct
void wof_main( void );
uint16_t calculate_step_from_start( uint16_t i_ceff_vdx,
- uint8_t i_step_size,
- uint8_t i_min_step,
- uint8_t i_max_step );
+ uint8_t i_step_size,
+ uint8_t i_min_step,
+ uint8_t i_max_step );
+
+uint8_t calc_quad_step_from_start( uint8_t i_num_active_quads );
+
+
#endif
OpenPOWER on IntegriCloud