mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-17 20:02:53 +08:00
38 lines
912 B
Bash
Executable File
38 lines
912 B
Bash
Executable File
#!/bin/bash
|
|
|
|
############################################################################
|
|
# Icarus Verilog build script for OH!
|
|
# Requires $OH_HOME variable to be set
|
|
# Input argument should be the "device under test". In general this
|
|
# would be something like "elink/hdl/dut_elink.v"
|
|
############################################################################
|
|
|
|
DUT=$1
|
|
|
|
##############################
|
|
#Create directory of all links
|
|
##############################
|
|
if [ -d "symlinks" ]
|
|
then
|
|
rm -r symlinks
|
|
fi
|
|
mkdir -p $OH_HOME/symlinks/hdl
|
|
mkdir -p $OH_HOME/symlinks/dv
|
|
pushd $OH_HOME/symlinks/hdl
|
|
ln -s ../../*/hdl/*.{v,vh} .
|
|
cd ../dv
|
|
ln -s ../../*/dv/*.v .
|
|
popd
|
|
##############################
|
|
#Build
|
|
###############################
|
|
iverilog -g2005\
|
|
-DTARGET_SIM=1\
|
|
$DUT\
|
|
$OH_HOME/symlinks/dv/dv_top.v\
|
|
-y .\
|
|
-y $OH_HOME/symlinks/hdl\
|
|
-y $OH_HOME/symlinks/dv\
|
|
-I $OH_HOME/symlinks/hdl\
|
|
-o dut.bin\
|