Skip to content

Commit

Permalink
Scripts and README for using the VI test suite with NVC
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Feb 4, 2012
1 parent 6b29865 commit c77c12d
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -31,3 +31,6 @@ stamp-h1

# IEEE sources cannot be freely redistributed
lib/ieee/*.vhdl

# VI test suite also cannot be distributed
test/vi_suite*
20 changes: 20 additions & 0 deletions test/vi_suite/README.nvc
@@ -0,0 +1,20 @@
To run the VI VHDL test suite on NVC do the following:

1. Find vi_suite.tar.Z (MD5: cc8eb372e4a97a95f6f3a68ea7696ec5) on the
internet Wayback Machine.
2. Extract in nvc/test (i.e. over the top of this directory)
3. Install csh on your computer
4. Change "acc" in cfiles/*.mkf to "gcc". With GNU sed you can do
sed -i'' s/acc/gcc/g cfiles/*.mkf
5. Set the VI_TEST environment variable to the vi_suite directory
export VI_TEST=$(pwd)
6. Add $VI_TEST to your PATH
export PATH=$PATH:$VI_TEST
7. Patch the install script to support NVC
patch -p0 < install.patch
8. Run ./install
9. Run ./tcp
10. At the TCP# prompt:
set branch on all
set entorcfg entity
execute
38 changes: 38 additions & 0 deletions test/vi_suite/install.patch
@@ -0,0 +1,38 @@
--- install.old 2012-02-04 21:36:38.059578767 +0000
+++ install 2012-02-04 21:38:37.776668713 +0000
@@ -89,7 +89,7 @@
# Choose Simulator
#--------------------------------------------------------------------
set simulator = ""
-while (($simulator != '1') && ($simulator != '2') && ($simulator != '3') && ($simulator != '4') && ($simulator != '5'))
+while (($simulator != '1') && ($simulator != '2') && ($simulator != '3') && ($simulator != '4') && ($simulator != '5') && ($simulator != '6'))
echo ""
echo "Simulators For which Install Scripts are Available...."
echo "Mentor Graphics. = 1"
@@ -97,6 +97,7 @@
echo "Synopsys........ = 3"
echo "Model Technology = 4"
echo "Other........... = 5"
+ echo "NVC............. = 6"
echo -n "Please enter the number of your choice : "
set simulator = ($<)
end
@@ -158,6 +159,18 @@
echo ""
echo ""

+else if ($simulator == '6') then
+# ---------------------------------------------------------------------
+# NVC
+# ---------------------------------------------------------------------
+ /bin/ln -s nvc/SSF SSF
+ /bin/ln -s nvc/create_library create_library
+ /bin/ln -s nvc/compile compile
+ /bin/ln -s nvc/simulate simulate
+
+ echo "The installation is now complete."
+
+
endif

echo "Remember to add the line: setenv VI_TEST install_directory/vi_suite"
12 changes: 12 additions & 0 deletions test/vi_suite/nvc/SSF
@@ -0,0 +1,12 @@
compiler_error:
** Error
simulator_error:
** Fatal
create_library:
$work $work_path $suite_dir
compile:
$src_file $src_path $out_path $work $work_path $suite_dir
simulate:
$src_file $out_path $work $work_path $entity $arch $config $time_unit $time $suite_dir
end

4 changes: 4 additions & 0 deletions test/vi_suite/nvc/compile
@@ -0,0 +1,4 @@
#!/bin/bash
#set -x
cd $6$5
nvc --work $4 -a $6$2$1.vhd &> $6$3$1.co
2 changes: 2 additions & 0 deletions test/vi_suite/nvc/create_library
@@ -0,0 +1,2 @@
#!/bin/sh
# Nothing to do
12 changes: 12 additions & 0 deletions test/vi_suite/nvc/simulate
@@ -0,0 +1,12 @@
#!/bin/bash
#set -x
cd ${10}$4

if [ $7 != - ]; then
# TODO: configurations
echo "Cannot elaborate configuration" > ${10}$2$1.so
exit 1
else
nvc --work $3 -e $5 &> ${10}$2$1.so
nvc --work $3 -r $5 --stop-time=$9$8 &>> ${10}$2$1.so
fi

0 comments on commit c77c12d

Please sign in to comment.