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/] [axi_uartlite_module_sim/] [riviera/] [axi_uartlite_module_sim.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    : axi_uartlite_module_sim.sh
6
# Simulator   : Aldec Riviera-PRO 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 Tue Jul 28 11:34:43 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: axi_uartlite_module_sim.sh [-help]
18
# usage: axi_uartlite_module_sim.sh [-lib_map_path]
19
# usage: axi_uartlite_module_sim.sh [-noclean_files]
20
# usage: axi_uartlite_module_sim.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 'axi_uartlite_module_sim.sh -help' for more information.
31
#
32
# Additional references - 'Xilinx Vivado Design Suite User Guide:Logic simulation (UG900)'
33
#
34
#*********************************************************************************************************
35
 
36
 
37
# Script info
38
echo -e "axi_uartlite_module_sim.sh - Script generated by export_simulation (Vivado v2017.4 (64-bit)-id)\n"
39
 
40
# Main steps
41
run()
42
{
43
  check_args $# $1
44
  setup $1 $2
45
  compile
46
  simulate
47
}
48
 
49
# RUN_STEP: <compile>
50
compile()
51
{
52
  # Compile design files
53
  source compile.do 2>&1 | tee -a compile.log
54
 
55
}
56
 
57
# RUN_STEP: <simulate>
58
simulate()
59
{
60
  runvsimsa -l simulate.log -do "do {simulate.do}"
61
}
62
 
63
# STEP: setup
64
setup()
65
{
66
  case $1 in
67
    "-lib_map_path" )
68
      if [[ ($2 == "") ]]; then
69
        echo -e "ERROR: Simulation library directory path not specified (type \"./axi_uartlite_module_sim.sh -help\" for more information)\n"
70
        exit 1
71
      fi
72
     copy_setup_file $2
73
    ;;
74
    "-reset_run" )
75
      reset_run
76
      echo -e "INFO: Simulation run files deleted.\n"
77
      exit 0
78
    ;;
79
    "-noclean_files" )
80
      # do not remove previous data
81
    ;;
82
    * )
83
     copy_setup_file $2
84
  esac
85
 
86
  # Add any setup/initialization commands here:-
87
 
88
  # <user specific commands>
89
 
90
}
91
 
92
# Copy library.cfg file
93
copy_setup_file()
94
{
95
  file="library.cfg"
96
  if [[ ($1 != "") ]]; then
97
    lib_map_path="$1"
98
  else
99
    lib_map_path="/home/v.gulyaev/Project/vozhak/trunk/rtl/aes128/fpga/aes128_ecb/aes128_ecb.cache/compile_simlib/riviera"
100
  fi
101
  if [[ ($lib_map_path != "") ]]; then
102
    src_file="$lib_map_path/$file"
103
    cp $src_file .
104
  fi
105
}
106
 
107
# Delete generated data from the previous run
108
reset_run()
109
{
110
  files_to_remove=(compile.log elaboration.log simulate.log dataset.asdb work riviera)
111
  for (( i=0; i<${#files_to_remove[*]}; i++ )); do
112
    file="${files_to_remove[i]}"
113
    if [[ -e $file ]]; then
114
      rm -rf $file
115
    fi
116
  done
117
}
118
 
119
# Check command line arguments
120
check_args()
121
{
122
  if [[ ($1 == 1 ) && ($2 != "-lib_map_path" && $2 != "-noclean_files" && $2 != "-reset_run" && $2 != "-help" && $2 != "-h") ]]; then
123
    echo -e "ERROR: Unknown option specified '$2' (type \"./axi_uartlite_module_sim.sh -help\" for more information)\n"
124
    exit 1
125
  fi
126
 
127
  if [[ ($2 == "-help" || $2 == "-h") ]]; then
128
    usage
129
  fi
130
}
131
 
132
# Script usage
133
usage()
134
{
135
  msg="Usage: axi_uartlite_module_sim.sh [-help]\n\
136
Usage: axi_uartlite_module_sim.sh [-lib_map_path]\n\
137
Usage: axi_uartlite_module_sim.sh [-reset_run]\n\
138
Usage: axi_uartlite_module_sim.sh [-noclean_files]\n\n\
139
[-help] -- Print help information for this script\n\n\
140
[-lib_map_path <path>] -- Compiled simulation library directory path. The simulation library is compiled\n\
141
using the compile_simlib tcl command. Please see 'compile_simlib -help' for more information.\n\n\
142
[-reset_run] -- Recreate simulator setup files and library mappings for a clean run. The generated files\n\
143
from the previous run will be removed. If you don't want to remove the simulator generated files, use the\n\
144
-noclean_files switch.\n\n\
145
[-noclean_files] -- Reset previous run, but do not remove simulator generated files from the previous run.\n\n"
146
  echo -e $msg
147
  exit 1
148
}
149
 
150
# Launch script
151
run $1 $2

powered by: WebSVN 2.1.0

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