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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sim/] [iversim] - Diff between revs 162 and 191

Only display areas with differences | Details | Blame | View Log

Rev 162 Rev 191
#!/bin/sh
#!/bin/sh
# $Id: iversim,v 1.8 2008-05-27 19:01:58 sybreon Exp $
# $Id: iversim,v 1.8 2008-05-27 19:01:58 sybreon Exp $
HERE=$(dirname $0)
HERE=$(dirname $0)
RANDOM=$(date +%s)
RANDOM=$(date +%s)
SIM="isim"
SIM="isim"
IVERLIB="-y$HERE/../rtl/verilog"
IVERLIB="-y$HERE/../rtl/verilog"
# seed random number
# seed random number
echo "\`define randseed $RANDOM" > random.v
echo "\`define randseed $RANDOM" > random.v
# pre-processor
# pre-processor
iverilog $IVERLIB -tnull -M$SIM.ls $@ && \
iverilog $IVERLIB -tnull -M$SIM.ls $@ && \
sed 1d < $SIM.ls > $SIM.fs && \
sed 1d < $SIM.ls > $SIM.fs && \
iverilog -c$SIM.fs -E -tnull -o $SIM.v $@ && \
iverilog -c$SIM.fs -E -tnull -o $SIM.v $@ && \
rm $SIM.ls $SIM.fs && \
rm $SIM.ls $SIM.fs && \
rm random.v && \
rm random.v && \
# simulation
# simulation
if [ -e "$SIM.v" ]; then
if [ -e "$SIM.v" ]; then
        iverilog -tvvp -o $SIM.vvp $SIM.v && \
        iverilog -tvvp -o $SIM.vvp $SIM.v && \
        vvp -l iverilog.log $SIM.vvp && \
        vvp -l iverilog.log $SIM.vvp && \
        rm $SIM.vvp
        rm $SIM.vvp
fi
fi
# recompress
# recompress
if [ -e "dump.vcd" ]; then
if [ -e "dump.vcd" ]; then
        vcd2lxt dump.vcd dump.lxt -stats && \
        vcd2lxt dump.vcd dump.lxt -stats && \
        rm dump.vcd
        rm dump.vcd
fi
fi
echo "DONE"
echo "DONE"
# $Log: not supported by cvs2svn $
# $Log: not supported by cvs2svn $
# Revision 1.4  2008/05/13 20:05:13  ssnt2
# Revision 1.4  2008/05/13 20:05:13  ssnt2
# *** empty log message ***
# *** empty log message ***
#
#
# Revision 1.3  2008/05/09 16:20:03  ssnt2
# Revision 1.3  2008/05/09 16:20:03  ssnt2
# added vcd2lxt recompressor.
# added vcd2lxt recompressor.
#
#
# Revision 1.2  2008/05/09 16:13:59  ssnt2
# Revision 1.2  2008/05/09 16:13:59  ssnt2
# added pre-processor and cleaned up code.
# added pre-processor and cleaned up code.
#
#
 
 

powered by: WebSVN 2.1.0

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