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: Wed Oct 19 12:26:56 CEST 2005
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/05/10 19:12:26

    Added: jop/java/target/src/app/dsp SigDel.java
    Log:
    no message


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

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/app/dsp/SigDel.java?rev=1.1&content-type=text/x-cvsweb-markup

    Index: SigDel.java
    ===================================================================
    /*
    * Created on 30.05.2005
    *
    */
    package dsp;

    import com.jopdesign.sys.Const;
    import com.jopdesign.sys.Native;

    /**
    * @author admin
    *
    */
    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);
    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);

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

    /*
    t1 = Native.rd(Const.IO_CNT);
    t2 = Native.rd(Const.IO_CNT);
    System.out.print("JOP counter: ");
    System.out.println(t2-t1);
    */


    }
    }



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