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

Guru**** 2480175 points
Other Parts Discussed in Thread: TPLD1201

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/logic-group/logic/f/logic-forum/1484892/tpld1201-tpld1201dgsr

器件型号:TPLD1201

工具与软件:

我将尝试复制第一个示例、其中只有两个模拟比较器、但第一个示例似乎能按预期工作。

如果我使用原始示例、它将实现完美的运行。 如果我从空状态开始、它不起作用。

以下是从演示中保存的文件内容、可以正常工作、然后是异常内容:

/**
*这些参数是在生成该文件时使用的。 它们将自动应用于后续负载
*通过 GUI 或 CLI 运行 CLI 并使用'--help'获取有关如何覆盖这些参数的更多信息。
*@cliArgs --设备"TPLD1201_DGS_TL"-部件"默认"-包装"DGS (VSSOP, 10 )"-产品"TPLD@1.3.1+869"
*@v2CliArgs --设备"TPLD1201"-封装"DGS (VSSOP, 10 )"-产品"TPLD@1.3.1+869"
*@版本{"tool":"1.22.0+3893"}
*/

/**
*导入此配置中使用的模块。
*/
const acmp = scripting.AddModule ("scripting.AddModule"/ti/tpld/ACMP、{}、false);
const ACMP1 = ACMP.addInstance();
const ACMP2 = ACMP.addInstance();
const PIN = scripting.AddModule ("Scripting"/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() VCC;

/**
*将自定义配置值写入导入的模块。
*/
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 ="如果电压\nr1 > r2\ntop 电位器>中间电位器\n";
pin1.hw.$assign ="IO6";

PIN2.$name ="IO7";
PIN2.TYPE ="DOUT";
PIN2.$topLabel ="LED 7\n 如果电压\nR4 > R2\n 底部电位器>中间电位器\n";
PIN2.HW.$ASSIGN ="IO7";

ACMP1.inp =引脚3;
pin3.$name ="ACMP0_IN";
pin3.sim ="正弦";
pin3.$topLabel ="R1";
pin3.hw.$assign ="IO1";
pin3.sine.$name ="ti_tpld_simulationOptions_SINE0";
pin3.sine.amplitude ={val:1.65、单位:"V"};

ACMP1.inm =引脚4;
ACMP2.inm =引脚4;
PIN4.$name ="ACMPx_IN";
PIN4.sim ="正弦";
PIN4.$topLabel ="R2";
PIN4.HW.$ASSIGN ="IO2";
PIN4.sine.$name ="ti_tpld_simulationOptions_SINE1";
pin4.sine.amplitude ={val:1.65、单位:"V"};
PIN4.sine.phase = 90;

ACMP2.inp =引脚5;
PIN5.$name ="ACMP1_IN";
PIN5.sim ="正弦";
PIN5.$topLabel ="R4";
PIN5.HW.$ASSIGN ="IO4";
PIN5.SINE.$NAME ="ti_tpld_simulationOptions_SINE2";
pin5.sine.amplitude ={val:1.65、单位:"V"};
PIN5.SINE.PHASE = 180;

const system = scripting.AddModule ("scripting.AddModule"/ti/tpld/SYSTEM、{}、false);

simulation.tstep ={val:1、单位:"us"};

VCC1.$name ="VCC0";

/**
*模块之间的连接
*/
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)坐标
*/
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 解决方案。 这可确保将来对自动解算器进行细微更改
*该工具的版本不会影响您最初看到的 pinmux。 可以按照完全删除这些行
*从头开始重新解决。
*/
ACMP2.HW.$inductionestSolution ="ACMP1";
system.hw.$indicestSolution ="系统";

/**
*这些参数是在生成该文件时使用的。 它们将自动应用于后续负载
*通过 GUI 或 CLI 运行 CLI 并使用'--help'获取有关如何覆盖这些参数的更多信息。
*@cliArgs --设备"TPLD1201_DGS_TL"-部件"默认"-包装"DGS (VSSOP, 10 )"-产品"TPLD@1.3.1+869"
*@v2CliArgs --设备"TPLD1201"-封装"DGS (VSSOP, 10 )"-产品"TPLD@1.3.1+869"
*@版本{"tool":"1.22.0+3893"}
*/

/**
*导入此配置中使用的模块。
*/
const acmp = scripting.AddModule ("scripting.AddModule"/ti/tpld/ACMP、{}、false);
const ACMP1 = ACMP.addInstance();
const ACMP2 = ACMP.addInstance();
const PIN = scripting.AddModule ("Scripting"/ti/tpld/PIN、{}、false);
const PIN1 = PIN.addInstance();
const PIN2 = PIN.addInstance();
const VCC = scripting.AddModule ("/ti/tpld VCC "、{}、false);
const VCC1 = VCC.addInstance() VCC;

/**
*将自定义配置值写入导入的模块。
*/
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 =引脚3;
ACMP2.inm =引脚3;
pin3.hw.$assign ="IO2";

const PIN4 = PIN.addInstance ({}、false);
PIN4.$name ="pin3";
ACMP1.inp =引脚4;
PIN4.HW.$ASSIGN ="IO1";

const PIN5 = PIN.addInstance ({}、false);
PIN5.$name ="pin0";
ACMP2.inp =引脚5;
PIN5.HW.$ASSIGN ="IO4";

const system = scripting.AddModule ("scripting.AddModule"/ti/tpld/SYSTEM、{}、false);

VCC1.$name ="VCC0";

/**
*模块之间的连接
*/
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)坐标
*/
ACMP1.$Position =[0、0];
ACMP2.$Position =[0165];
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 解决方案。 这可确保将来对自动解算器进行细微更改
*该工具的版本不会影响您最初看到的 pinmux。 可以按照完全删除这些行
*从头开始重新解决。
*/
ACMP2.HW.$inductionestSolution ="ACMP1";
system.hw.$indicestSolution ="系统";

有什么建议吗?

提前感谢您

Luca Pizzini

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Luca:

    在对器件进行编程或仿真时、您提到的是问题吗?

    我在您上传的文件中没有看到任何指定的仿真选项、因此需要添加该选项才能查看来自 ACMP 的正确输出。

    请参阅 5.1.3设置仿真输入

    如果在器件编程方面遇到问题、请您提供更具体的说明。 是在对器件编程后进行编程吗? 你有波形吗? 等等

    此致、

    Owen

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Owen:

    对不起、我会尽力解释得更好。 在我上传的文件的两个版本中、当我按下按钮"配置" RAM 中的系统程序时、1201开始工作。 运行第二个文件(移动 R1 (IO1))时、我可以看到 LED (IO6)会亮起/熄灭、但移动 R4 (IO4)时、LED (IO7)将保持熄灭。 而使用第一个文件都可以正常运行。 那么、区别在哪里呢? ACMP1配置中可能存在一些编程错误? 我不理解。 如果图形相同、为什么文件不同? 请尝试重复上述情况。

    此致

    Luca.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Luca:

    问题在于、您的设计中不包含振荡器。

    我们的团队在1.3.1版中尝试引入了一种节能特性、能够在设计中不使用振荡器时将其关闭。 我们已经看到、这会对与该器件无关的其他功能产生负面影响。 事实上、ACMP 在启动时由振荡器门控、因此需要使其保持断开状态才能使 ACMP 工作。

    这样做是为了防止器件启动时出现额外的输出干扰。

    只需在设计中添加振荡器即可。 它可以保持未连接状态并处于自动上电模式、以尽可能节省更多电量。

    此致、

    Owen