/** * 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_RWB_TR" --part "Default" --package "RWB (X2QFN, 12)" --product "TPLD@1.5.1+1087" * @v2CliArgs --device "TPLD1201" --package "RWB (X2QFN, 12)" --product "TPLD@1.5.1+1087" * @versions {"tool":"1.24.1+4189"} */ /** * Import the modules used in this configuration. */ const ACMP = scripting.addModule("/ti/tpld/ACMP", {}, false); const ACMP1 = ACMP.addInstance(); const ACMP2 = ACMP.addInstance(); const DFF = scripting.addModule("/ti/tpld/DFF", {}, false); const DFF1 = DFF.addInstance(); const DFF2 = DFF.addInstance(); const DFF3 = DFF.addInstance(); const DLY = scripting.addModule("/ti/tpld/DLY", {}, false); const DLY1 = DLY.addInstance(); const DLY2 = DLY.addInstance(); const DLY3 = DLY.addInstance(); const DLY4 = DLY.addInstance(); const GND = scripting.addModule("/ti/tpld/GND", {}, false); const GND1 = GND.addInstance(); const GND2 = GND.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 Label2 = Label.addInstance(); const Label3 = Label.addInstance(); const Label4 = Label.addInstance(); const OSC = scripting.addModule("/ti/tpld/OSC", {}, false); const OSC1 = OSC.addInstance(); const PDLY = scripting.addModule("/ti/tpld/PDLY", {}, false); const PDLY1 = PDLY.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 PIPEDELAY = scripting.addModule("/ti/tpld/PIPEDELAY", {}, false); const PIPEDELAY1 = PIPEDELAY.addInstance(); const Simulation = scripting.addModule("/ti/tpld/Simulation"); const VCC = scripting.addModule("/ti/tpld/VCC", {}, false); const VCC1 = VCC.addInstance(); const VCC2 = VCC.addInstance(); const VCC3 = VCC.addInstance(); /** * Write custom configuration values to the imported modules. */ ACMP1.$name = "acmp0"; ACMP1.vref_sel = 13; ACMP1.low_bw = true; ACMP1.hw.$assign = "ACMP0"; ACMP2.$name = "acmp1"; ACMP2.inp_sel = 2; ACMP2.vref_sel = 13; ACMP2.low_bw = true; ACMP2.hw.$assign = "ACMP1"; DFF1.$name = "dff0"; DFF1.rst = 0; DFF1.hw.$assign = "LUT3_0_DFF2"; DFF2.$name = "dff1"; DFF2.out_pol = true; DFF2.hw.$assign = "LUT2_1_DFF1"; DFF3.$name = "dff2"; DFF3.out_pol = true; DFF3.rst = 0; DFF3.clk_pol = true; DFF3.hw.$assign = "LUT3_1_DFF3"; DLY1.$name = "dly0"; DLY1.edge_sel = 1; DLY1.data = 10; DLY1.hw.$assign = "CNTDLY3"; DLY2.$name = "dly1"; DLY2.edge_sel = 2; DLY2.clk_sel2 = "OSC/64"; DLY2.data = 195; DLY2.hw.$assign = "CNTDLY0"; DLY3.$name = "dly2"; DLY3.clk_sel2 = "OSC/64"; DLY3.edge_sel = 2; DLY3.data = 14; DLY3.hw.$assign = "CNTDLY1"; DLY4.$name = "dly3"; DLY4.data = 25; DLY4.edge_sel = 2; scripting.probe(DLY4, "OUT", ["voltage"]); GND1.$name = "GND0"; GND2.$name = "GND1"; LUT1.$name = "lut0"; LUT1.function = "NAND"; LUT1.hw.$assign = "LUT2_3"; LUT2.$name = "lut1"; LUT2.function = "OR"; LUT2.hw.$assign = "LUT2_2"; LUT3.$name = "lut2"; LUT3.inputs = 3; LUT3.hw.$assign = "LUT3_3"; LUT4.$name = "lut3"; LUT4.inputs = 3; LUT4.function = "OR"; LUT4.hw.$assign = "LUT3_2"; LUT5.$name = "lut4"; LUT5.function = "Table"; LUT5["2_1"] = true; scripting.probe(LUT5, "OUT", ["voltage"]); Label1.$name = "*lut2 & lut3 can be combined."; Label2.$name = "* 1/16 duty pulse generation"; Label3.$name = "* Pulse Delay"; Label4.$name = "* Pulse Width"; OSC1.$name = "osc0"; DLY1.osc = OSC1; DLY2.osc = OSC1; DLY3.osc = OSC1; OSC1.force_pwron = 1; DLY4.osc = OSC1; OSC1.out1_sel = 7; OSC1.pdiv = 1; OSC1.hw.$assign = "OSC0"; PDLY1.$name = "pflt0"; PDLY1.edge_sel = 3; PDLY1.time_sel = 3; PDLY1.hw.$assign = "PDLY_FILTER0"; ACMP1.inp = PIN1; PIN1.res_sel = 3; PIN1.$name = "CC1"; scripting.probe(PIN1, "OUT", []); PIN1.hw.$assign = "IO1"; PIN2.$name = "WAKE"; PIN2.res_sel = 1; PIN2.in_ctl = 1; PIN2.sim = "pulseSource"; scripting.probe(PIN2, "OUT", []); PIN2.hw.$assign = "IN0"; PIN2.pulseSource.$name = "ti_tpld_simulationOptions_PULSE0"; PIN2.pulseSource.pulsedValue = { val: 1.8, units: "V" }; PIN2.pulseSource.pulseWidth = { val: 70, units: "ms" }; PIN2.pulseSource.delay = { val: 40, units: "ms" }; PIN3.$name = "EXTPWR_WKUP"; PIN3.type = "DOUT"; scripting.probe(PIN3, "IN", []); PIN3.hw.$assign = "IO5"; PIN4.$name = "RST(OD)"; PIN4.type = "DOUT"; PIN4.out_ctl = 1; PIN4.load = true; scripting.probe(PIN4, "IN", []); PIN4.hw.$assign = "IO2"; PIN4.outputLoad.$name = "ti_tpld_simulationOptions_OUTPUT0"; PIN4.outputLoad.negRes = { val: 0, units: "kΩ" }; PIN5.$name = "CHG_INT#"; PIN5.res_sel = 3; PIN5.in_ctl = 1; scripting.probe(PIN5, "OUT", []); PIN5.hw.$assign = "IO6"; PIN6.$name = "SW_PWR/CC_OUT"; PIN6.type = "DIO"; PIN6.out_ctl = 1; PIN6.res_sel = 3; PIN6.in_ctl = 1; scripting.probe(PIN6, "OUT", []); scripting.probe(PIN6, "IN", []); PIN6.hw.$assign = "IO7"; PIN7.sim = "pwl"; PIN7.in_ctl = 1; PIN7.res_sel = 2; PIN7.$name = "SLEEP_CHG#"; PIN7.hw.$assign = "IO9"; PIN7.pwl.$name = "ti_tpld_simulationOptions_PWL0"; PIN7.pwl.steps.create(2); PIN7.pwl.steps[0].$name = "step0"; PIN7.pwl.steps[0].voltage = 0; PIN7.pwl.steps[0].time = { val: 20, units: "ms" }; PIN7.pwl.steps[1].$name = "step1"; PIN7.pwl.steps[1].time = { val: 500, units: "ms" }; PIN7.pwl.steps[1].voltage = 1.8; ACMP2.inp = PIN8; PIN8.$name = "CC2"; PIN8.res_sel = 3; scripting.probe(PIN8, "OUT", []); PIN8.hw.$assign = "IO4"; PIPEDELAY1.$name = "pipedelay0"; PIPEDELAY1.out1_pol = true; PIPEDELAY1.out1_dly = 7; scripting.probe(PIPEDELAY1, "OUT0", ["voltage"]); scripting.probe(PIPEDELAY1, "OUT1", ["voltage"]); const SYSTEM = scripting.addModule("/ti/tpld/SYSTEM", {}, false); SYSTEM.hw.$assign = "SYSTEM"; Simulation.tstep = { val: 1, units: "ms" }; Simulation.power = 1.8; Simulation.tstop = { val: 500, units: "ms" }; VCC1.$name = "VCC0"; VCC2.$name = "VCC1"; VCC3.$name = "VCC2"; const VREF = scripting.addModule("/ti/tpld/VREF", {}, false); const VREF1 = VREF.addInstance({}, false); VREF1.$name = "vref0"; ACMP2.inm = VREF1; ACMP1.inm = VREF1; VREF1.hw.$assign = "VREF"; /** * Connections between modules. */ scripting.connect(ACMP1, "OUT", LUT2, "A"); scripting.connect(ACMP2, "OUT", LUT2, "B"); scripting.connect(DFF1, "OUT", LUT1, "B"); scripting.connect(DFF1, "OUT", DLY2, "IN"); scripting.connect(DFF2, "OUT", PIN6, "IN"); scripting.connect(DFF3, "OUT", PIN4, "IN"); scripting.connect(DFF3, "OUT", PIN6, "OE"); scripting.connect(DFF3, "OUT", DLY1, "IN"); scripting.connect(DLY1, "OUT", LUT4, "A"); scripting.connect(DLY2, "OUT", DLY3, "IN"); scripting.connect(DLY2, "OUT", PIN3, "IN"); scripting.connect(DLY3, "OUT", LUT1, "A"); scripting.connect(DLY4, "OUT", DFF2, "CLK"); scripting.connect(GND1, "OUT", LUT4, "C"); scripting.connect(GND2, "OUT", OSC1, "PDWN"); scripting.connect(LUT1, "OUT", DFF1, "NRST_NSET"); scripting.connect(LUT2, "OUT", DFF2, "IN"); scripting.connect(LUT3, "OUT", DFF3, "NRST_NSET"); scripting.connect(LUT4, "OUT", LUT3, "A"); scripting.connect(LUT5, "OUT", ACMP2, "PUP"); scripting.connect(LUT5, "OUT", ACMP1, "PUP"); scripting.connect(LUT5, "OUT", DLY4, "IN"); scripting.connect(OSC1, "OUT1", PIPEDELAY1, "CLK"); scripting.connect(PDLY1, "OUT", LUT4, "B"); scripting.connect(PIN2, "OUT", DFF1, "CLK"); scripting.connect(PIN5, "OUT", LUT3, "C"); scripting.connect(PIN6, "OUT", PDLY1, "IN"); scripting.connect(PIN7, "OUT", PIPEDELAY1, "NRST"); scripting.connect(PIN7, "OUT", DFF3, "CLK"); scripting.connect(PIPEDELAY1, "OUT0", LUT5, "A"); scripting.connect(PIPEDELAY1, "OUT1", PIPEDELAY1, "IN"); scripting.connect(PIPEDELAY1, "OUT1", LUT5, "B"); scripting.connect(VCC1, "OUT", DFF1, "IN"); scripting.connect(VCC2, "OUT", DFF3, "IN"); scripting.connect(VCC3, "OUT", LUT3, "B"); /** * (x,y) coordinates for modules that are displayed in a graph. */ ACMP1.$position = [-40,60]; ACMP2.$position = [-40,155]; DFF1.$position = [-25,-85]; DFF2.$position = [230,185]; DFF3.$position = [525,505]; DLY1.$position = [520,360]; DLY2.$position = [190,-75]; DLY3.$position = [365,-30]; DLY4.$position = [-40,260]; GND1.$position = [200,430]; GND2.$position = [-315,-155]; LUT1.$position = [500,20]; LUT2.$position = [120,105]; LUT3.$position = [350,445]; LUT4.$position = [260,340]; LUT5.$position = [-170,335]; Label1.$position = [335,525]; Label2.$position = [-190,420]; Label3.$position = [215,-100]; Label4.$position = [390,-70]; OSC1.$position = [-260,-185]; PDLY1.$position = [155,340]; PIN1.$position = [-480,75]; PIN2.$position = [-465,-55]; PIN3.$position = [760,-60]; PIN4.$position = [770,520]; PIN5.$position = [-465,475]; PIN6.$position = [765,205]; PIN7.$position = [-465,535]; PIN8.$position = [-480,170]; PIPEDELAY1.$position = [-285,335]; VCC1.$position = [-85,-100]; VCC2.$position = [460,475]; VCC3.$position = [260,435]; VREF1.$position = [-225,205]; /** * 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. */ DLY4.hw.$suggestSolution = "LUT4_0_CNTDLY2"; LUT5.hw.$suggestSolution = "LUT2_0_DFF0"; PIPEDELAY1.hw.$suggestSolution = "LUT3_4_PIPEDELAY";