summaryrefslogtreecommitdiffstats
path: root/src/occ_405/wof
diff options
context:
space:
mode:
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