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
  • 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: Wed Dec 19 15:17:58 CET 2007
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/07/12 19:15:17

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


    Revision Changes Path
    1.2 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.1&r2=1.2

    (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.1
    retrieving revision 1.2
    diff -u -b -r1.1 -r1.2
    --- Sync.java 22 Nov 2007 15:39:37 -0000 1.1
    +++ Sync.java 19 Dec 2007 14:17:58 -0000 1.2
    @@ -1,32 +1,52 @@
    -
    +/*
    + * Created on 28.02.2005
    + *
    + * 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;
    import com.jopdesign.sys.Native;
    -
    +import jbe.LowLevel;
    +import cmp.IntegerClass;

    public class Sync {

    + static Object lock1;
    + static IntegerClass whoAmI;
    +
    public static void main(String[] args) {

    int cpu_id;
    cpu_id = Native.rdMem(Const.IO_CPU_ID);
    - int whoAmI = 33;
    - Object lock1 = new Object();


    if (cpu_id == 0x00000000)
    {
    + whoAmI = new IntegerClass();
    + whoAmI.numberArray = new int [10];
    + lock1 = new Object();
    Native.wrMem(0x00000001, Const.IO_SIGNAL);

    while(true)
    {
    +
    synchronized(lock1)
    {
    - print_02d(whoAmI);
    - whoAmI = 00;
    + for (int i=0; i<10; i++)
    + {
    + print_02d(whoAmI.numberArray[i]);
    }
    - for(int i = 0; i<10000; i++);
    + }
    +
    + for(int i = 0; i<2381; i++);
    +
    +// synchronized(lock1)
    +// {
    +// whoAmI.number = cpu_id;
    +// }
    +
    }
    }
    else
    @@ -35,9 +55,14 @@
    {
    while(true)
    {
    + for(int i = 0; i<67; i++);
    +
    synchronized(lock1)
    {
    - whoAmI = 11;
    + for (int i=0; i<10; i++)
    + {
    + whoAmI.numberArray[i] = cpu_id;
    + }
    }
    }
    }
    @@ -45,9 +70,14 @@
    {
    while(true)
    {
    + for(int i = 0; i<53; i++); + synchronized(lock1) { - whoAmI = 22; + for (int i=0; i<10; i++) + { + whoAmI.numberArray[i] = cpu_id; + } } } } @@ -63,6 +93,7 @@ print_char(i+'0'); } + static void print_char(int i) { System.out.print((char) i);

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