Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tclapp/xilinx/projutils/app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<catalog>
<apps>
<app>
<revision_history>reference xilinx_vip include directory for ovm/uvm based designs</revision_history>
<revision_history>reference xilinx_vip packages for the non-precompile export simulation flow</revision_history>
<name>projutils</name>
<pkg_require>Vivado 2014.1</pkg_require>
<company>xilinx</company>
Expand Down
8 changes: 8 additions & 0 deletions tclapp/xilinx/projutils/export_simulation.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -3441,6 +3441,7 @@ proc xps_write_xsim_setup_file { launch_dir } {

variable a_sim_vars
variable l_compiled_libraries
variable a_sim_sv_pkg_libs
set top $a_sim_vars(s_top)
set filename "xsim.ini"
set file [file normalize "$launch_dir/$filename"]
Expand All @@ -3456,6 +3457,13 @@ proc xps_write_xsim_setup_file { launch_dir } {
puts $fh "$lib=xsim.dir/$lib_name"
}

# if xilinx_vip packages referenced, add mapping
if { [llength $a_sim_sv_pkg_libs] > 0 } {
set lmp [xps_get_lib_map_path "xsim"]
set library "xilinx_vip"
puts $fh "$library=$lmp/ip/$library"
}

# reference XPM modules from precompiled libs if param is set
set b_reference_xpm_library 0
[catch {set b_reference_xpm_library [get_param project.usePreCompiledXPMLibForSim]} err]
Expand Down
2 changes: 1 addition & 1 deletion tclapp/xilinx/projutils/pkgIndex.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded ::tclapp::xilinx::projutils 3.274 [list source [file join $dir projutils.tcl]]
package ifneeded ::tclapp::xilinx::projutils 3.275 [list source [file join $dir projutils.tcl]]
2 changes: 1 addition & 1 deletion tclapp/xilinx/projutils/projutils.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ namespace eval ::tclapp::xilinx::projutils {
lappend ::auto_path $home
}
}
package provide ::tclapp::xilinx::projutils 3.274
package provide ::tclapp::xilinx::projutils 3.275
1 change: 1 addition & 0 deletions tclapp/xilinx/projutils/revision_history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
3.275 reference xilinx_vip packages for the non-precompile export simulation flow
3.273 reference xilinx_vip include directory for ovm/uvm based designs
3.272 skip project properties if not end with cache or ip_user_files
3.270 support for creating custom project with new -project_name switch
Expand Down
2 changes: 1 addition & 1 deletion tclapp/xilinx/xsim/app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<catalog>
<apps>
<app>
<revision_history>reference xilinx_vip include directory for ovm/uvm based designs</revision_history>
<revision_history>reference xilinx_vip packages for the non-precompile simulation flow</revision_history>
<name>xsim</name>
<pkg_require>Vivado 2014.1</pkg_require>
<company>xilinx</company>
Expand Down
2 changes: 1 addition & 1 deletion tclapp/xilinx/xsim/pkgIndex.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded ::tclapp::xilinx::xsim 2.180 [list source [file join $dir xsim.tcl]]
package ifneeded ::tclapp::xilinx::xsim 2.181 [list source [file join $dir xsim.tcl]]
1 change: 1 addition & 0 deletions tclapp/xilinx/xsim/revision_history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2.181 reference xilinx_vip packages for the non-precompile simulation flow
2.180 reference xilinx_vip include directory for ovm/uvm based designs
2.179 wrap view option value for wcfg file in curly braces if contain spaces
2.178 fetch requires_vip property on the fetched IP object
Expand Down
41 changes: 41 additions & 0 deletions tclapp/xilinx/xsim/sim.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,39 @@ proc usf_xsim_setup_args { args } {
}
}

proc usf_xsim_get_compiled_library_dir {} {
# Summary:
# Argument Usage:
# Return Value:

variable a_sim_vars

set filename "xsim.ini"
set clibs_dir {}
# 1. is -lib_map_path specified and point to valid location?
if { [string length $a_sim_vars(s_lib_map_path)] > 0 } {
set clibs_dir [file normalize $a_sim_vars(s_lib_map_path)]
set ini_file "$clibs_dir/$filename"
if { [file exists $ini_file] } {
return $clibs_dir
}
}

# 2. if empty property (default), calculate default install location
set clibs_dir [get_property "COMPXLIB.XSIM_COMPILED_LIBRARY_DIR" [current_project]]
if { {} == $clibs_dir } {
set clibs_dir $::env(XILINX_VIVADO)
set clibs_dir [file normalize [file join $clibs_dir "data/xsim"]]
}
set ini_file "$clibs_dir/$filename"
if { [file exists $ini_file] } {
return $clibs_dir
}

# not found, return empty
return $clibs_dir
}

proc usf_xsim_verify_compiled_lib {} {
# Summary:
# Argument Usage:
Expand Down Expand Up @@ -654,6 +687,7 @@ proc usf_xsim_write_setup_file {} {
# Return Value:

variable a_sim_vars
variable a_sim_sv_pkg_libs
variable l_compiled_libraries
set top $::tclapp::xilinx::xsim::a_sim_vars(s_sim_top)
set dir $::tclapp::xilinx::xsim::a_sim_vars(s_launch_dir)
Expand All @@ -674,6 +708,13 @@ proc usf_xsim_write_setup_file {} {
puts $fh "$lib=$a_sim_vars(compiled_design_lib)/$lib_name"
}

# if xilinx_vip packages referenced, add mapping
if { [llength $a_sim_sv_pkg_libs] > 0 } {
set library "xilinx_vip"
set cxl_prop_dir [usf_xsim_get_compiled_library_dir]
puts $fh "$library=[usf_resolve_compiled_library_dir $cxl_prop_dir $library]"
}

# reference XPM modules from precompiled libs if param is set
set b_reference_xpm_library 0
[catch {set b_reference_xpm_library [get_param project.usePreCompiledXPMLibForSim]} err]
Expand Down
2 changes: 1 addition & 1 deletion tclapp/xilinx/xsim/xsim.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ namespace eval ::tclapp::xilinx::xsim {
lappend ::auto_path $home
}
}
package provide ::tclapp::xilinx::xsim 2.180
package provide ::tclapp::xilinx::xsim 2.181