*/
//#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 __u32 word[YNORSIM_DEV_SIZE_U32];
extern int random_seed;
+extern int simulate_power_failure;
static void NorError(void)
{
remaining_ops--;
- if(remaining_ops < 1){
+ if(simulate_power_failure &&
+ remaining_ops < 1){
printf("Simulated power failure after %d operations\n",nops_so_far);
ynorsim_PowerFail();
}
return;
srand(random_seed);
remaining_ops = 1000000000;
- remaining_ops = (rand() % 10000) * 3000 * YNORSIM_BIT_CHANGES;
+ remaining_ops = (rand() % 10000) * 4000 * YNORSIM_BIT_CHANGES;
ynorsim_RestoreImage();
}