head	1.18;
access;
symbols
	AEMB2_712:1.11.0.2
	AEMB_711:1.11
	AEMB_7_05:1.4;
locks; strict;
comment	@# @;


1.18
date	2008.05.01.08.35.04;	author sybreon;	state Exp;
branches;
next	1.17;
commitid	6bf4481980b54567;

1.17
date	2008.04.27.16.05.25;	author sybreon;	state Exp;
branches;
next	1.16;
commitid	76fc4814a4444567;

1.16
date	2008.04.26.18.08.33;	author sybreon;	state Exp;
branches;
next	1.15;
commitid	79c748136f9f4567;

1.15
date	2008.04.26.10.03.00;	author sybreon;	state Exp;
branches;
next	1.14;
commitid	30b34812fdd24567;

1.14
date	2008.01.31.19.07.14;	author sybreon;	state Exp;
branches;
next	1.13;
commitid	797047a21c604567;

1.13
date	2008.01.19.16.42.54;	author sybreon;	state Exp;
branches;
next	1.12;
commitid	185e4792288d4567;

1.12
date	2007.12.11.00.44.32;	author sybreon;	state Exp;
branches;
next	1.11;
commitid	3e7b475ddd6c4567;

1.11
date	2007.11.30.17.09.27;	author sybreon;	state Exp;
branches;
next	1.10;
commitid	2ad3475043c64567;

1.10
date	2007.11.20.18.35.34;	author sybreon;	state Exp;
branches;
next	1.9;
commitid	76b8474328f44567;

1.9
date	2007.11.18.19.41.46;	author sybreon;	state Exp;
branches;
next	1.8;
commitid	4894474095774567;

1.8
date	2007.11.09.20.52.37;	author sybreon;	state Exp;
branches;
next	1.7;
commitid	3ff74734c8944567;

1.7
date	2007.11.04.05.16.25;	author sybreon;	state Exp;
branches;
next	1.6;
commitid	701f472d55a74567;

1.6
date	2007.11.02.03.25.46;	author sybreon;	state Exp;
branches;
next	1.5;
commitid	3cbc472a98a44567;

1.5
date	2007.10.22.19.14.38;	author sybreon;	state Exp;
branches;
next	1.4;
commitid	42b7471cf69d4567;

1.4
date	2007.04.30.15.57.31;	author sybreon;	state Exp;
branches;
next	1.3;
commitid	384e463611ea4567;

1.3
date	2007.04.25.22.15.06;	author sybreon;	state Exp;
branches;
next	1.2;
commitid	162c462fd2e54567;

1.2
date	2007.04.04.06.14.39;	author sybreon;	state Exp;
branches;
next	1.1;
commitid	2a94613424e4567;

1.1
date	2007.03.09.17.41.56;	author sybreon;	state Exp;
branches;
next	;
commitid	676545f19c614567;


desc
@@


1.18
log
@Minor cosmetic changes.
@
text
@#!/bin/sh
# $Id: gccrom,v 1.17 2008/04/27 16:05:25 sybreon Exp $

# Compile using C pre-processor
ELFFILE="rom"
XILFLAGS="-mtune=v5.00 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul"
CXXFLAGS="-O0"
LNKFLAGS="-Wl,-defsym -Wl,_STACK_SIZE=0x2000 -Wl,-defsym -Wl,_HEAP_SIZE=0x2000"
LIBFLAGS=""
INCFLAGS="-Icc/"

mb-g++ $XILFLAGS $CXXFLAGS $LNKFLAGS $LIBFLAGS $INCFLAGS -specs=aemb.specs  $@@ -o $ELFFILE && \
echo "xgcc=$?" && \

# Create a text listing of the compiled code
mb-objdump -DSCz $ELFFILE > $ELFFILE.dump && \
echo "dump=$?" && \

# Convert the ELF file to an SREC file
mb-objcopy -O srec $ELFFILE $ELFFILE.srec && \
echo "copy=$?" && \

# Generate a Verilog VMEM file from the SREC file
srec_cat $ELFFILE.srec -o ../sim/dump.vmem -vmem 32 && \
echo "srec=$?" && \

# echo the checksum
MD5=$(sha1sum $ELFFILE | cut -c1-32) && \
echo "sha1=$MD5" && \

# Cleanup code
rm $ELFFILE.srec && rm $ELFFILE

# $Log: gccrom,v $
# Revision 1.17  2008/04/27 16:05:25  sybreon
# Added optional specs.
#
# Revision 1.16  2008/04/26 18:08:33  sybreon
# Minor cosmetic changes.
#
# Revision 1.15  2008/04/26 10:03:00  sybreon
# Cleaned up script.
#
# Revision 1.14  2008/01/31 19:07:14  sybreon
# Made code work with newlib's malloc();
#
# Revision 1.13  2008/01/19 16:42:54  sybreon
# Uses multiplier + barrel shifter as default.
#
# Revision 1.12  2007/12/11 00:44:32  sybreon
# Modified for AEMB2
#
# Revision 1.11  2007/11/30 17:09:27  sybreon
# Minor code cleanup.
#
# Revision 1.10  2007/11/20 18:35:34  sybreon
# Generate VMEM instead of HEX dumps of programme.
#
# Revision 1.9  2007/11/18 19:41:46  sybreon
# Minor simulation fixes.
#
# Revision 1.8  2007/11/09 20:52:37  sybreon
# Added some compilation optimisations.
#
# Revision 1.7  2007/11/04 05:16:25  sybreon
# Added -msoft-float and -mxl-soft-div compiler flags.
#
# Revision 1.6  2007/11/02 03:25:46  sybreon
# New EDK 3.2 compatible design with optional barrel-shifter and multiplier.
# Fixed various minor data hazard bugs.
# Code compatible with -O0/1/2/3/s generated code.
#
# Revision 1.5  2007/10/22 19:14:38  sybreon
# Recommended to compile code with -O2/3/s
#
# Revision 1.4  2007/04/30 15:57:31  sybreon
# Modified compilation sequence.
#
# Revision 1.3  2007/04/25 22:15:06  sybreon
# Added support for 8-bit and 16-bit data types.
#
# Revision 1.2  2007/04/04 06:14:39  sybreon
# Minor changes
#
# Revision 1.1  2007/03/09 17:41:56  sybreon
# initial import
@


1.17
log
@Added optional specs.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.16 2008/04/26 18:08:33 sybreon Exp $
d6 1
a6 1
XILFLAGS="-mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul"
d8 1
a8 1
LNKFLAGS="-Wl,-defsym -Wl,_STACK_SIZE=0x4000 -Wl,-defsym -Wl,_HEAP_SIZE=0x4000"
d12 1
a12 1
mb-gcc $XILFLAGS $CXXFLAGS $LNKFLAGS $LIBFLAGS $INCFLAGS -specs=aemb.specs  $@@ -o $ELFFILE && \
d35 3
@


1.16
log
@Minor cosmetic changes.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.15 2008/04/26 10:03:00 sybreon Exp $
d8 2
a9 2
LNKFLAGS="-Wl,-defsym -Wl,_STACK_SIZE=0x400 -Wl,-defsym -Wl,_HEAP_SIZE=0x400"
LIBFLAGS="-lc_m_bs -lm_m_bs"
d12 1
a12 1
mb-gcc $XILFLAGS $CXXFLAGS $LNKFLAGS $LIBFLAGS $INCFLAGS  $@@ -o $ELFFILE && \
d35 3
@


1.15
log
@Cleaned up script.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.14 2008/01/31 19:07:14 sybreon Exp $
d27 4
d35 3
@


1.14
log
@Made code work with newlib's malloc();
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.13 2008/01/19 16:42:54 sybreon Exp $
d4 10
a13 3
# Compile using C++ pre-processor
mb-gcc -g -Wl,-defsym -Wl,_STACK_SIZE=0x800 -Wl,-defsym -Wl,_HEAP_SIZE=0x400 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul $@@ -o rom.elf -lc_m_bs -lm_m_bs && \
#mb-gcc -g -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul $@@ -o rom.elf -lc_m_bs -lm_m_bs && \
d16 2
a17 1
mb-objdump -DSCz rom.elf > rom.dump && \
d20 2
a21 1
mb-objcopy -O srec rom.elf rom.srec && \
d24 2
a25 1
srec_cat rom.srec -o ../sim/dump.vmem -vmem 32 && \
d28 1
a28 4
rm rom.srec && \

# Say Cheeze!
echo "ROM generated"
d31 3
@


1.13
log
@Uses multiplier + barrel shifter as default.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.12 2007/12/11 00:44:32 sybreon Exp $
d5 2
a6 1
mb-g++ -g -Wl,-defsym -Wl,_HEAP_SIZE=0x800 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul -mno-clearbss $@@ -o rom.elf -lc_m_bs -lm_m_bs && \
d9 1
a9 1
mb-objdump -DSC rom.elf > rom.dump && \
d24 3
@


1.12
log
@Modified for AEMB2
@
text
@d2 20
a21 1
# $Id: gccrom,v 1.11 2007/11/30 17:09:27 sybreon Exp $
d23 3
a59 19
#

# Compile using C++ pre-processor
mb-g++ -g  -Wl,-defsym -Wl,_STACK_SIZE=0x400 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul -o rom.elf $@@ && \

# Create a text listing of the compiled code
mb-objdump -dSC rom.elf > rom.dump && \

# Convert the ELF file to an SREC file
mb-objcopy -O srec rom.elf rom.srec && \

# Generate a Verilog VMEM file from the SREC file
srec_cat rom.srec -o ../sim/dump.vmem -vmem 32 && \

# Cleanup code
rm rom.srec && \

# Say Cheeze!
echo "ROM generated"
@


1.11
log
@Minor code cleanup.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.10 2007/11/20 18:35:34 sybreon Exp $
d4 3
d41 1
a41 1
mb-g++ -g -mstats -mxl-soft-div -msoft-float -mno-memcpy -msmall-divides -o rom.elf $@@ && \
d50 1
a50 1
srec_cat rom.srec -o ../sim/dump.rom -vmem 32 && \
@


1.10
log
@Generate VMEM instead of HEX dumps of programme.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.9 2007/11/18 19:41:46 sybreon Exp $
d4 3
a48 5
#mb-run -v rom.elf 2> rom.run && \
#mb-objcopy -O binary rom.elf rom.bin && \
#hexdump -v -e'1/4 "%.8X\n"' rom.bin > ../sim/aeMB.rom && \
#rm rom.bin && \

@


1.9
log
@Minor simulation fixes.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.8 2007/11/09 20:52:37 sybreon Exp $
d4 3
d33 22
a54 7
#mb-gcc -g -mxl-soft-div -mxl-soft-mul -msoft-float -mno-clearbss -msmall-divides -mno-memcpy -mno-xl-gp-opt -o rom.o $@@ && \
mb-g++ -g -mstats -mxl-soft-div -msoft-float -mno-memcpy -msmall-divides -o rom.o $@@ && \
#mb-run -v rom.o 2> rom.run && \
mb-objcopy -O binary rom.o rom.bin && \
hexdump -v -e'1/4 "%.8X\n"' rom.bin > ../sim/aeMB.rom && \
mb-objdump -dSC rom.o > rom.dump && \
rm rom.bin && \
@


1.8
log
@Added some compilation optimisations.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.7 2007/11/04 05:16:25 sybreon Exp $
d4 3
d31 1
a31 1
mb-gcc -g -mstats -mxl-soft-div -msoft-float -mno-memcpy -msmall-divides -o rom.o $@@ && \
d35 1
a35 1
mb-objdump -DSC rom.o > rom.dump && \
@


1.7
log
@Added -msoft-float and -mxl-soft-div compiler flags.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.6 2007/11/02 03:25:46 sybreon Exp $
d4 3
d28 1
a28 1
mb-gcc -g -mstats -mxl-soft-div -msoft-float -o rom.o $@@ && \
@


1.6
log
@New EDK 3.2 compatible design with optional barrel-shifter and multiplier.
Fixed various minor data hazard bugs.
Code compatible with -O0/1/2/3/s generated code.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.5 2007/10/22 19:14:38 sybreon Exp $
d4 5
d25 1
a25 1
mb-gcc -g -mstats -o rom.o $@@ && \
@


1.5
log
@Recommended to compile code with -O2/3/s
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.4 2007/04/30 15:57:31 sybreon Exp $
d4 3
d20 1
a20 1
mb-gcc -g -mstats -mxl-soft-div -mxl-soft-mul -msoft-float -o rom.o $@@ && \
d24 1
a24 1
mb-objdump -DSCs rom.o > rom.dump && \
@


1.4
log
@Modified compilation sequence.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.3 2007/04/25 22:15:06 sybreon Exp $
d4 3
d17 1
a17 1
mb-gcc -g -mxl-soft-div -mxl-soft-mul -msoft-float -o rom.o $@@ && \
@


1.3
log
@Added support for 8-bit and 16-bit data types.
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.2 2007/04/04 06:14:39 sybreon Exp $
d4 3
d15 1
a19 1
#mb-run -tv rom.o 2> rom.run && \
@


1.2
log
@Minor changes
@
text
@d2 1
a2 1
# $Id: gccrom,v 1.1 2007/03/09 17:41:56 sybreon Exp $
d4 3
d14 1
a14 1
mb-objdump -DSC rom.o > rom.dump && \
@


1.1
log
@initial import
@
text
@d2 7
a8 3
# $Id$
# $Log$
mb-gcc -mxl-soft-div -mxl-soft-mul -msoft-float -o rom.o $@@ && \
d11 1
a11 1
mb-objdump -D rom.o > rom.dump && \
d13 2
a14 1
mb-run -tv rom.o 2> rom.run 
@

