Rupert Swarbrick | 299cae5 | 2020-05-05 11:11:06 +0100 | [diff] [blame] | 1 | # Copyright lowRISC contributors. |
| 2 | # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | # TCL file invoked from VCS's simv at run-time using this: -ucli -do <this file> |
| 6 | |
| 7 | # Get some environment variables we need. |
| 8 | set en_waves 0 |
| 9 | set tool_srcs_dir "" |
| 10 | if {[info exists ::env(EN_WAVES)]} { |
| 11 | set en_waves "$::env(EN_WAVES)" |
| 12 | } |
| 13 | if {[info exists ::env(TOOL_SRCS_DIR)]} { |
| 14 | set tool_srcs_dir "$::env(TOOL_SRCS_DIR)" |
| 15 | } else { |
| 16 | puts "ERROR: tool script run without TOOL_SRCS_DIR environment variable." |
| 17 | quit |
| 18 | } |
| 19 | |
| 20 | # If wave dumping is enabled, run waves.tcl |
| 21 | if {"$en_waves" == 1} { |
| 22 | source "${tool_srcs_dir}/waves.tcl" |
| 23 | } |
| 24 | |
| 25 | run |
| 26 | quit |