diff --git a/lib/CPUs/MIPS/tools/Makefile b/lib/CPUs/MIPS/tools/Makefile new file mode 100644 index 0000000..5c3b293 --- /dev/null +++ b/lib/CPUs/MIPS/tools/Makefile @@ -0,0 +1,8 @@ +all: ramgen romgen + +ramgen: src/ramgen.c + gcc -o ./ramgen.exe src/ramgen.c + +romgen: src/romgen.c + gcc -o ./romgen.exe src/romgen.c + \ No newline at end of file diff --git a/lib/CPUs/MIPS/tools/make.sh b/lib/CPUs/MIPS/tools/make.sh new file mode 100644 index 0000000..b9b349b --- /dev/null +++ b/lib/CPUs/MIPS/tools/make.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# ---------------------------------------------------------------------- +# Project: JCPU, a portable 8-bit RISC CPU written in VHDL +# This file: rom-file generation for cpu_core +# +# Copyright (C) 2007 J. Ahrensfeld +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# For questions and ideas, please contact the author at jens@jayfield.org +# +# --------------------------------------------------------------------- +# $Header: /tmp/cvsroot/VHDL/lib/CPUs/MIPS/tools/make.sh,v 1.1 2008-08-25 08:29:55 Jens Exp $ +# ---------------------------------------------------------------------- +TARGET=$2 +DSTDIR=$1 + +JASM_HOME=/cygdrive/w/vhdl/lib/CPUs/JCpu/tools + +$JASM_HOME/jasm.rb $TARGET.jsm + +irom_tcl_snippet="$TARGET.irom.tcl.snip" +irom_vhdl_snippet="$TARGET.irom.vhdl.snip" +irom_ld_vhdl_snippet="$TARGET.irom_ld.vhdl.snip" +xrom_tcl_snippet="$TARGET.xrom.tcl.snip" +xrom_vhdl_snippet="$TARGET.xrom.vhdl.snip" +xrom_ld_vhdl_snippet="$TARGET.xrom_ld.vhdl.snip" + +$JASM_HOME/insrom.rb $irom_vhdl_snippet $JASM_HOME/irom.vhd.tpl >$DSTDIR/$TARGET\_irom.vhdl +$JASM_HOME/insrom.rb $irom_ld_vhdl_snippet $JASM_HOME/irom_ld.vhd.tpl >$DSTDIR/$TARGET\_irom_ld.vhdl + +$JASM_HOME/insrom.rb $xrom_vhdl_snippet $JASM_HOME/xrom.vhd.tpl >$DSTDIR/$TARGET\_xrom.vhdl +$JASM_HOME/insrom.rb $xrom_ld_vhdl_snippet $JASM_HOME/xrom_ld.vhd.tpl >$DSTDIR/$TARGET\_xrom_ld.vhdl + +cat $irom_tcl_snippet > $TARGET.tcl.snip.snip +cat $xrom_tcl_snippet >> $TARGET.tcl.snip.snip +$JASM_HOME/insrom.rb $TARGET.tcl.snip.snip $JASM_HOME/rom.tcl.tpl >$TARGET.tcl + +rm -f *.snip