Posted: 09:56am 22 Dec 2024 |
Copy link to clipboard |
Print this post |
|
Option default integer SBK=1 TEST_BEGIN: SBW=SBK*128 SOURCE=&h5555555555555555:DEST=0 NB=((MM.Info(heap)\1024)-5)\SBK Dim integer HEAP(NB,SBW) Print "NUMBER OF MEMORY BLOKS:";NB Print "RAM MEMORY BLOCK SIZE :";SBK*1024,"byte" Print "TOTAL SIZE TESTING RAM:";NB*SBK,"Kbyte" Print "----------------------|------|-------" Timer =0 For i=0 To SBW-1 HEAP(0,i)=SOURCE Next : Print Timer;"mS","-- Time to wtite 1 Block RAM" Timer =0 For i=0 To SBW-1 For n=0 To NB-1 HEAP(n,i)=SOURCE Next : Next : Print Timer;"mS","-- All RAM Fill Time" Timer =0 For i=0 To SBW-1 DEST=HEAP(0,i) Next : Print Timer;"mS","-- Time to read 1 Block RAM" Timer =0 For i=0 To SBW-1 For n=0 To NB-1 DEST=HEAP(n,i) Next : Next : Print Timer;"mS","-- All RAM Read Time" Timer =0:n=NB-1 For i=0 To SBW-1 HEAP(0,i)=HEAP(n,i) Next : Print Timer;"mS","-- Time to Copy 1 Block RAM" Timer =0 For n=0 To NB-2 For i=0 To SBW-1 HEAP(n,i)=HEAP(n+1,i) Next : Next : Print Timer;"mS","-- All RAM Copy Time" Print Clear Input "Enter RAM BLOCK SIZE in Kbyte: ",SBK If SBK>0 Then CLS :GoTo TEST_BEGIN End |