Package ptolemy.domains.sdf.lib

Examples of ptolemy.domains.sdf.lib.FIR


        // DE System
        ptolemy.domains.de.lib.TimedDelay delay = new ptolemy.domains.de.lib.TimedDelay(
                this, "delay");
        delay.delay.setToken(new DoubleToken(0.02));

        FIR fir = new FIR(this, "fir");
        fir.taps.setExpression("{0.7, 0.3}");

        Quantizer quan = new Quantizer(this, "Quantizer");
        Average accumulator = new Average(this, "accumulator");
        Sampler sampler = new Sampler(this, "sampler");
        Clock clk = new Clock(this, "ADClock");
        clk.offsets.setExpression("{0.0}");
        clk.period.setToken(new DoubleToken(1.0));
        clk.values.setExpression("{true}");

        TimedPlotter dePlot = new TimedPlotter(this, "DEPlot");
        Plot newPlot = new Plot();
        dePlot.plot = newPlot;
        newPlot.setGrid(true);
        newPlot.setXRange(0.0, stopT);
        newPlot.setYRange(-1.0, 1.0);
        newPlot.setSize(500, 180);
        newPlot.setConnected(false);
        newPlot.setImpulses(true);
        newPlot.setMarksStyle("dots");
        newPlot.addLegend(0, "Accum");
        newPlot.addLegend(1, "Quantize");

        FIR mav = new FIR(this, "MAV");
        mav.taps.setExpression("{0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, "
                + "0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05}");

        // DE connections.
        connect(subout, delay.input);
View Full Code Here

TOP

Related Classes of ptolemy.domains.sdf.lib.FIR

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.