This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:sigmastudio:usingsigmastudio:scripting:iscripted [03 Nov 2022 14:52] – ananthakalyani Sankar | resources:tools-software:sigmastudio:usingsigmastudio:scripting:iscripted [30 Dec 2022 13:56] (current) – [Properties] ananthakalyani Sankar | ||
---|---|---|---|
Line 1715: | Line 1715: | ||
==== Pause and Resume Options ==== | ==== Pause and Resume Options ==== | ||
\\ | \\ | ||
- | =====USBiReset | + | =====USBiReset===== |
<code csharp> | <code csharp> | ||
HResult ResetUSBInterface(); | HResult ResetUSBInterface(); | ||
Line 1724: | Line 1724: | ||
\\ | \\ | ||
\\ | \\ | ||
- | =====GetIcNames | + | =====GetIcNames===== |
<code csharp> | <code csharp> | ||
ArrayList GetIcNames(); | ArrayList GetIcNames(); | ||
Line 1733: | Line 1733: | ||
\\ | \\ | ||
\\ | \\ | ||
- | ===== E2PROM | + | =====Selfboot |
- | ===Write to E2PROM | + | ===Selfboot Port settings=== |
<code csharp> | <code csharp> | ||
- | HResult WriteLatestCompilationthroughDSP(); | + | SELFBOOT_PORT_SETTINGS(string cellName, int[] values); |
</ | </ | ||
<fc # | <fc # | ||
\\ | \\ | ||
- | The method is used to load schematic to E2PROM through DSP | + | The method is used to settings |
- | Note: Call the compilation is required before using this. | + | |
\\ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Name: | ||
+ | \\ | ||
+ | Type: | ||
\\ | \\ | ||
- | <code csharp> | ||
- | HResult WriteLatestCompilationUSB(); | ||
- | </ | ||
<fc # | <fc # | ||
\\ | \\ | ||
- | The method is used to load schematic to E2PROM through USB | + | Cell name of SigmaDSP IC example: "IC 1" |
- | Note: Call the compilation is required before using this. | + | |
\\ | \\ | ||
+ | Name: PORT_SETTINGS | ||
\\ | \\ | ||
- | ===Erase === | + | Type: int |
+ | \\ | ||
+ | |||
+ | ==Example for Python :== | ||
+ | \\ | ||
+ | PORT_SETTINGS = VARIANT(pythoncom.VT_ARRAY| pythoncom.VT_I4, | ||
+ | \\ | ||
+ | ==Example for .sss:== | ||
+ | \\ | ||
+ | System.Collections.Generic.List< | ||
+ | \\ | ||
+ | \\ | ||
+ | PORT_SETTINGS.Add(1048576); | ||
+ | PORT_SETTINGS.Add(0x03); | ||
+ | PORT_SETTINGS.Add(0x02); | ||
+ | PORT_SETTINGS.Add(0x03); | ||
+ | PORT_SETTINGS.Add(0x06); | ||
+ | PORT_SETTINGS.Add(0xc7); | ||
+ | PORT_SETTINGS.Add(10); | ||
+ | PORT_SETTINGS.Add(10000); | ||
+ | PORT_SETTINGS.Add(256); | ||
+ | PORT_SETTINGS.Add(1); | ||
+ | PORT_SETTINGS.Add(0); | ||
+ | \\ | ||
+ | |||
+ | ===Selfboot write === | ||
<code csharp> | <code csharp> | ||
- | HResult EraseMemorythroughDSP | + | SELFBOOTWRITE(string cellName, string writeThrough); |
</ | </ | ||
<fc # | <fc # | ||
\\ | \\ | ||
- | The method is used to Erase the E2PROM. | + | The method is used to write through " |
- | \\ | + | |
\\ | \\ | ||
- | ===Export | + | |
+ | ===Selfboot | ||
<code csharp> | <code csharp> | ||
- | HResult ProjectExportSelfbootFiles(string | + | EXPORT_SELFBOOT_DATA(bool readThroughDSP, |
</ | </ | ||
<fc # | <fc # | ||
Line 1772: | Line 1798: | ||
<fc # | <fc # | ||
\\ | \\ | ||
- | Name: path | + | Name: projectexportFile |
\\ | \\ | ||
Type: | Type: | ||
Line 1780: | Line 1806: | ||
stored the .Hex file on this path | stored the .Hex file on this path | ||
\\ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===Selfboot Erase=== | ||
+ | <code csharp> | ||
+ | SELFBOOTERASE(string cellName); | ||
+ | </ | ||
+ | <fc # | ||
+ | \\ | ||
+ | The method is used to Erase the E2PROM. | ||
+ | \\ | ||
+ | ====Examples==== | ||
+ | |||
+ | The following shows an example of how to using Selfboot . | ||
+ | |||
+ | <code csharp> | ||
+ | rom win32com.client.dynamic import Dispatch | ||
+ | from win32com.client import VARIANT | ||
+ | import pythoncom | ||
+ | import sys | ||
+ | |||
+ | try: | ||
+ | import clr | ||
+ | except: | ||
+ | import pip | ||
+ | pip.main([' | ||
+ | import clr | ||
+ | |||
+ | clr.AddReference(' | ||
+ | from System.Collections.Generic import List | ||
+ | |||
+ | PORT_SETTINGS = VARIANT(pythoncom.VT_ARRAY| pythoncom.VT_I4, | ||
+ | |||
+ | ## This program is designed to test SigmaStudio scripting from Python. | ||
+ | if __name__ == " | ||
+ | | ||
+ | server = Dispatch(' | ||
+ | print(' | ||
+ | |||
+ | projectexportFile= " | ||
+ | projectexporteraseFile= " | ||
+ | Cellname = 'IC 1' | ||
+ | SelfbootThrough = ' | ||
+ | | ||
+ | status = server.SET_TIMEOUT(120) # 2 Min Needs update if erase or export of complete EEPROM | ||
+ | print(' | ||
+ | server.COMPILE_PROJECT | ||
+ | | ||
+ | print(' | ||
+ | # Arg1 - Cell name of SigmaDSP IC example: "IC 1" | ||
+ | # Arg2 - EEPROM port settings | ||
+ | server.SELFBOOT_PORT_SETTINGS(Cellname, | ||
+ | | ||
+ | print(' | ||
+ | # Arg1 - Cell name of SigmaDSP IC example: "IC 1" | ||
+ | # Arg2 - write through " | ||
+ | server.SELFBOOTWRITE(Cellname, | ||
+ | | ||
+ | print(' | ||
+ | # Arg1 - True for DSP, False for USB (USB currently not supported) | ||
+ | # Arg2 - Export file path | ||
+ | server.EXPORT_SELFBOOT_DATA(True, | ||
+ | | ||
+ | print(' | ||
+ | # Arg1 - Cell name of SigmaDSP IC example: "IC 1" | ||
+ | server.SELFBOOTERASE(Cellname); | ||
+ | | ||
+ | server.EXPORT_SELFBOOT_DATA(True, | ||
+ | | ||
+ | server.SAVE_PROJECT | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== IPAT Options ===== | ||
+ | ===Write=== | ||
+ | <code csharp> | ||
+ | HResult IPATParamWrite(int numOfBytesToWrite, | ||
+ | </ | ||
+ | ===Read=== | ||
+ | <code csharp> | ||
+ | HResult IPATParamRead(int numberBytesToRead, | ||
+ | |||
+ | </ | ||
+ | <fc # | ||
+ | \\ | ||
+ | The method is used to Write / from Read the values of the parameter to/from IPAT Address. | ||
+ | \\ | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Type & Name: int numOfBytesToWrite | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Number of bytes in ' | ||
+ | \\ | ||
+ | \\ | ||
+ | Type & Name: int writeToData | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | The data to write | ||
+ | \\ | ||
+ | Type & Name: int ipatWriteAddress | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Indirect address of the parameter to be load | ||
+ | \\ | ||
+ | Type & Name: int _numOfLoadsAndTriggers | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Number of consecutive loads | ||
+ | \\ | ||
+ | Type & Name: int protocol | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Serial prorotcol to transfer the data | ||
+ | \\ | ||
+ | Type & Name: int chipAddress | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | I2C - Load Address, SPI - Address is zero | ||
+ | \\ | ||
+ | Type & Name: int addressOfStartAddress | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | Address of the IPAT StartAddress | ||
+ | \\ | ||
+ | Type & Name: int addressWidth | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | The width of address | ||
+ | \\ | ||
+ | Type & Name: int registerByteLength | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | address increment | ||
+ | \\ | ||
+ | Type & Name: int communicationChannel | ||
+ | \\ | ||
+ | <fc # | ||
+ | \\ | ||
+ | The commumnication channel USBi/ | ||
+ | \\ | ||
+ | Type & Name: int ICType | ||
+ | \\ | ||
+ |