18 set path [
file normalize "[
file dirname [
info script]]/.."]
23 Msg Info "Usage: make_sigasi_csv <project name>"
26 set project_name [
lindex $argv 0]
27 set project_file [
file normalize $path/../../Projects/$project_name/$project_name.xpr]
29 if {[
file exists $project_file]} {
30 Msg Info "Opening existing project file $project_file..."
31 open_project -quiet $project_file
33 Msg Info "Creating project: $project_name..."
34 source $path/../../Top/$project_name/$project_name.tcl
38 set csv_name "${project_name}_sigasi_sim.csv"
40 Msg Info "Generating IP targets for simulations..."
41 foreach ip [get_ips] {
42 set targets [list_targets [get_files [
file tail [get_property IP_FILE $ip]]]]
43 if { [ lsearch -exact $targets simulation] >= 0 } {
44 generate_target simulation $ip
46 Msg Warning "IP $ip is not a simulation target, skipping..."
54 Msg Info "Creating sigasi csv file for simulation $csv_name..."
55 set source_files [get_files -filter {(FILE_TYPE == VHDL || FILE_TYPE == "VHDL 2008" || FILE_TYPE == VERILOG || FILE_TYPE == SYSTEMVERILOG) && USED_IN_SIMULATION == 1 }]
56 set csv_file [open $old_path/$csv_name w]
57 foreach source_file $source_files {
58 puts $csv_file [
concat [ get_property LIBRARY $source_file] "," $source_file]
63 set csv_name "${project_name}_sigasi_synth.csv"
64 Msg Info "Generating IP targets for synthesis..."
65 foreach ip [get_ips] {
66 generate_target synthesis $ip
69 Msg Info "Creating sigasi csv file for synthesis $csv_name..."
70 set source_files [get_files -filter {(FILE_TYPE == VHDL || FILE_TYPE == "VHDL 2008" || FILE_TYPE == VERILOG || FILE_TYPE == SYSTEMVERILOG) && USED_IN_SYNTHESIS == 1 }]
71 set csv_file [open $old_path/$csv_name w]
72 foreach source_file $source_files {
73 puts $csv_file [
concat [ get_property LIBRARY $source_file] "," $source_file]