《Altium_SDK__-_Technical_Reference_-_FPGA_API.pdf》由会员分享,可在线阅读,更多相关《Altium_SDK__-_Technical_Reference_-_FPGA_API.pdf(182页珍藏版)》请在三一文库上搜索。
1、Technical Reference - FPGA API This Reference provides a concise reference of the FPGA API as part of the Altium Designer Run Time Library. The FPGA Application Programming Interface reference covers interfaces for FPGA objects in the FPGA Object Model for the Altium Designer application. The FPGA i
2、nterfaces exist as long there are associated existing objects in memory, thus when writing a script or server code, you have the responsibility of checking whether the interface you wish to query exists or not before you proceed to invoke the interfaces methods. To obtain the interface which represe
3、nts the FPGA work bench object, invoke the GetNexusWorkbench function in your script which returns you the INexusWorkbench interface. Which you can then extract data from FPGA objects and invoke FPGA objects methods. Example NexusWorkBench := GetNexusWorkbench; If NexusWorkBench.GetSoftDeviceCount 0
4、 Then SoftDeviceCount := NexusWorkBench.GetSoftDeviceCount Else Exit; FPGA API components The FPGA API is covered in three separate files; RT_FPGA, RT_NexusWorkspace and RT_NexusDevice units. Main FPGA Interfaces The INexusWorkbench interface is the main interface in FPGA API. To use FPGA interfaces
5、, invoke the GetNexusWorkbench function to retrieve the INexusWorkbench interface. Script Examples There are FPGA script examples in the ExamplesScriptsDelphiScript* *FPGA folder which demonstrate the use of FPGA interfaces. FPGA Interfaces Overview When you need to deal with the objects associated
6、with the NanoBoard and the FPGA editor software, the starting point is to invoke the GetNexusWorkbench function or the GetDeviceManager function in your script. This function returns you the INexusWorkbench object interface or the IDeviceManager object interface. Main interfaces for the Nexus WorkBe
7、nch INexusWorkbench IProjectLink IPCBProjectLink Main interfaces for the Nexus Devices INexusDevice INexusBreakpoint IMemorySpace IProcessorRegister IInstrumentView IJTagChannel IBSDLObject IBSDLEntity IScanPin IPinMapping IBoundaryCell IInstructionOpCode IRegisterAssociation IDeviceInformation FPGA
8、 low level routines Constants Types Functions Classes Nexus WorkBench Interfaces (RT_NexusWo rkSpace unit) Nexus WorkBench Interfaces INexusWorkBench and its interfaces IDeviceLink interface INexusCore interface INexusWorkBench interface INexusNotification interface IPCBProjectLink interface IProjec
9、tLink interface ISchComponentLink interface Constants Nexus Notifications values cNexusDeviceStatusesChanged = 0; cNexusHardDeviceChainChanged = 1; cNexusSoftDeviceChainChanged = 2; cNexusCurrentHardDeviceChanged = 3; cNexusCurrentSoftDeviceChanged = 4; cNexusProjectCoreTreeChanged = 5; cNexusProces
10、sFlowStatusChanged = 6; cNexusConnectionStatusChanged = 7; cNexusCurrentBoardDeviceChanged = 8; cNexusBoardDeviceChainChanged = 9; cNexusProjectListChanged = 10; cNexusOnIdle = 11; cNexusBeginUpdate = 12; cNexusEndUpdate = 13; Nexus Parameter Names cNexusParameterName_Device = NEXUS_JTAG_DEVICE; cNe
11、xusParameterName_Connector = NEXUS_JTAG_CONNECTOR; cNexusParameterName_Order = NEXUS_JTAG_ORDER; cNexusParameterName_Index = NEXUS_JTAG_INDEX; cNexusParameterName_Core = NEXUS_CORE; cNexusParameterName_FPGA = NEXUS_FPGA_DEVICE; cNexusParameterName_MemoryDepth = Memory_Depth; cNexusParameterName_Memo
12、ryWidth = Memory_Width; cNexusParameterName_MemoryDepthA = Memory_DepthA; cNexusParameterName_MemoryWidthA = Memory_WidthA; cNexusParameterName_MemoryDepthB = Memory_DepthB; cNexusParameterName_MemoryWidthB = Memory_WidthB; cNexusParameterName_MemoryType = Memory_Type; cNexusParameterName_MemoryUse
13、= Memory_Use; cNexusParameterName_MemoryClockEdge = Memory_ClockEdge; cNexusParameterName_MemoryEnablePin = Memory_EnablePin; cNexusParameterName_MemoryContentFile = Memory_ContentFile; cNexusParameterName_MemoryProgramFile = Memory_ProgramFile; cNexusParameterName_MemoryResetPin = Memory_ResetPin;
14、cNexusParameterName_MemoryByteIndex = Memory_ByteIndex; cNexusParameterName_MemoryHalfIndex = Memory_HalfIndex; cNexusParameterName_MemoryByteWrites = Memory_ByteWrites; cNexusParameterName_ClockCount = Clk_Count; cNexusParameterName_ClockInputFrequency = Clk_InputFreq_MHz; cNexusParameterName_Clock
15、AOperation = ClkA_Operation; cNexusParameterName_ClockBOperation = ClkB_Operation; cNexusParameterName_ClockCOperation = ClkC_Operation; cNexusParameterName_ClockDOperation = ClkD_Operation; cNexusCoreKindString cNexusCoreKindString : ArrayTNexusCoreKind Of WideString = ( eNexusCoreKind_None None ,
16、eNexusCoreKind_Processor_OCDS Processor_OCDS , eNexusCoreKind_Processor_Standard Processor_Normal , eNexusCoreKind_Processor_Hard Processor_Hard , eNexusCoreKind_Memory_Program Memory_Program , eNexusCoreKind_Memory_Data Memory_Data , eNexusCoreKind_Instrument Instrument , eNexusCoreKind_ClockManage
17、r ClockManager ); cNexusCoreInstancePrefixString cNexusCoreInstancePrefixString : ArrayTNexusCoreKind Of WideString = ( eNexusCoreKind_None , eNexusCoreKind_Processor_OCDS , eNexusCoreKind_Processor_Standard , eNexusCoreKind_Processor_Hard , eNexusCoreKind_Memory_Program Memory_, eNexusCoreKind_Memo
18、ry_Data Memory_, eNexusCoreKind_Instrument , eNexusCoreKind_ClockManager Clock_ ); cConfigurableComponentInstancePrefix cConfigurableComponentInstancePrefix = Configurable_; cNexusProcessorsAndHardProcessor cNexusProcessorsAndHardProcessor : Set Of TNexusCoreKind = eNexusCoreKind_Processor_OCDS, eNe
19、xusCoreKind_Processor_Standard, eNexusCoreKind_Processor_Hard ; cNexusProcessors cNexusProcessors : Set Of TNexusCoreKind = eNexusCoreKind_Processor_OCDS, eNexusCoreKind_Processor_Standard ; cNexusInstruments cNexusInstruments : Set Of TNexusCoreKind = eNexusCoreKind_Processor_OCDS, eNexusCoreKind_I
20、nstrument ; cNexusMemories cNexusMemories : Set Of TNexusCoreKind = eNexusCoreKind_Memory_Data, eNexusCoreKind_Memory_Program ; cNexusClockManagers cNexusClockManagers : Set Of TNexusCoreKind = eNexusCoreKind_ClockManager ; Types TNexusCoreKind = (eNexusCoreKind_None, eNexusCoreKind_Processor_OCDS,
21、eNexusCoreKind_Processor_Standard, eNexusCoreKind_Processor_Hard, eNexusCoreKind_Memory_Program, eNexusCoreKind_Memory_Data, eNexusCoreKind_Instrument, eNexusCoreKind_ClockManager); Functions Function GetNexusWorkbench : INexusWorkbench; SafeCall; Function GetNexusCoreKindFromParameters (Parameters
22、: PChar) : TNexusCoreKind; Function GetNexusCoreKindFromString (S : TDynamicString) : TNexusCoreKind; IDeviceLink Interface IDeviceLink Interface Overview The IDeviceLink interface hierarchy is as follows; IDeviceLink methods ProcessFlow IDeviceLink properties DownloadFlow AnyFlowsRunning GetParent
23、GetChildCount GetChild GetNexusDevice GetNexusCore GetProject GetConfiguration GetJTAGDevice GetDeviceName GetUniqueDescription GetIndex GetParentIndex GetJTAGIndex GetShortDescription See also AnyFlowsRunning method (IDeviceLink interface) Syntax Function AnyFlowsRunning : Boolean; Description Exam
24、ple See also IDeviceLink interface DownloadFlow method (IDeviceLink interface) Syntax Function DownloadFlow : IProcessFlow; Description Example See also IDeviceLink interface GetChild method (IDeviceLink interface) Syntax Function GetChild(Index : Integer) : IDeviceLink; Description Example See also
25、 IDeviceLink interface GetChildCount method (IDeviceLink interface) Syntax Function GetChildCount : Integer; Description Example See also IDeviceLink interface GetConfiguration method (IDeviceLink interface) Syntax Function GetConfiguration : WideString; Description Example See also IDeviceLink inte
26、rface GetDeviceName method (IDeviceLink interface) Syntax Function GetDeviceName : WideString; Description Example See also IDeviceLink interface GetIndex method (IDeviceLink interface) Syntax Function GetIndex : Integer; Description Example See also IDeviceLink interface GetJTAGDevice method (IDevi
27、ceLink interface) Syntax Function GetJTAGDevice : IJTAGDevice; Description Example See also IDeviceLink interface GetJTAGIndex method (IDeviceLink interface) Syntax Function GetJTAGIndex : Integer; Description Example See also IDeviceLink interface GetNexusCore method (IDeviceLink interface) Syntax
28、Function GetNexusCore : INexusCore; Description Example See also IDeviceLink interface GetNexusDevice method (IDeviceLink interface) Syntax Function GetNexusDevice : INexusDevice; Description Example See also IDeviceLink interface GetParent method (IDeviceLink interface) Syntax Function GetParent :
29、IDeviceLink; Description Example See also IDeviceLink interface GetParentIndex method (IDeviceLink interface) Syntax Function GetParentIndex : Integer; Description Example See also IDeviceLink interface GetProject method (IDeviceLink interface) Syntax Function GetProject : IProject; Description Exam
30、ple See also IDeviceLink interface GetShortDescription method (IDeviceLink interface) Syntax Function GetShortDescription : WideString; Description Example See also IDeviceLink interface GetUniqueDescription method (IDeviceLink interface) Syntax Function GetUniqueDescription : WideString; Descriptio
31、n Example See also IDeviceLink interface ProcessFlow method (IDeviceLink interface) Syntax Function ProcessFlow : IProcessFlow; Description Example See also IDeviceLink interface INexusCore Interface INexusCore Interface Overview The INexusCore interface hierarchy is as follows; INexusCore methods G
32、etEmbeddedProject INexusCore properties GetFPGAProject DownloadProgramMemory GetNexusWorkbench GetEmbeddedProjectPath GetFPGAProjectPath GetCoreKind GetComponentDesignator GetBaseComponentDesignator GetLibraryReference GetComponentDocumentPath GetHexFilePath GetJTagIndex_FromCore GetHexFilename GetH
33、exFileState GetUniqueId GetDescription MatchesOtherCore Import_FromParameters Export_ToParameters SupportsParameter GetParameterValue Export_CoreGenParameters FindFileInProjectPaths GetChildCore GetChildCoreDesignator GetChildCoreCount GetCrossViewProcessId SetCrossViewProcessId CrossProbe GetChildP
34、rogramMemoryCore SetEmbeddedProjectPath UpdateHexFileState GetChildProgramMemoryCoreCount Import_FromParameterString Export_ToParameterString Export_CoreGenParametersToString See also CrossProbe method (INexusCore interface) Syntax Procedure CrossProbe; Description Example See also INexusCore interf
35、ace DownloadProgramMemory method (INexusCore interface) Syntax Procedure DownloadProgramMemory(NexusDevice : INexusDevice); Description Example See also INexusCore interface Export_CoreGenParameters method (INexusCore interface) Syntax Procedure Export_CoreGenParameters(Parameters : PChar); Descript
36、ion Example See also INexusCore interface Export_CoreGenParametersToString method (INexusCore interface) Syntax Function Export_CoreGenParametersToString : WideString; Description Example See also INexusCore interface Export_ToParameters method (INexusCore interface) Syntax Procedure Export_ToParame
37、ters (Parameters : PChar); Description Example See also INexusCore interface Export_ToParameterString method (INexusCore interface) Syntax Function Export_ToParameterString : WideString; Description Example See also INexusCore interface FindFileInProjectPaths method (INexusCore interface) Syntax Fun
38、ction FindFileInProjectPaths(FileName : WideString) : WideString; Description Example See also INexusCore interface GetBaseComponentDesignator method (INexusCore interface) Syntax Function GetBaseComponentDesignator : WideString; Description Example See also INexusCore interface GetChildCore method
39、(INexusCore interface) Syntax Function GetChildCore (Index : Integer ) : INexusCore; Description Example See also INexusCore interface GetChildCoreCount method (INexusCore interface) Syntax Function GetChildCoreCount : Integer; Description Example See also INexusCore interface GetChildCoreDesignator
40、 method (INexusCore interface) Syntax Function GetChildCoreDesignator(Index : Integer ) : WideString; Description Example See also INexusCore interface GetChildProgramMemoryCore method (INexusCore interface) Syntax Function GetChildProgramMemoryCore(Index : Integer = 0) : INexusCore; Description Exa
41、mple See also INexusCore interface GetChildProgramMemoryCoreCount method (INexusCore interface) Syntax Function GetChildProgramMemoryCoreCount : Integer; Description Example See also INexusCore interface GetComponentDesignator method (INexusCore interface) Syntax Function GetComponentDesignator : Wi
42、deString; Description Example See also INexusCore interface GetComponentDocumentPath method (INexusCore interface) Syntax Function GetComponentDocumentPath : WideString; Description Example See also INexusCore interface GetCoreKind method (INexusCore interface) Syntax Function GetCoreKind : TNexusCo
43、reKind; Description Example See also INexusCore interface GetCrossViewProcessId method (INexusCore interface) Syntax Function GetCrossViewProcessId : Integer; Description Example See also INexusCore interface GetDescription method (INexusCore interface) Syntax Function GetDescription : WideString; D
44、escription Example See also INexusCore interface GetEmbeddedProject method (INexusCore interface) Syntax Function GetEmbeddedProject : IProject; Description Example See also INexusCore interface GetEmbeddedProjectPath method (INexusCore interface) Syntax Function GetEmbeddedProjectPath : WideString;
45、 Description Example See also INexusCore interface GetFPGAProject method (INexusCore interface) Syntax Function GetFPGAProject : IProject; Description Example See also INexusCore interface GetFPGAProjectPath method (INexusCore interface) Syntax Function GetFPGAProjectPath : WideString; Description E
46、xample See also INexusCore interface GetHexFilename method (INexusCore interface) Syntax Function GetHexFilename : WideString; Description Example See also INexusCore interface GetHexFilePath method (INexusCore interface) Syntax Function GetHexFilePath : WideString; Description Example See also INex
47、usCore interface GetHexFileState method (INexusCore interface) Syntax Function GetHexFileState : TFlowState; Description Example See also INexusCore interface GetJTagIndex_FromCore method (INexusCore interface) Syntax Function GetJTagIndex_FromCore : Integer; Description Example See also INexusCore
48、interface GetLibraryReference method (INexusCore interface) Syntax Function GetLibraryReference : WideString; Description Example See also INexusCore interface GetNexusWorkbench method (INexusCore interface) Syntax Function GetNexusWorkbench : INexusWorkbench; Description This method retrieves the Nexus workbench which encapsulates the workbench. You can use this interface to retrieve interfaces representing objects associated with this nexus workbenc