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: Thu Dec 20 11:46:03 CET 2007
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/07/12 20:11:46

    Modified: jop/java/target/src/test/cmp Sync.java
    Log:
    no message


    Revision Changes Path
    1.3 jop/java/target/src/test/cmp/Sync.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/test/cmp/Sync.java.diff?r1=1.2&r2=1.3

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

    Index: Sync.java
    ===================================================================
    RCS file: /cvsroot/9914pich/jop/java/target/src/test/cmp/Sync.java,v
    retrieving revision 1.2
    retrieving revision 1.3
    diff -u -b -r1.2 -r1.3
    --- Sync.java 19 Dec 2007 14:17:58 -0000 1.2
    +++ Sync.java 20 Dec 2007 10:46:03 -0000 1.3
    @@ -1,9 +1,12 @@
    /*
    - * Created on 28.02.2005
    + * Created on 20.12.2007
    + *
    + * Test der Synchronisation von mehreren CPUs.
    + * CPU1 und CPU2 schreiben auf ein shared Array.
    + * CPU0 gibt das Feld aus.
    *
    - * TODO To change the template for this generated file go to
    - * Window - Preferences - Java - Code Style - Code Templates
    */
    +
    package cmp;

    import com.jopdesign.sys.Const;
    @@ -25,27 +28,26 @@
    if (cpu_id == 0x00000000)
    {
    whoAmI = new IntegerClass();
    - whoAmI.numberArray = new int [10];
    + whoAmI.numberArray = new int [5];
    lock1 = new Object();
    Native.wrMem(0x00000001, Const.IO_SIGNAL);
    + int ausgabe = 3;

    while(true)
    {
    -
    synchronized(lock1)
    {
    - for (int i=0; i<10; i++)
    + if(whoAmI.numberArray[0] != ausgabe)
    + {
    + for (int i=0; i<5; i++)
    {
    print_02d(whoAmI.numberArray[i]);
    }
    + ausgabe = whoAmI.numberArray[0];
    + }
    }

    - for(int i = 0; i<2381; i++);
    -
    -// synchronized(lock1)
    -// {
    -// whoAmI.number = cpu_id;
    -// }
    + for(int i = 0; i<102197; i++); // 1627

    }
    }
    @@ -55,11 +57,11 @@
    {
    while(true)
    {
    - for(int i = 0; i<67; i++);
    + for(int i = 0; i<499; i++); //499

    synchronized(lock1)
    {
    - for (int i=0; i<10; i++)
    + for (int i=0; i<5; i++)
    {
    whoAmI.numberArray[i] = cpu_id;
    }
    @@ -70,11 +72,11 @@
    {
    while(true)
    {
    - for(int i = 0; i<53; i++);
    + for(int i = 0; i<317; i++); //317

    synchronized(lock1)
    {
    - for (int i=0; i<10; i++)
    + for (int i=0; i<5; i++)
    {
    whoAmI.numberArray[i] = cpu_id;
    }
    @@ -87,9 +89,9 @@ static void print_02d(int i) { - int j; - for (j=0;i>9;++j) i-= 10; - print_char(j+'0'); + //int j; + //for (j=0;i>9;++j) i-= 10; + //print_char(j+'0'); print_char(i+'0'); }

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