X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fynorsim.c;fp=direct%2Fynorsim.c;h=3281a2f374c3b78f05ec82572d974d4f2956e246;hp=569e0ded1e9e40746de4da50ee2d551e6da2074e;hb=1d1b44f28bbce072485071b6257146eaadf96e75;hpb=f77aa1fad3df8da19d74365c44b31ec95491aed9 diff --git a/direct/ynorsim.c b/direct/ynorsim.c index 569e0de..3281a2f 100644 --- a/direct/ynorsim.c +++ b/direct/ynorsim.c @@ -21,12 +21,21 @@ //#define YNORSIM_BIT_CHANGES 15 #define YNORSIM_BIT_CHANGES 1 +#if 0 /* Simulate 32MB of flash in 256k byte blocks. * This stuff is x32. */ #define YNORSIM_BLOCK_SIZE_U32 (256*1024/4) #define YNORSIM_DEV_SIZE_U32 (32*1024 * 1024/4) +#else +/* Simulate 8MB of flash in 256k byte blocks. + * This stuff is x32. + */ + +#define YNORSIM_BLOCK_SIZE_U32 (256*1024/4) +#define YNORSIM_DEV_SIZE_U32 (8*1024 * 1024/4) +#endif static __u32 word[YNORSIM_DEV_SIZE_U32]; @@ -82,7 +91,7 @@ static void ynorsim_Ready(void) return; srand(time(NULL)); remaining_ops = 1000000000; - remaining_ops = (rand() % 10000) * 10000; + remaining_ops = (rand() % 10000) * 3000 * YNORSIM_BIT_CHANGES; ynorsim_RestoreImage(); }