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: Fri Jan 25 12:46:48 CET 2008
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/08/01 25:12:46

    Modified: jop/java/tools/src/com/jopdesign/tools JavaDown.java
    Log:
    Fixed non-USB download, now also checking replies.




    Revision Changes Path
    1.7 jop/java/tools/src/com/jopdesign/tools/JavaDown.java

    http://www.opencores.org/cvsweb.shtml/jop/java/tools/src/com/jopdesign/tools/JavaDown.java.diff?r1=1.6&r2=1.7

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

    Index: JavaDown.java
    ===================================================================
    RCS file: /cvsroot/jeuneS2/jop/java/tools/src/com/jopdesign/tools/JavaDown.java,v
    retrieving revision 1.6
    retrieving revision 1.7
    diff -u -b -r1.6 -r1.7
    --- JavaDown.java 24 Jan 2008 11:21:50 -0000 1.6
    +++ JavaDown.java 25 Jan 2008 11:46:48 -0000 1.7
    @@ -99,7 +99,6 @@
    in.slashSlashComments(true);
    in.whitespaceChars(',', ',');
    byte adword[] = new byte[4];
    - int rplyCnt = 0;
    int cnt = 0;
    for (; in.nextToken() != StreamTokenizer.TT_EOF; ++cnt) {
    // in.nval contains the next 32 bit word to be sent
    @@ -112,34 +111,22 @@
    }
    for (int i = 0; i < 4; i++) {
    byte b = (byte) (l >> ((3 - i) * 8));
    - ++rplyCnt;
    outputStream.write(b);
    -
    + }
    if (!usb) {
    - if (cnt == i) {
    - // TODO check reply
    - iStream.read();
    - --rplyCnt;
    - } else if (iStream.available() != 0) {
    - iStream.read();
    - --rplyCnt;
    + int r = 0;
    + for (int i = 0; i < 4; i++) {
    + r = (r << 8) | (iStream.read() & 0xff);
    }
    + if (r != l) {
    + sysoutStream.println("received word differs from sent word");
    }
    }
    -
    if ((cnt & 0x3f) == 0) {
    sysoutStream.print(prog_char[(cnt >> 6) & 0x07] + "\r");
    }
    }

    - if (!usb) {
    - while (rplyCnt > 0) {
    - sysoutStream.print(rplyCnt+" ");
    - sysoutStream.println((char)iStream.read());
    - --rplyCnt;
    - }
    - }
    -
    sysoutStream.println(cnt + " words external RAM (" + (cnt / 256)
    + " KB)");
    sysoutStream.println("download complete");



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