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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [sim/] [rtl_sim/] [bin/] [msp430sim] - Diff between revs 28 and 37

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 28 Rev 37
Line 27... Line 27...
#
#
# Author(s):
# Author(s):
#             - Olivier Girard,    olgirard@gmail.com
#             - Olivier Girard,    olgirard@gmail.com
#
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# $Rev: 26 $
# $Rev: 37 $
# $LastChangedBy: olivier.girard $
# $LastChangedBy: olivier.girard $
# $LastChangedDate: 2009-12-19 13:25:10 +0100 (Sat, 19 Dec 2009) $
# $LastChangedDate: 2009-12-29 21:58:14 +0100 (Tue, 29 Dec 2009) $
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
 
 
###############################################################################
###############################################################################
#                            Parameter Check                                  #
#                            Parameter Check                                  #
###############################################################################
###############################################################################
Line 71... Line 71...
 
 
###############################################################################
###############################################################################
#                               Cleanup                                       #
#                               Cleanup                                       #
###############################################################################
###############################################################################
echo "Cleanup..."
echo "Cleanup..."
rm -rf rom.*
rm -rf pmem.*
rm -rf stimulus.v
rm -rf stimulus.v
 
 
 
 
###############################################################################
###############################################################################
#                              Run simulation                                 #
#                              Run simulation                                 #
Line 88... Line 88...
cd $softdir
cd $softdir
make
make
cd ../../sim/rtl_sim/run/
cd ../../sim/rtl_sim/run/
 
 
# Create links
# Create links
ln -s $elffile rom.elf
ln -s $elffile pmem.elf
ln -s $verfile stimulus.v
ln -s $verfile stimulus.v
 
 
# Make local copy of the openMSP403 configuration file and remove comments
# Make local copy of the openMSP403 configuration file and remove comments
cp  $incfile  ./rom.inc
cp  $incfile  ./pmem.inc
sed -i "/^\/\// s,.*,," rom.inc
sed -i "/^\/\// s,.*,," pmem.inc
 
 
# Get ROM size
# Get Program memory size
romsize=`grep ROM_AWIDTH rom.inc | grep -v ROM_MSB | grep -v ROM_SIZE`
pmemsize=`grep PMEM_AWIDTH pmem.inc | grep -v PMEM_MSB | grep -v PMEM_SIZE`
romsize=${romsize##* }
pmemsize=${pmemsize##* }
romsize=$((2<<$romsize))
pmemsize=$((2<<$pmemsize))
 
 
# Create IHEX file from ELF
# Create IHEX file from ELF
echo "Convert ELF file to IHEX format..."
echo "Convert ELF file to IHEX format..."
msp430-objcopy -O ihex  rom.elf rom.ihex
msp430-objcopy -O ihex  pmem.elf pmem.ihex
 
 
# Generate ROM memory file
# Generate Program memory file
echo "Convert IHEX file to Verilog MEMH format..."
echo "Convert IHEX file to Verilog MEMH format..."
../bin/ihex2mem.tcl -ihex rom.ihex -out rom.mem -mem_size $romsize
../bin/ihex2mem.tcl -ihex pmem.ihex -out pmem.mem -mem_size $pmemsize
 
 
# Start verilog simulation
# Start verilog simulation
echo "Start Verilog simulation..."
echo "Start Verilog simulation..."
../bin/rtlsim.sh    stimulus.v rom.mem $submitfile
../bin/rtlsim.sh    stimulus.v pmem.mem $submitfile
../bin/rtlsim.sh    stimulus.v pmem.mem $submitfile
../bin/rtlsim.sh    stimulus.v pmem.mem $submitfile

powered by: WebSVN 2.1.0

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