OpenCores
URL https://opencores.org/ocsvn/aes-128-ecb-encoder/aes-128-ecb-encoder/trunk

Subversion Repositories aes-128-ecb-encoder

[/] [aes-128-ecb-encoder/] [trunk/] [fpga/] [aes128_ecb_2017/] [aes128_ecb.ip_user_files/] [sim_scripts/] [clk_gen/] [ies/] [clk_gen.sh] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 vv_gulyaev
#!/bin/bash -f
2
#*********************************************************************************************************
3
# Vivado (TM) v2017.4 (64-bit)
4
#
5
# Filename    : clk_gen.sh
6
# Simulator   : Cadence Incisive Enterprise Simulator
7
# Description : Simulation script for compiling, elaborating and verifying the project source files.
8
#               The script will automatically create the design libraries sub-directories in the run
9
#               directory, add the library logical mappings in the simulator setup file, create default
10
#               'do/prj' file, execute compilation, elaboration and simulation steps.
11
#
12
# Generated by Vivado on Thu Jul 23 09:42:11 MSK 2020
13
# SW Build 2086221 on Fri Dec 15 20:54:30 MST 2017
14
#
15
# Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.
16
#
17
# usage: clk_gen.sh [-help]
18
# usage: clk_gen.sh [-lib_map_path]
19
# usage: clk_gen.sh [-noclean_files]
20
# usage: clk_gen.sh [-reset_run]
21
#
22
# Prerequisite:- To compile and run simulation, you must compile the Xilinx simulation libraries using the
23
# 'compile_simlib' TCL command. For more information about this command, run 'compile_simlib -help' in the
24
# Vivado Tcl Shell. Once the libraries have been compiled successfully, specify the -lib_map_path switch
25
# that points to these libraries and rerun export_simulation. For more information about this switch please
26
# type 'export_simulation -help' in the Tcl shell.
27
#
28
# You can also point to the simulation libraries by either replacing the <SPECIFY_COMPILED_LIB_PATH> in this
29
# script with the compiled library directory path or specify this path with the '-lib_map_path' switch when
30
# executing this script. Please type 'clk_gen.sh -help' for more information.
31
#
32
# Additional references - 'Xilinx Vivado Design Suite User Guide:Logic simulation (UG900)'
33
#
34
#*********************************************************************************************************
35
 
36
# Directory path for design sources and include directories (if any) wrt this path
37
ref_dir="."
38
 
39
# Override directory with 'export_sim_ref_dir' env path value if set in the shell
40
if [[ (! -z "$export_sim_ref_dir") && ($export_sim_ref_dir != "") ]]; then
41
  ref_dir="$export_sim_ref_dir"
42
fi
43
 
44
# Set the compiled library directory
45
ref_lib_dir="."
46
 
47
# Command line options
48
irun_opts="-64bit -v93 -relax -access +rwc -namemap_mixgen"
49
 
50
# Design libraries
51
design_libs=(xil_defaultlib xpm)
52
 
53
# Simulation root library directory
54
sim_lib_dir="ies_lib"
55
 
56
# Script info
57
echo -e "clk_gen.sh - Script generated by export_simulation (Vivado v2017.4 (64-bit)-id)\n"
58
 
59
# Main steps
60
run()
61
{
62
  check_args $# $1
63
  setup $1 $2
64
  execute
65
}
66
 
67
# RUN_STEP: <execute>
68
execute()
69
{
70
  irun $irun_opts \
71
       -reflib "$ref_lib_dir/unisim:unisim" \
72
       -reflib "$ref_lib_dir/unisims_ver:unisims_ver" \
73
       -reflib "$ref_lib_dir/secureip:secureip" \
74
       -reflib "$ref_lib_dir/unimacro:unimacro" \
75
       -reflib "$ref_lib_dir/unimacro_ver:unimacro_ver" \
76
       -top xil_defaultlib.clk_gen \
77
       -f run.f \
78
       -top glbl \
79
       glbl.v \
80
       +incdir+"$ref_dir/../../../ipstatic" \
81
       +incdir+"../../../ipstatic" \
82
       +incdir+"/opt/cad/xilinx/Vivado2017/Vivado/2017.4/data/xilinx_vip/include"
83
}
84
 
85
# STEP: setup
86
setup()
87
{
88
  case $1 in
89
    "-lib_map_path" )
90
      if [[ ($2 == "") ]]; then
91
        echo -e "ERROR: Simulation library directory path not specified (type \"./clk_gen.sh -help\" for more information)\n"
92
        exit 1
93
      else
94
        ref_lib_dir=$2
95
      fi
96
    ;;
97
    "-reset_run" )
98
      reset_run
99
      echo -e "INFO: Simulation run files deleted.\n"
100
      exit 0
101
    ;;
102
    "-noclean_files" )
103
      # do not remove previous data
104
    ;;
105
    * )
106
  esac
107
 
108
  create_lib_dir
109
 
110
  # Add any setup/initialization commands here:-
111
 
112
  # <user specific commands>
113
 
114
}
115
 
116
# Create design library directory paths
117
create_lib_dir()
118
{
119
  if [[ -e $sim_lib_dir ]]; then
120
    rm -rf $sim_lib_dir
121
  fi
122
 
123
  for (( i=0; i<${#design_libs[*]}; i++ )); do
124
    lib="${design_libs[i]}"
125
    lib_dir="$sim_lib_dir/$lib"
126
    if [[ ! -e $lib_dir ]]; then
127
      mkdir -p $lib_dir
128
    fi
129
  done
130
}
131
 
132
# Delete generated data from the previous run
133
reset_run()
134
{
135
  files_to_remove=(ncsim.key irun.key irun.log waves.shm irun.history .simvision INCA_libs)
136
  for (( i=0; i<${#files_to_remove[*]}; i++ )); do
137
    file="${files_to_remove[i]}"
138
    if [[ -e $file ]]; then
139
      rm -rf $file
140
    fi
141
  done
142
 
143
  create_lib_dir
144
}
145
 
146
# Check command line arguments
147
check_args()
148
{
149
  if [[ ($1 == 1 ) && ($2 != "-lib_map_path" && $2 != "-noclean_files" && $2 != "-reset_run" && $2 != "-help" && $2 != "-h") ]]; then
150
    echo -e "ERROR: Unknown option specified '$2' (type \"./clk_gen.sh -help\" for more information)\n"
151
    exit 1
152
  fi
153
 
154
  if [[ ($2 == "-help" || $2 == "-h") ]]; then
155
    usage
156
  fi
157
}
158
 
159
# Script usage
160
usage()
161
{
162
  msg="Usage: clk_gen.sh [-help]\n\
163
Usage: clk_gen.sh [-lib_map_path]\n\
164
Usage: clk_gen.sh [-reset_run]\n\
165
Usage: clk_gen.sh [-noclean_files]\n\n\
166
[-help] -- Print help information for this script\n\n\
167
[-lib_map_path <path>] -- Compiled simulation library directory path. The simulation library is compiled\n\
168
using the compile_simlib tcl command. Please see 'compile_simlib -help' for more information.\n\n\
169
[-reset_run] -- Recreate simulator setup files and library mappings for a clean run. The generated files\n\
170
from the previous run will be removed. If you don't want to remove the simulator generated files, use the\n\
171
-noclean_files switch.\n\n\
172
[-noclean_files] -- Reset previous run, but do not remove simulator generated files from the previous run.\n\n"
173
  echo -e $msg
174
  exit 1
175
}
176
 
177
# Launch script
178
run $1 $2

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.