Skip to content

Commit

Permalink
fpga: Corrected vivado sim script
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilKoe committed Sep 6, 2023
1 parent e9ee56b commit 746cee6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions target/xilinx/sim/setup_simulation.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,20 @@ if { $argc == 1 } {

puts "Running with SIMULATOR_PATH=$::env(SIMULATOR_PATH) ; GCC_PATH=$::env(GCC_PATH) ; XILINX_SIMLIB_PATH=$::env(XILINX_SIMLIB_PATH)"

# If you do this part from GUI :
# -simulator questa
# -simulator_exec_path {/usr/pack/questa-2022.3-bt/questasim/bin}
# -gcc_exec_path {/usr/pack/questa-2022.3-bt/questasim/gcc-7.4.0-linux_x86_64/bin}
# -family ...
# -library unisim
# -dir {~/xlib_questa-2022.3}
# Compile the vivado simlib to XILINX_SIMLIB_PATH
if { $command == "compile_simlib" } {
compile_simlib -simulator questa -simulator_exec_path {$::env(SIMULATOR_PATH)} \
-gcc_exec_path {$::env(GCC_PATH)} -family all \
-language verilog -dir {$::env(XILINX_SIMLIB_PATH)} -verbose
set command "compile_simlib -simulator questa -simulator_exec_path {$::env(SIMULATOR_PATH)} \
-gcc_exec_path {$::env(GCC_PATH)} -family all -language verilog -library all -dir {$::env(XILINX_SIMLIB_PATH)} -force"
# For some reason this command does not work well when not eval from the string
eval $command

# Export simulation scripts for each ip
} elseif { $command == "export_simulation" } {
open_project $::env(VIVADO_PROJECT)
export_simulation -simulator questa -directory "./ips" -lib_map_path "$::env(XILINX_SIMLIB_PATH)" \
-absolute_path -force -of_objects [get_ips *]

# Unknown command
} else {
puts "[$argv0] Unknown command: $command"
}
2 changes: 1 addition & 1 deletion target/xilinx/sim/simulate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

CHS_XIL_SIM_DIR ?= $(CHS_XIL_DIR)/sim

XILINX_SIMLIB_PATH ?= ~/xlib_questa-2022.3_vivado-2022.1
XILINX_SIMLIB_PATH ?= /home/$(USER)/xlib_questa-2022.3_vivado-2022.1
SIMULATOR_PATH ?= /usr/pack/questa-2022.3-bt/questasim/bin
GCC_PATH ?= /usr/pack/questa-2022.3-bt/questasim/gcc-7.4.0-linux_x86_64/bin

Expand Down

0 comments on commit 746cee6

Please sign in to comment.