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: Mon Apr 17 17:34:47 CEST 2006
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/06/04 17:17:34

    Modified: jop/java/target/src/app/dsp SigDel.java
    Log:
    JOP version for Jens & Mikael (micro in/out on baseio)


    Revision Changes Path
    1.2 jop/java/target/src/app/dsp/SigDel.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/app/dsp/SigDel.java.diff?r1=1.1&r2=1.2

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

    Index: SigDel.java
    ===================================================================
    RCS file: /cvsroot/martin/jop/java/target/src/app/dsp/SigDel.java,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -u -b -r1.1 -r1.2
    --- SigDel.java 19 Oct 2005 10:26:56 -0000 1.1
    +++ SigDel.java 17 Apr 2006 15:34:46 -0000 1.2
    @@ -8,61 +8,49 @@
    import com.jopdesign.sys.Native;

    /**
    - * @author admin
    + * @author Martin
    *
    */
    public class SigDel {

    // This values depend on the ADC!!!
    final static int OFFSET = 1550;
    - final static int FSAMP = 30000;
    +

    public static void main(String[] args) {

    - int i, j;
    - int left, right;
    int val;
    int min, max;
    int t1, t2;

    -
    min = 999999;
    max = 0;

    int[] samples = new int[100];

    - i = 0;
    -
    for(;;) {
    - val = Native.rdMem(Const.WB_TS0);
    + val = Native.rdMem(Const.IO_MICRO);
    if (val>0) {
    continue;
    }
    val &= 0xffff;

    - i = (i+1) & 0xffff;
    - j = i;
    - if (j>0x7fff) {
    - j = 0xffff-i;
    - }
    - left = (val*j)>>15;
    - right = (val*(0x7fff-j))>>15;
    -
    - val = left + (right<<16);
    - Native.wrMem(val, Const.WB_TS0);
    + Native.wrMem(val, Const.IO_MICRO);

    // Test if we missed the sample output
    - val = Native.rdMem(Const.WB_TS0);
    + val = Native.rdMem(Const.IO_MICRO);
    if (val<0) {
    System.out.print('*');
    + continue;
    }
    -/*
    - if (val>max) max = val;
    - if (val<min) min = val;
    - System.out.print(min);
    - System.out.print(max);
    - System.out.println(val);
    -*/
    +
    +// if (val>max) max = val;
    +// if (val<min) min = val;
    +// System.out.print(min);
    +// System.out.print(" ");
    +// System.out.print(max);
    +// System.out.print(" ");
    +// System.out.println(val);
    }

    /*



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