OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/bootloaders/orpmon/cmds
    from Rev 246 to Rev 355
    Reverse comparison

Rev 246 → Rev 355

/dhry.c
19,7 → 19,6
#include "common.h"
#include "support.h"
 
#define DLX_FREQ 200 /* in MHz */
#define PROC_6 0
 
#define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
334,20 → 333,19
 
User_Time = End_Time - Begin_Time;
 
printf("Timer ticks (%d - %d) =\t%d\n",End_Time,Begin_Time, User_Time);
printf("Timer ticks, %d/Sec, (%d - %d) =\t%d\n",TICKS_PER_SEC,
End_Time, Begin_Time, User_Time);
 
 
 
// This is in ticks, convert to mS
User_Time = User_Time * (MS_PER_SEC / TICKS_PER_SEC);
/* microseconds */
printf ("\nNumber of Runs %i", num_runs);
printf ("\nElapsed time %i ms\n", User_Time);
printf ("\nElapsed time %d.%d%ds\n",
(User_Time/TICKS_PER_SEC),
(User_Time/(TICKS_PER_SEC/10))%10,
(User_Time/( TICKS_PER_SEC/100))%10);
 
if (User_Time < MS_PER_SEC)
if (User_Time < (5*TICKS_PER_SEC))
{
printf ("Measured time too small to obtain meaningful results\n");
printf ("Please increase number of runs\n");
357,11 → 355,15
{
printf("Processor at %d MHz\n",(IN_CLK/1000000));
 
// Microseconds = User_Time / Number_Of_Runs;
// Dhrystones_Per_Second = Number_Of_Runs * 1000 / User_Time;
Dhrystones_Per_Second = (Number_Of_Runs * MS_PER_SEC) / User_Time;
 
// User_Time is ticks in resolution TICKS_PER_SEC, so to convert to uS
Microseconds = (User_Time * (1000000/TICKS_PER_SEC));
Dhrystones_Per_Second = Number_Of_Runs / (User_Time/TICKS_PER_SEC);
 
printf ("Microseconds for one run through Dhrystone: ");
printf ("%d ms / %d runs\n", User_Time,Number_Of_Runs);
printf ("( %d uS / %dk ) = %d uS\n", Microseconds,(Number_Of_Runs/1000),
Microseconds / Number_Of_Runs);
printf ("Dhrystones per Second: ");
printf ("%d \n", Dhrystones_Per_Second);
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.