#include <unistd.h>
#include <time.h>
-#define YNORSIM_FNAME "ynorsimdata"
+#define YNORSIM_FNAME "emfile-nor"
/* Set YNORSIM_BIT_CHANGES to a a value from 1..30 to
*simulate bit flipping as the programming happens.
*/
//#define YNORSIM_BIT_CHANGES 15
-#define YNORSIM_BIT_CHANGES 1
+#define YNORSIM_BIT_CHANGES 2
#if 0
/* Simulate 32MB of flash in 256k byte blocks.
static int remaining_ops;
static int nops_so_far;
+int ops_multiplier = 500;
+
static void ynorsim_MaybePowerFail(void)
{
return;
srand(random_seed);
remaining_ops = 1000000000;
- remaining_ops = (rand() % 10000) * 300 * YNORSIM_BIT_CHANGES;
+ remaining_ops = (rand() % 10000) * ops_multiplier * YNORSIM_BIT_CHANGES;
ynorsim_RestoreImage();
}