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.

TPLD1201: TPLD1201DGSR

Part Number: TPLD1201

Tool/software:

I am trying to replicate the first example, just the two analog comparator but only the first seems to work as expected.

If I use the original example it works perfectly. If I start from empty it does not work.

here is the saved file content from demo that works fine followed by the abnormal one:

/**
* 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 "TPLD1201_DGS_TL" --part "Default" --package "DGS (VSSOP, 10)" --product "TPLD@1.3.1+869"
* @v2CliArgs --device "TPLD1201" --package "DGS (VSSOP, 10)" --product "TPLD@1.3.1+869"
* @versions {"tool":"1.22.0+3893"}
*/

/**
* Import the modules used in this configuration.
*/
const ACMP = scripting.addModule("/ti/tpld/ACMP", {}, false);
const ACMP1 = ACMP.addInstance();
const ACMP2 = ACMP.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");
const VCC = scripting.addModule("/ti/tpld/VCC", {}, false);
const VCC1 = VCC.addInstance();

/**
* Write custom configuration values to the imported modules.
*/
ACMP1.$name = "acmp0";
ACMP1.vref_sel = 26;
ACMP1.hw.$assign = "ACMP0";

ACMP2.$name = "acmp1";
ACMP2.vref_sel = 26;
ACMP2.inp_sel = 2;

PIN1.$name = "IO6";
PIN1.type = "DOUT";
PIN1.$topLabel = "LED 6\nOn if the voltage \nR1 > R2\nTop pot > middle pot\n";
PIN1.hw.$assign = "IO6";

PIN2.$name = "IO7";
PIN2.type = "DOUT";
PIN2.$topLabel = "LED 7\nOn if the voltage \nR4 > R2\nBottom pot > middle pot\n";
PIN2.hw.$assign = "IO7";

ACMP1.inp = PIN3;
PIN3.$name = "ACMP0_IN";
PIN3.sim = "sine";
PIN3.$topLabel = "R1";
PIN3.hw.$assign = "IO1";
PIN3.sine.$name = "ti_tpld_simulationOptions_SINE0";
PIN3.sine.amplitude = { val: 1.65, units: "V" };

ACMP1.inm = PIN4;
ACMP2.inm = PIN4;
PIN4.$name = "ACMPx_IN";
PIN4.sim = "sine";
PIN4.$topLabel = "R2";
PIN4.hw.$assign = "IO2";
PIN4.sine.$name = "ti_tpld_simulationOptions_SINE1";
PIN4.sine.amplitude = { val: 1.65, units: "V" };
PIN4.sine.phase = 90;

ACMP2.inp = PIN5;
PIN5.$name = "ACMP1_IN";
PIN5.sim = "sine";
PIN5.$topLabel = "R4";
PIN5.hw.$assign = "IO4";
PIN5.sine.$name = "ti_tpld_simulationOptions_SINE2";
PIN5.sine.amplitude = { val: 1.65, units: "V" };
PIN5.sine.phase = 180;

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

Simulation.tstep = { val: 1, units: "us" };

VCC1.$name = "VCC0";

/**
* Connections between modules
*/
scripting.connect(ACMP1, "OUT", PIN1, "IN");
scripting.connect(ACMP2, "OUT", PIN2, "IN");
scripting.connect(VCC1, "OUT", ACMP1, "PUP");
scripting.connect(VCC1, "OUT", ACMP2, "PUP");

/**
* (x,y) coordinates for modules that are displayed in a graph
*/
ACMP1.$position = [325,155];
ACMP2.$position = [325,255];
PIN1.$position = [555,170];
PIN2.$position = [730,270];
PIN3.$position = [140,140];
PIN4.$position = [140,220];
PIN5.$position = [140,300];
VCC1.$position = [270,120];

/**
* 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.
*/
ACMP2.hw.$suggestSolution = "ACMP1";
SYSTEM.hw.$suggestSolution = "SYSTEM";

/**
* 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 "TPLD1201_DGS_TL" --part "Default" --package "DGS (VSSOP, 10)" --product "TPLD@1.3.1+869"
* @v2CliArgs --device "TPLD1201" --package "DGS (VSSOP, 10)" --product "TPLD@1.3.1+869"
* @versions {"tool":"1.22.0+3893"}
*/

/**
* Import the modules used in this configuration.
*/
const ACMP = scripting.addModule("/ti/tpld/ACMP", {}, false);
const ACMP1 = ACMP.addInstance();
const ACMP2 = ACMP.addInstance();
const PIN = scripting.addModule("/ti/tpld/PIN", {}, false);
const PIN1 = PIN.addInstance();
const PIN2 = PIN.addInstance();
const VCC = scripting.addModule("/ti/tpld/VCC", {}, false);
const VCC1 = VCC.addInstance();

/**
* Write custom configuration values to the imported modules.
*/
ACMP1.$name = "acmp0";
ACMP1.vref_sel = 26;
ACMP1.hw.$assign = "ACMP0";

ACMP2.$name = "acmp1";
ACMP2.vref_sel = 26;
ACMP2.inp_sel = 2;

PIN1.$name = "pin2";
PIN1.type = "DOUT";
PIN1.hw.$assign = "IO6";

PIN2.$name = "pin4";
PIN2.type = "DOUT";
PIN2.hw.$assign = "IO7";

const PIN3 = PIN.addInstance({}, false);
PIN3.$name = "pin1";
ACMP1.inm = PIN3;
ACMP2.inm = PIN3;
PIN3.hw.$assign = "IO2";

const PIN4 = PIN.addInstance({}, false);
PIN4.$name = "pin3";
ACMP1.inp = PIN4;
PIN4.hw.$assign = "IO1";

const PIN5 = PIN.addInstance({}, false);
PIN5.$name = "pin0";
ACMP2.inp = PIN5;
PIN5.hw.$assign = "IO4";

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

VCC1.$name = "VCC0";

/**
* Connections between modules
*/
scripting.connect(ACMP1, "OUT", PIN2, "IN");
scripting.connect(ACMP2, "OUT", PIN1, "IN");
scripting.connect(VCC1, "OUT", ACMP1, "PUP");
scripting.connect(VCC1, "OUT", ACMP2, "PUP");

/**
* (x,y) coordinates for modules that are displayed in a graph
*/
ACMP1.$position = [0,0];
ACMP2.$position = [0,165];
PIN1.$position = [150,180];
PIN2.$position = [150,15];
PIN3.$position = [-195,90];
PIN4.$position = [-195,15];
PIN5.$position = [-200,180];
VCC1.$position = [-60,-65];

/**
* 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.
*/
ACMP2.hw.$suggestSolution = "ACMP1";
SYSTEM.hw.$suggestSolution = "SYSTEM";

Any suggestions?

Thank you in advance

Luca Pizzini

  • Hi Luca,

    Are you referring to issues when programming a device, or simulating?

    I don't see any simulation options specified in the file you uploaded, so that would need to be added in order to see correct outputs from the ACMP.

    See 5.1.3 Setting Simulation Inputs

    If you are having issues with programming the device could you be more specific. Is it after the device is programmed? Do you have waveforms? etc.

    Regards,

    Owen

  • Hi Owen,

    sorry, I will try to explain better. With both versions of my uploaded files, when I press the button "configuration" the system programs in ram the 1201, then the 1201 start to work. Whit the second file, moving the R1 (IO1) I can see the LED (IO6) turn on/off, but moving R4 (IO4) the LED (IO7) remains off. With the first file instead all works fine. So Where is the difference? May be some programming errors in ACMP1 configuration? I do not understand. If the graphics are the same, why the files are different? Please try yourself to replicate the above situation.

    Best Regards

    Luca

  • Hi Luca,

    The issue is because an Oscillator is not in your design.

    In version 1.3.1 our teams tried to introduce a power saving feature that turns the oscillators off if they are not included in a design. We have seen a negative impact of this on other features of the device not related. It turns out the ACMP is gated by the oscillator at startup, so it needs to be left open to allow the ACMP to work.

    This is done to prevent weird output glitching while the device is in startup.

    Simply add an oscillator to the design. It can be left unattached and in auto power on mode to save as much power as possible.

    Regards,

    Owen