This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPLD1202-Q1: Interconnect studio waveform sim problems with Delay elements

Part Number: TPLD1202-Q1
Other Parts Discussed in Thread: TPLD1202

Tool/software:

I'm trying to configure the PLD to take a 150kHz PWM signal and provide a 300kHz sync output and two time delayed (2.2uS and 4.4uS) PWM signals. The very first PWM cycle produced two time delayed PWM signals, but the next cycle resulted in a runt pulse and a missing pulse. The 300kHz sync pulse looks good. The clock is at 25MHz. I tried clocking at 10kHz and the delays didn't work at all.

here is the circuit:

Here is the sim file, I think (hidden ?):

  • Hi Christopher,

    It doesn't look like the ICS file went through. Could you send it again? It's hard to build this correctly without the exact specs used for the delay elements and counter.

    Could you also send me the simulation view with a few more periods worth of the input? I want to see if this problem repeats.

    Best,

    Ian

  • /**
    * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
    * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
    * @cliArgs --device "TPLD1202_DYY_TL" --part "Default" --package "DYY (SOT-23-THN, 14)" --product "TPLD@1.3.1+869"
    * @v2CliArgs --device "TPLD1202" --package "DYY (SOT-23-THN, 14)" --product "TPLD@1.3.1+869"
    * @versions {"tool":"1.22.0+3893"}
    */

    /**
    * Import the modules used in this configuration.
    */
    const CNT = scripting.addModule("/ti/tpld/CNT", {}, false);
    const CNT1 = CNT.addInstance();
    const DLY = scripting.addModule("/ti/tpld/DLY", {}, false);
    const DLY1 = DLY.addInstance();
    const DLY2 = DLY.addInstance();
    const OSC = scripting.addModule("/ti/tpld/OSC", {}, false);
    const OSC1 = OSC.addInstance();
    const PIN = scripting.addModule("/ti/tpld/PIN", {}, false);
    const PIN1 = PIN.addInstance();
    const PIN2 = PIN.addInstance();
    const PIN3 = PIN.addInstance();
    const PIN4 = PIN.addInstance();
    const PIN5 = PIN.addInstance();
    const Simulation = scripting.addModule("/ti/tpld/Simulation");

    /**
    * Write custom configuration values to the imported modules.
    */
    CNT1.$name = "cnt0";
    CNT1.clk_sel2 = "ext";
    CNT1.data = 27;
    CNT1.hw.$assign = "CNT_FSM_0";

    DLY1.$name = "dly0";
    DLY1.clk_sel2 = "ext";
    DLY1.cnt_init = 1;
    DLY1.mode_sync = 1;
    DLY1.data = 25;

    DLY2.$name = "dly1";
    DLY2.clk_sel2 = "ext";
    DLY2.cnt_init = 1;
    DLY2.mode_sync = 1;
    DLY2.data = 25;

    OSC1.$name = "osc0";
    OSC1.cntl_in = 1;
    OSC1.src_ext = 1;
    OSC1.out1_sel = 2;
    OSC1.force_pwron = 1;

    PIN1.$name = "pin1";
    PIN1.sim = "square";
    OSC1.extclk = PIN1;
    PIN1.hw.$assign = "IO8";
    PIN1.square.$name = "ti_tpld_simulationOptions_SQUARE0";
    PIN1.square.period = { val: 40, units: "ns" };
    PIN1.square.duty = 40;

    PIN2.type = "DOUT";
    PIN2.$name = "Counter/28";
    PIN2.$topLabel = "Counter/28";

    PIN3.$name = "PWM_in";
    PIN3.sim = "square";
    PIN3.$topLabel = "PWM_in";
    PIN3.square.$name = "ti_tpld_simulationOptions_SQUARE1";
    PIN3.square.period = { val: 6.7, units: "us" };
    PIN3.square.duty = 40;

    PIN4.type = "DOUT";
    PIN4.$name = "PWM_dly1";
    PIN4.$topLabel = "PWM_dly1";

    PIN5.type = "DOUT";
    PIN5.$name = "PWM_dly2";
    PIN5.$topLabel = "PWM_dly2";

    const SYSTEM = scripting.addModule("/ti/tpld/SYSTEM", {}, false);

    Simulation.tstop = { val: 20, units: "us" };
    Simulation.tstep = { val: 10, units: "ns" };

    /**
    * Connections between modules
    */
    scripting.connect(CNT1, "OUT", PIN2, "IN");
    scripting.connect(DLY1, "OUT", PIN4, "IN");
    scripting.connect(DLY1, "OUT", DLY2, "IN");
    scripting.connect(DLY2, "OUT", PIN5, "IN");
    scripting.connect(OSC1, "OUT0", DLY1, "CLK");
    scripting.connect(OSC1, "OUT0", DLY2, "CLK");
    scripting.connect(OSC1, "OUT1", CNT1, "CLK");
    scripting.connect(PIN3, "OUT", DLY1, "IN");

    /**
    * (x,y) coordinates for modules that are displayed in a graph
    */
    CNT1.$position = [65,15];
    DLY1.$position = [-45,-165];
    DLY2.$position = [65,-75];
    OSC1.$position = [-180,15];
    PIN1.$position = [-350,40];
    PIN2.$position = [245,30];
    PIN3.$position = [-350,-160];
    PIN4.$position = [245,-150];
    PIN5.$position = [245,-60];

    /**
    * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
    * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
    * re-solve from scratch.
    */
    DLY1.hw.$suggestSolution = "CNT_FSM_2";
    DLY2.hw.$suggestSolution = "CNT_FSM_1";
    OSC1.hw.$suggestSolution = "OSC_0";
    PIN2.hw.$suggestSolution = "IO3";
    PIN3.hw.$suggestSolution = "IN0";
    PIN4.hw.$suggestSolution = "IO2";
    PIN5.hw.$suggestSolution = "IO1";
    SYSTEM.hw.$suggestSolution = "SYSTEM";

  • 40uS sim. looks like it repeats.

  • Hi Christopher,

    Looks like this is an issue with the external clock simulation at this high speed. Changing the input pulse with to 7 us fixed it, as well as using the internal 25 MHz clock. I've reported this as a simulation bug.

    Best,

    Ian

  • Thanks Ian.  Switching to the internal 25MHz clock made the delays behave.