Documentation ¶
Index ¶
- type CECCTransition
- type Converter
- func (c *Converter) AddBlock(iec61499bytes []byte) error
- func (c *Converter) ConvertAll() ([]OutputFile, error)
- func (c *Converter) CvodeEnable() error
- func (c *Converter) DisableAlgorithmLanguageChecks()
- func (c *Converter) Flatten() error
- func (c *Converter) SetEventQueue()
- func (c *Converter) SetRunOnECC()
- func (c *Converter) SetTcrestIncludes()
- func (c *Converter) SetTcrestSmartSPM()
- func (c *Converter) SetTcrestUsingSPM()
- func (c *Converter) SetTopName(name string) error
- type ConverterSettings
- type CvodeInit
- type CvodeTick
- type OdeVar
- type OutputFile
- type SpecialIO
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CECCTransition ¶
CECCTransition is used with getCECCTransitionCondition to return results to the template
type Converter ¶
type Converter struct { Blocks []iec61499.FB ConverterSettings InstG []eca.InstanceNode // contains filtered or unexported fields }
Converter is the struct we use to store all blocks for conversion (and what we operate from)
func (*Converter) ConvertAll ¶
func (c *Converter) ConvertAll() ([]OutputFile, error)
ConvertAll converts iec61499 xml (stored as []FB) into vhdl []byte for each block (becomes []VHDLOutput struct) Returns nil error on success
func (*Converter) CvodeEnable ¶
CvodeEnable enables using C CVODE library from SUNDIALS to solve algorithms with 'ODE' and 'ODE_init' in comment fields
func (*Converter) DisableAlgorithmLanguageChecks ¶
func (c *Converter) DisableAlgorithmLanguageChecks()
DisableAlgorithmLanguageChecks prevents checking for compatible languages inside algorithms
func (*Converter) SetEventQueue ¶
func (c *Converter) SetEventQueue()
SetEventQueue sets that events will be queued and executed one by one, preventing events from being missed this is part of the IEC61499 revision 2 specification
func (*Converter) SetRunOnECC ¶
func (c *Converter) SetRunOnECC()
SetRunOnECC sets that ECCs will "run-on", rather than taking a single transition in a tick this is part of the IEC61499 revision 2 specification
func (*Converter) SetTcrestIncludes ¶
func (c *Converter) SetTcrestIncludes()
SetTcrestIncludes sets that the output fbtypes.h should include the TCREST headers than set and forget
func (*Converter) SetTcrestSmartSPM ¶
func (c *Converter) SetTcrestSmartSPM()
SetTcrestSmartSPM sets that the output should be formatted for T-CREST architecture and use the SPMs for BFB execution
func (*Converter) SetTcrestUsingSPM ¶
func (c *Converter) SetTcrestUsingSPM()
SetTcrestUsingSPM sets a flag that the output should be formatted for the TCREST architecture, specifically, it should put the FBs into SPM memory
func (*Converter) SetTopName ¶
SetTopName sets the IEC61499 top level entity to the name provided This checks to ensure a valid name
type ConverterSettings ¶
type ConverterSettings struct { TcrestUsingSPM bool TcrestSmartSPM bool TcrestIncludes bool IgnoreAlgorithmLanguages bool CvodeEnabled bool RunOnECC bool //Use IEC61499 v2 specification for ECC logic instead of synchronous logic (i.e. consume single event, run as far as possible vs. run single transition) EventQueue bool //Queue events and run them one by one, disallowing simultaneous events and greatly changing data passing logic }
ConverterSettings holds the settings for this conversion
type CvodeInit ¶
CvodeInit is used in templates when generating code from Cvode_init algorithms
func (CvodeInit) GetInitialValues ¶
type CvodeTick ¶
type CvodeTick struct { Vars []OdeVar //the internal vars such as X_dot EmitVars []OdeVar //the emitted vars such as Y }
CvodeTick is used to store variables and ode functions when processing ODE states
type OdeVar ¶
type OdeVar struct { VarName string VarValue string TriggerValue string //the trigger value (if any) (i.e. the crossing which might trigger a state change) }
OdeVar is a varname and a varvalue used to store variables and string functions
type OutputFile ¶
OutputFile is used when returning the converted data from the iec61499
type SpecialIO ¶
type SpecialIO struct { //Perhaps in future we will have special []Event and []Variable for normal event and data API InternalVars []iec61499.Variable }
SpecialIO is used to store internal variables that are "special" (i.e. exported because they are for debugging or service interfaces)
type TemplateData ¶
type TemplateData struct { ConverterSettings InstG []eca.InstanceNode BlockIndex int Blocks []iec61499.FB }
TemplateData is the structure used to hold data being passed into the templating engine