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

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [tools/] [bin/] [update_sparccore] - Diff between revs 49 and 61

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

Rev 49 Rev 61
Line 54... Line 54...
 
 
# Clean the files by substituting the $error System Task and applying defines with Icarus preprocessor
# Clean the files by substituting the $error System Task and applying defines with Icarus preprocessor
for file in $DST_DIR/*.v ; do
for file in $DST_DIR/*.v ; do
  sed -e 's/\$error/\$display/g' $file | sed -e 's/negedge rclk or rst_l/negedge rclk/g' > $DST_DIR/temp.v
  sed -e 's/\$error/\$display/g' $file | sed -e 's/negedge rclk or rst_l/negedge rclk/g' > $DST_DIR/temp.v
  if(test $1 == "-me" || test $1 == "-se") then
  if(test $1 == "-me" || test $1 == "-se") then
    iverilog -E -D FPGA_SYN -D FPGA_SYN_1THREAD -D FPGA_SYN_NO_SPU -I $DST_DIR/include -o$file $DST_DIR/temp.v
    iverilog -E -D CMP_CLK_PERIOD=1 -D FPGA_SYN -D FPGA_SYN_1THREAD -D FPGA_SYN_NO_SPU -I $DST_DIR/include -o$file $DST_DIR/temp.v
  else
  else
    iverilog -E -D FPGA_SYN -D FPGA_SYN_NO_SPU -I $DST_DIR/include -o$file $DST_DIR/temp.v
    iverilog -E -D CMP_CLK_PERIOD=1 -D FPGA_SYN -D FPGA_SYN_NO_SPU -I $DST_DIR/include -o$file $DST_DIR/temp.v
  fi
  fi
  sed -e 's/\* ========== Copyright Header Begin/\/\* ========== Copyright Header Begin/g' $file | sed -e 's/if (\$time > (4\* ))/if(\$time>2)/g' > $DST_DIR/temp.v
  # These steps are required because Icarus does not allow this kind of comments
 
  sed -e 's/\* ========== Copyright Header Begin/\/\* ========== Copyright Header Begin/g' $file > $DST_DIR/temp.v
  mv -f $DST_DIR/temp.v $file
  mv -f $DST_DIR/temp.v $file
done
done
 
 
# Disable L1 Instruction and Data Caches
# Correct some strange strings
 
sed -e 's/sparc_exu_alulogic logic/sparc_exu_alulogic logic_MAYBEARESERVEDWORD/g' $DST_DIR/sparc_exu_alu.v > $DST_DIR/temp.v
 
mv $DST_DIR/temp.v $DST_DIR/sparc_exu_alu.v
 
sed -e 's/logic/logic_MAYBEARESERVEDWORD/g' $DST_DIR/sparc_ffu_ctl_visctl.v > $DST_DIR/temp.v
 
mv $DST_DIR/temp.v $DST_DIR/sparc_ffu_ctl_visctl.v
 
sed -e 's/$display(\"ILLEGAL_THR_STATE\"/\/\/$display(\"ILLEGAL_THR_STATE\"/g' sparc_ifu_thrfsm.v > $DST_DIR/temp.v
 
mv $DST_DIR/temp.v $DST_DIR/sparc_ifu_thrfsm.v
 
 
 
# After preprocessing we can safely delete the include directory
 
rm -f $DST_DIR/include/*.*
 
 
 
# Disable L1 Instruction and Data Caches if required
if(test $1 == "-me") then
if(test $1 == "-me") then
  cp -f $S1_ROOT/tools/src/bw_r_dcd.v $DST_DIR
  cp -f $S1_ROOT/tools/src/bw_r_dcd.v $DST_DIR
  cp -f $S1_ROOT/tools/src/bw_r_icd.v $DST_DIR
  cp -f $S1_ROOT/tools/src/bw_r_icd.v $DST_DIR
  cp -f $S1_ROOT/tools/src/bw_r_idct.v $DST_DIR
  cp -f $S1_ROOT/tools/src/bw_r_idct.v $DST_DIR
fi
fi

powered by: WebSVN 2.1.0

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