LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Sat Sep 23 05:16:30 CEST 2006
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/06/09 23:05:16

    Modified: jop/java/target/src/test/wcet Loop.java
    Log:
    no message


    Revision Changes Path
    1.4 jop/java/target/src/test/wcet/Loop.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/test/wcet/Loop.java.diff?r1=1.3&r2=1.4

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: Loop.java
    ===================================================================
    RCS file: /cvsroot/martin/jop/java/target/src/test/wcet/Loop.java,v
    retrieving revision 1.3
    retrieving revision 1.4
    diff -u -b -r1.3 -r1.4
    --- Loop.java 17 Jun 2006 15:38:40 -0000 1.3
    +++ Loop.java 23 Sep 2006 03:16:29 -0000 1.4
    @@ -8,33 +8,42 @@
    * @param args
    */
    public static void main(String[] args) {
    - loop(false, 123);
    + measure(true, 123);
    }

    - public static int loop(boolean b, int val) {
    + public static int measure(boolean b, int val) {
    +
    + // measured: 2009
    + // wcet: 2033
    + // difference is 24 cycles:
    + // iload_1 1
    + // ireturn 23

    int i, j;
    +
    // int ts, te, to;
    // ts = Native.rdMem(Const.IO_CNT);
    // te = Native.rdMem(Const.IO_CNT);
    // to = te-ts;
    -// System.out.println(to);
    // ts = Native.rdMem(Const.IO_CNT);
    +
    +
    for (i=0; i<10; ++i) { //@WCA loop=10
    if (b) {
    for (j=0; j<3; ++j) { //@WCA loop=3
    val *= val;
    }
    -// return val;
    } else {
    for (j=0; j<7; ++j) { //@WCA loop=7
    val += val;
    -// return val;
    }
    }
    }
    +
    +
    // te = Native.rdMem(Const.IO_CNT);
    // System.out.println(te-ts-to);
    +
    return val;
    }
    }



     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.