Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:sigmastudio:usingsigmastudio:scripting:iscripted [14 Nov 2022 07:43] – [IPAT Options] ananthakalyani Sankarresources:tools-software:sigmastudio:usingsigmastudio:scripting:iscripted [30 Dec 2022 13:56] (current) – [Properties] ananthakalyani Sankar
Line 1733: Line 1733:
 \\ \\
 \\ \\
-===== Selfboot Options ===== +=====Selfboot Options===== 
-===Enable/Disable SELF BOOT===+===Selfboot Port settings===
 <code csharp> <code csharp>
-HResult E2PROMfromserver(bool enable);+SELFBOOT_PORT_SETTINGS(string cellName, int[] values);
 </code> </code>
 <fc #6495ed>//Description//</fc> <fc #6495ed>//Description//</fc>
 \\ \\
-The method is used to enable/disable self boot through server/script+The method is used to settings the E2prom port through server/script
 \\ \\
 <fc #6495ed>//Parameters//</fc> <fc #6495ed>//Parameters//</fc>
 \\ \\
-Name:       enable+Name:       Cellname
 \\ \\
-Type:       bool+Type:       String
 \\ \\
 <fc #6495ed>//Description//</fc> <fc #6495ed>//Description//</fc>
 \\ \\
-enable value "<fc #008000>true</fc>",while start self boot from script +Cell name of SigmaDSP IC example: "IC 1"
 \\ \\
-enable value "<fc #008000>false</fc>",after completed the self boot from script+Name:    PORT_SETTINGS
 \\ \\
-<fc #800000>NoteThis is Mandatory before and after the self boot API use.</fc>+Type      int
 \\ \\
 +
 +==Example for Python :==
 \\ \\
-===Write to E2PROM === +PORT_SETTINGS VARIANT(pythoncom.VT_ARRAY| pythoncom.VT_I4, [1048576,0x03,0x02,0x03,0x06,0xc7,10,10000,256,1,0])
-<code csharp> +
-HResult WriteLatestCompilationthroughDSP()+
-</code> +
-<fc #6495ed>//Description//</fc>+
 \\ \\
-The method is used to load schematic to E2PROM through DSP+==Example for .sss:==
 \\ \\
-Note: compilation is required before using this+System.Collections.Generic.List<int> PORT_SETTINGS = new System.Collections.Generic.List<int>();
 \\ \\
 \\ \\
-<code csharp> +PORT_SETTINGS.Add(1048576);\\ 
-HResult WriteLatestCompilationUSB(); +PORT_SETTINGS.Add(0x03);\\ 
-</code> +PORT_SETTINGS.Add(0x02);\\ 
-<fc #6495ed>//Description//</fc>+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);\\
 \\ \\
-The method is used to load schematic to E2PROM through USB + 
-\\ +===Selfboot write ===
-Note: compilation is required before using this.  +
-\\ +
-\\ +
-===Erase ===+
 <code csharp> <code csharp>
-HResult EraseMemorythroughDSP ();+SELFBOOTWRITE(string cellName, string writeThrough);
 </code> </code>
 <fc #6495ed>//Description//</fc> <fc #6495ed>//Description//</fc>
 \\ \\
-The method is used to Erase the E2PROM. +The method is used to write through "DSP" or "USB" (USB currently not supported)
-\\+
 \\ \\
-===Export Data from E2PROM===+ 
 +===Selfboot Export===
 <code csharp> <code csharp>
-HResult ProjectExportSelfbootFiles(string path);+EXPORT_SELFBOOT_DATA(bool readThroughDSP, string fullyQualifiedFileName);
 </code> </code>
 <fc #6495ed>//Description//</fc> <fc #6495ed>//Description//</fc>
Line 1797: Line 1798:
 <fc #6495ed>//Parameters//</fc> <fc #6495ed>//Parameters//</fc>
 \\ \\
-Name:       path+Name:       projectexportFile
 \\ \\
 Type:       String Type:       String
Line 1806: Line 1807:
 \\ \\
 \\ \\
 +
 +===Selfboot Erase===
 +<code csharp>
 +SELFBOOTERASE(string cellName);
 +</code>
 +<fc #6495ed>//Description//</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(['install', 'pythonnet'])
 + import clr
 +
 +clr.AddReference('System.Collections')
 +from System.Collections.Generic import List
 +
 +PORT_SETTINGS = VARIANT(pythoncom.VT_ARRAY| pythoncom.VT_I4, [1048576,0x03,0x02,0x03,0x06,0xc7,10,10000,256,1,0])
 +
 +## This program is designed to test SigmaStudio scripting from Python. 
 +if __name__ == "__main__":     
 +    
 +    server = Dispatch('Analog.SigmaStudioServer.SigmaStudioServer')
 +    print('Running')
 +
 +    projectexportFile= "C:\Work\Test\Python1\SelfBootWrite_export" # Needs update
 +    projectexporteraseFile= "C:\Work\Test\Python1\SelfBootErase_export"  # Needs update 
 +    Cellname = 'IC 1'
 +    SelfbootThrough = 'DSP'
 +    
 +    status = server.SET_TIMEOUT(120) # 2 Min Needs update if erase or export of complete EEPROM
 +    print('set_timeout..')
 +    server.COMPILE_PROJECT
 +    
 +    print('Selfboot Port settings')
 +    # Arg1 - Cell name of SigmaDSP IC example: "IC 1"
 +    # Arg2 - EEPROM port settings
 +    server.SELFBOOT_PORT_SETTINGS(Cellname, PORT_SETTINGS)
 +    
 +    print('Selfboot write')
 +    # Arg1 - Cell name of SigmaDSP IC example: "IC 1"
 +    # Arg2 - write through "DSP" or "USB" (USB currently not supported)
 +    server.SELFBOOTWRITE(Cellname, SelfbootThrough)
 +    
 +    print('Selfboot Export')
 +    # Arg1 - True for DSP, False for USB (USB currently not supported)
 +    # Arg2 - Export file path
 +    server.EXPORT_SELFBOOT_DATA(True, projectexportFile)
 +    
 +    print('Selfboot Erase')
 +    # Arg1 - Cell name of SigmaDSP IC example: "IC 1"
 +    server.SELFBOOTERASE(Cellname);
 +    
 +    server.EXPORT_SELFBOOT_DATA(True, projectexporteraseFile)
 +    
 +    server.SAVE_PROJECT
 +    
 +
 +</code>
 +
 +
 +
 +
 ===== IPAT Options ===== ===== IPAT Options =====
 ===Write=== ===Write===
Line 1818: Line 1894:
 <fc #6495ed>//Description//</fc> <fc #6495ed>//Description//</fc>
 \\ \\
-The method is used to Write the values of the parameter to IPAT Address.+The method is used to Write / from Read the values of the parameter to/from IPAT Address.
 \\ \\
 \\ \\
 <fc #6495ed>//<fc #6495ed>Parameters</fc>//</fc> <fc #6495ed>//<fc #6495ed>Parameters</fc>//</fc>
 \\ \\
-Type & Name:       int numOfBytesToWrite+Type & Name:       int numOfBytesToWrite 
 \\ \\
 <fc #6495ed>//Description//</fc> <fc #6495ed>//Description//</fc>
 \\ \\
-Number of bytes in 'dataToWrite' to write to the dsp+Number of bytes in 'dataToWrite' to write to the dsp 
 \\ \\
 \\ \\
resources/tools-software/sigmastudio/usingsigmastudio/scripting/iscripted.1668408213.txt.gz · Last modified: 14 Nov 2022 07:43 by ananthakalyani Sankar