@@ -52,12 +52,14 @@ namespace eval ::osvvm {
5252#
5353proc CreateDryRunDict {ProFileToBuild} {
5454 # CreateDryRunDict runs a build script in DryRunMode and
55- # creates dictionaries of Analyze and Simulate information.
55+ # creates dictionaries and lists of Analyze and Simulate information.
5656 # The Analyze dictionary, ::osvvm::AnalyzeDict, has a dictionary
57- # for each library used. For each library there is an array of
57+ # for each library used. For each library there is an list of
5858 # dictionaries that contain the file analyzed as well as language version used.
59+ # The list, ::osvvm::AnalyzeOrderList, has a list of dictionaries
60+ # that contain the file name, library, and vhdl version.
5961 # The Simulation dictionary, ::osvvm::SimulateDict, has a dictionary
60- # for each library used. For each library there is an array of
62+ # for each library used. For each library there is an list of
6163 # dictionaries that contain information passed to simulate.
6264 #
6365 # ProFileToBuild - Path to the pro file that build the entire design.
@@ -103,7 +105,7 @@ proc CreateVhdlLsToml {ProFileToBuild {WhereToCreate .}} {
103105 set TomlHomeDir [file normalize $WhereToCreate ]
104106 set TomlFile [open [file join $TomlHomeDir vhdl_ls.toml] w]
105107
106- puts $TomlFile " # Generated by OSVVM's CreateToml "
108+ puts $TomlFile " # Generated by OSVVM's CreateVhdlLsToml "
107109 puts $TomlFile " \[ Libraries\] "
108110
109111 foreach key [dict keys $AnalyzeDict ] {
@@ -119,12 +121,39 @@ proc CreateVhdlLsToml {ProFileToBuild {WhereToCreate .}} {
119121 close $TomlFile
120122}
121123
124+ proc CreateAnalyzeOrderCsv {ProFileToBuild {WhereToCreate .}} {
125+ # CreateAnalyzeOrderCsv runs a build script in DryRunMode and
126+ # creates a AnalyzeOrder.csv file.
127+ #
128+ # ProFileToBuild - Path to the pro file that build the entire design.
129+ # WhereToCreate - Directory into which to create vhdl_ls.toml. Default = .
130+ #
131+ variable AnalyzeOrderList
132+
133+ # Create AnalyzeDict for the ProFileToBuild script
134+ CreateDryRunDict $ProFileToBuild
135+
136+ set HomeDir [file normalize $WhereToCreate ]
137+ set CsvFile [open [file join $HomeDir AnalyzeOrder.csv] w]
138+
139+ # puts $CsvFile "# Generated by OSVVM's CreateAnalyzeOrderCsv"
140+
141+ foreach FileDict $::osvvm::AnalyzeOrderList {
142+ if {[info exists PrintString]} {puts $CsvFile " ${PrintString} ," }
143+ set PrintString [dict get $FileDict FileName]
144+ puts $CsvFile " [ dict get $FileDict FileName] ,"
145+ }
146+ puts $CsvFile " ${PrintString} "
147+ close $CsvFile
148+ }
149+
122150
123151# Don't export the following due to conflicts with Tcl built-ins
124152# map
125153
126154namespace export CreateDryRunDict
127155namespace export CreateVhdlLsToml
156+ namespace export CreateAnalyzeOrderCsv
128157
129158
130159
0 commit comments