OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openmsp430/trunk/fpga/xilinx_diligent_s3board/sim/rtl_sim/bin
    from Rev 151 to Rev 212
    Reverse comparison

Rev 151 → Rev 212

/msp430sim
22,9 → 22,9
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
#------------------------------------------------------------------------------
#
#
# File Name: msp430sim
#
#
# Author(s):
# - Olivier Girard, olgirard@gmail.com
#
65,6 → 65,9
elffile=../../../software/$1/$1.elf;
verfile=../src/$1.v;
submitfile=../src/submit.f;
if [ $OMSP_SIMULATOR == "isim" ]; then
submitfile=../src/submit.prj;
fi
incfile=../../../rtl/verilog/openmsp430/openMSP430_defines.v;
 
if [ ! -e $softdir ]; then
100,6 → 103,32
echo "| Start simulation: $1"
echo " ======================================================="
 
# Make local copy of the openMSP403 configuration file
# and prepare it for MSPGCC preprocessing
cp $incfile ./pmem.h
sed -ie 's/`ifdef/#ifdef/g' ./pmem.h
sed -ie 's/`else/#else/g' ./pmem.h
sed -ie 's/`endif/#endif/g' ./pmem.h
sed -ie 's/`define/#define/g' ./pmem.h
sed -ie 's/`include/\/\/#include/g' ./pmem.h
sed -ie 's/`//g' ./pmem.h
sed -ie "s/'//g" ./pmem.h
 
# Use MSPGCC preprocessor to extract the Program, Data
# and Peripheral memory sizes
if command -v msp430-elf-gcc >/dev/null; then
msp430-elf-gcc -E -P -x c ../bin/omsp_config.sh > pmem.sh
else
msp430-gcc -E -P -x c ../bin/omsp_config.sh > pmem.sh
fi
 
# Source the extracted configuration file
if [[ $(uname -s) == CYGWIN* ]];
then
dos2unix pmem.sh
fi
source pmem.sh
 
# Make C program
cd $softdir
make clean
107,7 → 136,7
cd ../../sim/rtl_sim/run/
 
# Create links
if [ `uname -o` = "Cygwin" ]
if [[ $(uname -s) == CYGWIN* ]];
then
cp $elffile pmem.elf
cp $verfile stimulus.v
116,26 → 145,13
ln -s $verfile stimulus.v
fi
 
# Make local copy of the openMSP403 configuration file
# and prepare it for MSPGCC preprocessing
cp $incfile ./pmem.h
sed -i 's/`ifdef/#ifdef/g' ./pmem.h
sed -i 's/`else/#else/g' ./pmem.h
sed -i 's/`endif/#endif/g' ./pmem.h
sed -i 's/`define/#define/g' ./pmem.h
sed -i 's/`//g' ./pmem.h
sed -i "s/'//g" ./pmem.h
 
# Use MSPGCC preprocessor to extract the Program, Data
# and Peripheral memory sizes
msp430-gcc -E -P -x c ../bin/omsp_config.sh > pmem.sh
 
# Source the extracted configuration file
source pmem.sh
 
# Create IHEX file from ELF
echo "Convert ELF file to IHEX format..."
msp430-objcopy -O ihex pmem.elf pmem.ihex
if command -v msp430-elf-objcopy >/dev/null; then
msp430-elf-objcopy -O ihex pmem.elf pmem.ihex
else
msp430-objcopy -O ihex pmem.elf pmem.ihex
fi
 
# Generate Program memory file
echo "Convert IHEX file to Verilog MEMH format..."
/rtlsim.sh
22,9 → 22,9
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
#------------------------------------------------------------------------------
#
#
# File Name: rtlsim.sh
#
#
# Author(s):
# - Olivier Girard, olgirard@gmail.com
# - Mihai M., mmihai@delajii.net
73,7 → 73,7
if [ "${OMSP_SIMULATOR:-iverilog}" = iverilog ]; then
 
rm -rf simv
 
NODUMP=${OMSP_NODUMP-0}
if [ $NODUMP -eq 1 ]
then
81,8 → 81,8
else
iverilog -o simv -c $3
fi
if [ `uname -o` = "Cygwin" ]
 
if [[ $(uname -s) == CYGWIN* ]];
then
vvp.exe ./simv
else
98,14 → 98,15
vargs=""
fi
 
case $OMSP_SIMULATOR in
cver* )
case $OMSP_SIMULATOR in
cver* )
vargs="$vargs +define+VXL +define+CVER" ;;
verilog* )
vargs="$vargs +define+VXL" ;;
ncverilog* )
rm -rf INCA_libs
vargs="$vargs +access+r +nclicq +ncinput+../bin/cov_ncverilog.tcl -covdut openMSP430 -covfile ../bin/cov_ncverilog.ccf -coverage all +define+TRN_FILE" ;;
#vargs="$vargs +access+r +nclicq +ncinput+../bin/cov_ncverilog.tcl -covdut openMSP430 -covfile ../bin/cov_ncverilog.ccf -coverage all +define+TRN_FILE" ;;
vargs="$vargs +access+r +nclicq +define+TRN_FILE" ;;
vcs* )
rm -rf csrc simv*
vargs="$vargs -R -debug_pp +vcs+lic+wait +v2k +define+VPD_FILE" ;;
122,7 → 123,7
./isim.exe -tclbatch isim.tcl
exit
esac
 
echo "Running: $OMSP_SIMULATOR -f $3 $vargs"
exec $OMSP_SIMULATOR -f $3 $vargs
fi

powered by: WebSVN 2.1.0

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