LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    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 Oct 21 10:29:35 CEST 2005
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/05/10 21:10:29

    Modified: jop/java/tools/src/com/jopdesign/tools JopSim.java
    Log:
    Ignore negative memory read/write for the new Wischbone devices


    Revision Changes Path
    1.13 jop/java/tools/src/com/jopdesign/tools/JopSim.java

    http://www.opencores.org/cvsweb.shtml/jop/java/tools/src/com/jopdesign/tools/JopSim.java.diff?r1=1.12&r2=1.13

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

    Index: JopSim.java
    ===================================================================
    RCS file: /cvsroot/martin/jop/java/tools/src/com/jopdesign/tools/JopSim.java,v
    retrieving revision 1.12
    retrieving revision 1.13
    diff -u -b -r1.12 -r1.13
    --- JopSim.java 16 Aug 2005 12:39:53 -0000 1.12
    +++ JopSim.java 21 Oct 2005 08:29:34 -0000 1.13
    @@ -20,6 +20,8 @@
    static final int MAX_MEM = 1024*1024/4;
    static final int MAX_STACK = 256; // with internal memory

    + static final int MIN_WB_ADDRESS = -128;
    +
    static final int SYS_INT = 0xf0;

    int[] mem_load = new int[MAX_MEM];
    @@ -186,10 +188,13 @@
    rdMemCnt++;
    ioCnt += 12;

    - if (addr>MAX_MEM || addr<0) {
    + if (addr>MAX_MEM || addr<MIN_WB_ADDRESS) {
    System.out.println("readMem: wrong address: "+addr);
    System.exit(-1);
    }
    + if (addr<0) {
    + return 0; // no Simulation of the Wishbone devices
    + }

    return mem[addr];
    }
    @@ -198,11 +203,14 @@
    wrMemCnt++;
    ioCnt += 12;

    - if (addr>MAX_MEM || addr<0) {
    + if (addr>MAX_MEM || addr<MIN_WB_ADDRESS) {
    System.out.println("writeMem: wrong address: "+addr);
    System.exit(-1);
    }

    + if (addr<0) {
    + return; // no Simulation of the Wishbone devices
    + }
    mem[addr] = data;
    }




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