/** * 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 "Other" --part "Other" --package "Other" --product "TPLD@1.7.4+1396" * @v2CliArgs --device "Other" --package "Other" --product "TPLD@1.7.4+1396" * @versions {"tool":"1.27.1+4607"} */ /** * Define each context separately, before assigning them to individual modules. */ const context = await scripting.createContext(["--device", "TPLD1201", "--package", "DGS (VSSOP, 10)", "--variant", "default"]); { const {scripting, system} = context; /** * Import the modules used in this configuration. */ const ACMP = scripting.addModule("/ti/tpld/ACMP", {}, false); const ACMP1 = ACMP.addInstance(); const DLY = scripting.addModule("/ti/tpld/DLY", {}, false); const DLY1 = DLY.addInstance(); const LUT = scripting.addModule("/ti/tpld/LUT", {}, false); const LUT1 = LUT.addInstance(); const LUT2 = LUT.addInstance(); const LUT3 = LUT.addInstance(); const LUT4 = LUT.addInstance(); const LUT5 = LUT.addInstance(); const Label = scripting.addModule("/ti/tpld/Label", {}, false); const Label1 = Label.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 PIN6 = PIN.addInstance(); const PIN7 = PIN.addInstance(); const PIN8 = PIN.addInstance(); const Simulation = scripting.addModule("/ti/tpld/Simulation"); const VCC = scripting.addModule("/ti/tpld/VCC", {}, false); const VCC1 = VCC.addInstance(); const VREF = scripting.addModule("/ti/tpld/VREF", {}, false); const VREF1 = VREF.addInstance(); /** * Write custom configuration values to the imported modules. */ ACMP1.$name = "acmp0"; ACMP1.vref_sel = 23; scripting.probe(ACMP1, "INP", ["voltage"]); scripting.probe(ACMP1, "INM", ["voltage"]); scripting.probe(ACMP1, "OUT", ["voltage"]); DLY1.$name = "dly0"; scripting.probe(DLY1, "CLK", ["voltage"]); LUT1.$name = "lut1"; LUT1.function = "NOR"; LUT2.$name = "lut2"; LUT2.function = "NOR"; LUT3.$name = "lut3"; LUT3.function = "OR"; scripting.probe(LUT3, "OUT", ["voltage"]); LUT4.$name = "lut4"; LUT4.function = "NOR"; LUT5.$name = "lut5"; LUT5.function = "NOR"; scripting.probe(LUT5, "OUT", ["voltage"]); Label1.$name = "3.125 kHz / 24 = 130 Hz"; OSC1.$name = "osc0"; DLY1.osc = OSC1; PIN1.$name = "CDL_RESET"; PIN1.$topLabel = "CDL_RESET"; PIN1.hw.$assign = "IO6"; PIN2.type = "DOUT"; PIN2.$name = "TXD"; PIN2.$topLabel = "TXD"; PIN2.hw.$assign = "IO7"; PIN3.$name = "CDl_RXD"; PIN3.$topLabel = "CDL_RXD"; PIN4.$name = "pin0"; ACMP1.inp = PIN4; PIN4.res_sel = 1; PIN4.pull_up_en = 1; PIN4.hw.$assign = "IO1"; PIN5.$name = "CDL_TXD"; PIN5.$topLabel = "CDL_TXD"; PIN6.type = "DOUT"; PIN6.$name = "CDL_STATUS"; PIN6.$topLabel = "CDL_STATUS"; PIN7.type = "DOUT"; PIN7.$name = "Test_Probe"; PIN8.type = "DOUT"; PIN8.$name = "Test_Probe_2"; const SYSTEM = scripting.addModule("/ti/tpld/SYSTEM", {}, false); Simulation.tstep = { val: 1, units: "us" }; VCC1.$name = "VCC0"; ACMP1.inm = VREF1; VREF1.$name = "vref0"; /** * Connections between modules. */ scripting.connect(ACMP1, "PUP", VCC1, "OUT"); scripting.connect(ACMP1, "OUT", LUT2, "A"); scripting.connect(DLY1, "IN", LUT5, "OUT"); scripting.connect(DLY1, "OUT", LUT3, "A"); scripting.connect(DLY1, "OUT", PIN4, "IN"); scripting.connect(DLY1, "OUT", PIN8, "IN"); scripting.connect(LUT1, "A", LUT2, "OUT"); scripting.connect(LUT1, "B", LUT4, "OUT"); scripting.connect(LUT1, "OUT", LUT4, "B"); scripting.connect(LUT2, "B", LUT3, "OUT"); scripting.connect(LUT3, "B", PIN3, "OUT"); scripting.connect(LUT4, "A", PIN1, "OUT"); scripting.connect(LUT4, "OUT", LUT5, "B"); scripting.connect(LUT4, "OUT", PIN6, "IN"); scripting.connect(LUT5, "A", PIN5, "OUT"); scripting.connect(LUT5, "OUT", PIN2, "IN"); scripting.connect(OSC1, "PDWN", VCC1, "OUT"); scripting.connect(PIN4, "OUT", PIN7, "IN"); /** * (x,y) coordinates for modules that are displayed in a graph. */ ACMP1.$position = [240,235]; DLY1.$position = [0,0]; LUT1.$position = [675,350]; LUT2.$position = [480,315]; LUT3.$position = [270,405]; LUT4.$position = [845,340]; LUT5.$position = [1020,295]; Label1.$position = [-110,-30]; OSC1.$position = [-180,-5]; PIN1.$position = [620,255]; PIN2.$position = [1195,310]; PIN3.$position = [85,430]; PIN4.$position = [-40,230]; PIN5.$position = [825,260]; PIN6.$position = [1200,430]; PIN7.$position = [505,-85]; PIN8.$position = [-10,-170]; VCC1.$position = [210,-50]; VREF1.$position = [-25,335]; /** * 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. */ ACMP1.hw.$suggestSolution = "ACMP0"; DLY1.hw.$suggestSolution = "CNTDLY0"; LUT1.hw.$suggestSolution = "LUT3_0_DFF2"; LUT2.hw.$suggestSolution = "LUT2_3"; LUT3.hw.$suggestSolution = "LUT2_2"; LUT4.hw.$suggestSolution = "LUT2_1_DFF1"; LUT5.hw.$suggestSolution = "LUT2_0_DFF0"; OSC1.hw.$suggestSolution = "OSC0"; PIN3.hw.$suggestSolution = "IN0"; PIN5.hw.$suggestSolution = "IO9"; PIN6.hw.$suggestSolution = "IO5"; PIN7.hw.$suggestSolution = "IO4"; PIN8.hw.$suggestSolution = "IO2"; SYSTEM.hw.$suggestSolution = "SYSTEM"; VREF1.hw.$suggestSolution = "VREF"; } /** * Import the modules used in this configuration. */ const Device = scripting.addModule("/ti/tpld/Device", {}, false); const Device1 = Device.addInstance(); const GND = scripting.addModule("/ti/tpld/GND", {}, false); const GND1 = GND.addInstance(); const Simulation = scripting.addModule("/ti/tpld/Simulation"); const VCC = scripting.addModule("/ti/tpld/VCC", {}, false); const VCC1 = VCC.addInstance(); const VSOURCE = scripting.addModule("/ti/tpld/external/VSOURCE", {}, false); const VSOURCE1 = VSOURCE.addInstance(); const VSOURCE2 = VSOURCE.addInstance(); const VSOURCE3 = VSOURCE.addInstance(); /** * Write custom configuration values to the imported modules. */ Device1.$name = "U0"; Device1.context = context; scripting.probe(Device1, "$context.CDL_RESET.IN_EXT", ["voltage"]); scripting.probe(Device1, "$context.TXD.OUT_EXT", ["voltage"]); scripting.probe(Device1, "$context.CDl_RXD.IN_EXT", ["voltage"]); scripting.probe(Device1, "$context.CDL_STATUS.OUT_EXT", ["voltage"]); scripting.probe(Device1, "$context.Test_Probe.OUT_EXT", ["voltage"]); scripting.probe(Device1, "$context.Test_Probe_2.OUT_EXT", ["voltage"]); GND1.$name = "GND0"; Simulation.tstop = { val: 30, units: "ms" }; Simulation.startup = true; VCC1.$name = "VCC0"; VSOURCE1.$name = "V0"; VSOURCE1.sim = "pattern"; VSOURCE1.pattern.$name = "ti_tpld_simulationOptions_PATTERN0"; VSOURCE1.pattern.steps.create(3); VSOURCE1.pattern.steps[0].$name = "step0"; VSOURCE1.pattern.steps[1].$name = "step1"; VSOURCE1.pattern.steps[1].time = { val: 2, units: "ms" }; VSOURCE1.pattern.steps[1].logicState = true; VSOURCE1.pattern.steps[2].$name = "step2"; VSOURCE1.pattern.steps[2].time = { val: 4, units: "ms" }; VSOURCE2.$name = "V1"; VSOURCE2.sim = "pulseSource"; VSOURCE2.pulseSource.$name = "ti_tpld_simulationOptions_PULSE0"; VSOURCE2.pulseSource.delay = { val: 5, units: "ms" }; VSOURCE2.pulseSource.repeat = true; VSOURCE2.pulseSource.period = { val: 2, units: "ms" }; VSOURCE3.$name = "V2"; VSOURCE3.sim = "pulseSource"; VSOURCE3.pulseSource.$name = "ti_tpld_simulationOptions_PULSE1"; VSOURCE3.pulseSource.repeat = true; VSOURCE3.pulseSource.period = { val: 2, units: "ms" }; VSOURCE3.pulseSource.delay = { val: 10, units: "ms" }; VSOURCE3.pulseSource.voltagePulsedValue = { val: 0, units: "V" }; VSOURCE3.pulseSource.voltageInitValue = { val: 3.3, units: "V" }; /** * Connections between modules. */ scripting.connect(Device1, "VCC", VCC1, "OUT"); scripting.connect(Device1, "GND", GND1, "OUT"); scripting.connect(Device1, "$context.CDL_RESET.IN_EXT", VSOURCE1, "OUT"); scripting.connect(Device1, "$context.CDl_RXD.IN_EXT", VSOURCE3, "OUT"); scripting.connect(Device1, "$context.CDL_TXD.IN_EXT", VSOURCE2, "OUT"); scripting.connect(GND1, "OUT", VSOURCE1, "IN"); scripting.connect(GND1, "OUT", VSOURCE2, "IN"); scripting.connect(GND1, "OUT", VSOURCE3, "IN"); /** * (x,y) coordinates for modules that are displayed in a graph. */ Device1.$position = [10,-15]; GND1.$position = [-335,15]; VCC1.$position = [-60,-30]; VSOURCE1.$position = [-140,40]; VSOURCE2.$position = [-140,220]; VSOURCE3.$position = [-140,130];