Documentation ¶
Index ¶
- func ClearLogs()
- func ParseXSIMReport(FolderPath string, Entity VHDL.VHDLEntity) error
- type Data
- type PowerReport
- type Report
- type RptDoc
- type Run
- type Timing
- type Utilization
- type VivadoTCL
- type VivadoTCLSettings
- type XSIM
- func (x *XSIM) CreateFile(PostSim bool)
- func (x *XSIM) Exec()
- func (x *XSIM) Funcsim()
- func (x *XSIM) SetTemplateMultiplier()
- func (x *XSIM) SetTemplateReverse()
- func (x *XSIM) SetTemplateScaler(N uint)
- func (x *XSIM) SetTemplateSequential(OutputSize uint)
- func (x *XSIM) SetTemplateSequentialScaler(N uint, OutputSize uint)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearLogs ¶
func ClearLogs()
ClearLogs is used to clear all Vivado logs within the main folder ending on *.jou and *.log
func ParseXSIMReport ¶
func ParseXSIMReport(FolderPath string, Entity VHDL.VHDLEntity) error
ParseXSIMReport parses the exported XSIM _xsimlog. If pattern "!!ERROR!!PATTERN!!" is detected, as used in all TBs, an error is thrown If an error is thrown, the Approxy model does not accurately describe the exported VHDL file
Types ¶
type Data ¶
Data is a struct containing Key/Value information. Used to add non-Vivado results to a Report, for example MeanAbsoluteError Can also be used to add misc. data to a Run, ie. parameters TODO : Replace by Go maps to improve efficiency
type PowerReport ¶
type PowerReport struct { EntityName string `json:"-"` //For identification, ignored when unmarshaling to JSON file TotalPower float64 //W DynamicPower float64 //W StaticPower float64 //W ConfidenceLevel string //High required }
PowerReport is a struct containing power results for a single design
func ParsePowerReport ¶
func ParsePowerReport(FolderPath string, Entity vhdl.VHDLEntity) *PowerReport
ParsePowerReport parses an Vivado XML power report, ignores irrelevant info and export data in the PowerReport struct The power report is named EntityName + "_post_place_power.rpt"
type Report ¶
type Report struct { EntityName string Util *Utilization Power *PowerReport Timing *Timing Other []Data }
Report is a struct containing all parsed Vivado report data of a single design, ie. a single multiplier, a scaled N=100 multiplier or a MAC
func CreateReport ¶
func CreateReport(FolderPath string, Entity VHDL.VHDLEntity) *Report
CreateReport creates a single report on basis of a VHDLEntity, requires Vivado reports to be available.
type RptDoc ¶
type RptDoc struct { XMLName xml.Name `xml:"RptDoc"` Text string `xml:",chardata"` Cmdline string `xml:"cmdline,attr"` Designname string `xml:"designname,attr"` Designstate string `xml:"designstate,attr"` Partname string `xml:"partname,attr"` Speedfile string `xml:"speedfile,attr"` Title string `xml:"title,attr"` Version string `xml:"version,attr"` Section []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Title string `xml:"title,attr"` Table struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Style string `xml:"style,attr"` Title string `xml:"title,attr"` UseFootnoteNumbers string `xml:"useFootnoteNumbers,attr"` Footnote struct { Text string `xml:",chardata"` AttrText string `xml:"text,attr"` } `xml:"footnote"` Tablerow []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Suppressoutput string `xml:"suppressoutput,attr"` Wordwrap string `xml:"wordwrap,attr"` Tablecell []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Contents string `xml:"contents,attr"` Halign string `xml:"halign,attr"` Type string `xml:"type,attr"` } `xml:"tablecell"` } `xml:"tablerow"` } `xml:"table"` Section []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Title string `xml:"title,attr"` Table struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Style string `xml:"style,attr"` Title string `xml:"title,attr"` UseFootnoteNumbers string `xml:"useFootnoteNumbers,attr"` Tablerow []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Suppressoutput string `xml:"suppressoutput,attr"` Wordwrap string `xml:"wordwrap,attr"` Tableheader []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Contents string `xml:"contents,attr"` Halign string `xml:"halign,attr"` Width string `xml:"width,attr"` } `xml:"tableheader"` Tablecell []struct { Text string `xml:",chardata"` Class string `xml:"class,attr"` Contents string `xml:"contents,attr"` Halign string `xml:"halign,attr"` Type string `xml:"type,attr"` Decimalplaces string `xml:"decimalplaces,attr"` } `xml:"tablecell"` } `xml:"tablerow"` } `xml:"table"` } `xml:"section"` } `xml:"section"` }
RptDoc encapsulates the power report XML exported by Vivado RptDoc was generated 2022-05-03 14:57:01 by rick on rivalo. Using 'zek' to convert XML to Golang This needs refactoring into a readable XML struct
type Run ¶
type Run struct { Name string Reports []Report ResultPath string `json:"-"` ReportPath string `json:"-"` Other []Data }
Run is a collection of Reports, used for comparing different multiplier designs. Reports can be added to the Run, the Run can be exported and modified to a local JSON file at any time. A Run is basically a very simple database for Vivado Reports of different multiplier designs.
func StartRun ¶
StartRun creates a new run if non-existant. Opens and modifies old run if does exist based upon name and reportpath
func (*Run) AddReport ¶
AddReport adds an Report to a Run, automatically removes duplicates on basis of EntityName, and updates JSON file
type Timing ¶
type Timing struct { EntityName string `json:"-"` //For identification, ignored when unmarshaling to JSON file EndPoint string WorstPath float64 //ns MaxFreq float64 //MHz }
Timing is a struct that contains timing information for a single design, only the worst or critical path is reported.
func ParseTimingReport ¶
func ParseTimingReport(FolderPath string, Entity VHDL.VHDLEntity) *Timing
ParseTimingReport parses the timing report exported by Vivado, it uses a hacky approach of string manipulation The timing report is named EntityName + "_post_place_time.rpt"
type Utilization ¶
type Utilization struct { EntityName string `json:"-"` //For identification, ignored when unmarshaling to JSON file TotalLUT int LogicLUT int LUTRAMs int SRLs int FFs int RAMB36 int RAMB18 int DSP int CARRY int }
Utilization is struct describing the physicial element utilization for a design
func ParseUtilizationReport ¶
func ParseUtilizationReport(FolderPath string, Entity VHDL.VHDLEntity) *Utilization
ParseUtilizationReport parses the exported Vivado utilization report using hacky string manipulation This is needed because Vivado can only report a spreadsheet report in GUI mode, not in batch mode (?) Heavy usage of horrible string manipulation in the next function, try to touch as little as possible
type VivadoTCL ¶
type VivadoTCL struct { FolderPath string TopName string FileName string Settings *VivadoTCLSettings }
VivadoTCL is a struct that contains the name and location of a generated Vivado TCL file See templates/vivado.tcl
func CreateVivadoTCL ¶
func CreateVivadoTCL(FolderPath string, FileName string, Entity VHDL.VHDLEntity, Settings *VivadoTCLSettings) *VivadoTCL
CreateVivadoTCL generates a Vivado TCL file named FileName within FolderPath, based on the top-level Entity and Settings
func (*VivadoTCL) Exec ¶
func (tcl *VivadoTCL) Exec()
Exec starts Vivado in Batch mode to execute the TCL file
func (*VivadoTCL) PowerPostPlacementGeneration ¶
func (tcl *VivadoTCL) PowerPostPlacementGeneration()
PowerPostPlacementGeneration creates and executes a TCL on basis of template reportpower.tcl Requires exported SAIF and post-PR checkpoint file
type VivadoTCLSettings ¶
type VivadoTCLSettings struct { PartName string OOC bool // Enables Out-of-Context synthesis NODSP bool // When TRUE disables the use of DSP slices for the synthesis of the design WriteCheckpoint bool // Enables exporting Checkpoints after synthesis and place+route Placement bool // Enables Placement Route bool // Enables Routing Funcsim bool // Note: Set to false to disable funcsim VHDL file for post-processing. Utilization bool // Enables Exporting of Utilization Report Hierarchical bool // Enables Hierachical Utilization Report //Note: Setting this to false, does break utilization report parsing Clk bool // Set this flag to TRUE if the design has a clock, else potentially breaking Timing bool }
VivadoTCLSettings contains all settings used in the TCL template for enabling/disabling functionality
type XSIM ¶
type XSIM struct { SimFile string //Points to TestBench File TopFile string //Points to TopLevel VHDL file TestFile string //Points to TestData used for XSIM Simulation TopEntityName string //TopLevel EntityName FolderPath string TemplateFile string //Points to Template for TestBench File VHDLEntities []VHDL.VHDLEntity //Array of VHDLEntities (generated by GenerateVHDLEntityArray()) BitSize uint OutputSize uint ScaleN uint // How many entities are being simulated, used if Scaler model PostSim bool // True for PostSim, used for power simulation }
XSIM contains all information needed for creating and running XSIM simulations, furthermore it contains data for the TB templates
func CreateXSIM ¶
func CreateXSIM(FolderPath string, SimName string, VHDLEntities []VHDL.VHDLEntity) *XSIM
CreateXSIM creates an XSIM environment on bases of an array of VHDLEntities TopEntity at index[0]!
func (*XSIM) CreateFile ¶
CreateFile recreates TB File, neccesary for PostPlacement sim after behavioural analysis PostSim here is a bool that switches defined pre/post blocks within TB templates
func (*XSIM) Funcsim ¶
func (x *XSIM) Funcsim()
Funcsim does not(!) create a TB, but runs a PostPlacement analysis on the current available TB and dumps SAIF
func (*XSIM) SetTemplateMultiplier ¶
func (x *XSIM) SetTemplateMultiplier()
SetTemplateMultiplier sets TB to default uniform testing for single multipliers
func (*XSIM) SetTemplateReverse ¶
func (x *XSIM) SetTemplateReverse()
SetTemplateReverse Set TB to not functionally verify model, but retreive data instead, used by vhdl/External.go
func (*XSIM) SetTemplateScaler ¶
SetTemplateScaler sets TB to Multiplier sweep for Scaler (vhdl/Scaler.go) entities (N=amount)
func (*XSIM) SetTemplateSequential ¶
SetTemplateSequential sets TB to Sequential Multiplier testing for single MAC
func (*XSIM) SetTemplateSequentialScaler ¶
SetTemplateSequentialScaler sets TB to Sequential Multiplier testing for scaled MACs