make_reality_makefile 3.04 KB
#!/usr/local/bin/perl
#
#
$printoff = 0;
$LARGE_TRACE_BUFFER = 0;
$LARGE_TIMEOUT = 0;
$MISC_TESTS = 0;
$RSP_GATE = 0;

while ($#ARGV >= 0) {
  if ($ARGV[0] eq '-LARGE_TRACE_BUFFER') {
     shift (@ARGV);
     $LARGE_TRACE_BUFFER = 1;
  }
  elsif ($ARGV[0] eq '-LARGE_TIMEOUT') {
     shift (@ARGV);
     $LARGE_TIMEOUT = 1;
  }
  elsif ($ARGV[0] eq '-MISC_TESTS') {
     shift (@ARGV);
     $MISC_TESTS = 1;
  }
  else {
    die "Illigal option provided \n";
  }
} #while ($#ARGV >= 0)

while (<>) {

  split;

  if ($_[0] eq "PRDEPTH") {
     print "PRDEPTH = \$(ROOT)/PR\n";
     print "REALITY_SIM = \$(PRDEPTH)/hw/chip/sim\n";
     print "REGRESSION = \$(PRDEPTH)/rspsim/vuregre/regression\n";
     }
  elsif ($_[0] eq "LVCSOPTS") {
     print "VSYNPATH = \$(PRDEPTH)/hw/chip/rcp/rsp/vsyn\n";
     print "GATE_FILES =					\\\n";
     print " 		\$(VSYNPATH)/divctl.vsyn    		\\\n";
     print " 		\$(VSYNPATH)/io_cmd_dma.vsyn     	\\\n";
     print " 		\$(VSYNPATH)/io_mem_dma.vsyn     	\\\n";
     print " 		\$(VSYNPATH)/ls.vsyn             	\\\n";
     print " 		\$(VSYNPATH)/rspbusses.vsyn      	\\\n";
     print " 		\$(VSYNPATH)/su.vsyn             	\\\n";
     print " 		\$(VSYNPATH)/vu.vsyn             	\\\n";
     print " 		\$(VSYNPATH)/vusl.vsyn           	\\\n";
     print "\n";
     print "\n";
     print "$_";
     print "	-P \$(PRDEPTH)/lib/librcppli/rcppli.tab \$(PRDEPTH)/lib/librcppli/librcppli.a \\\n";
     print "	-y \$(PRDEPTH)/hw/chip/sim			\\\n";
     print "	+incdir+\$(PRDEPTH)/hw/chip/sim			\\\n";
     print "	+incdir+\$(REGRESSION)				\\\n";
     print "	+define+REALITY_RSP_REGRESSION			\\\n";
     print "	+define+RSP_MON			\\\n";
     if ($LARGE_TRACE_BUFFER) {
       print "	+define+LARGE_TRACE_BUFFER			\\\n";
       }
     if ($LARGE_TIMEOUT) {
       print "	+define+LARGE_TIMEOUT			\\\n";
       }
     }
  elsif ($_[0] eq "simv:") {
     ##################################################
     print "simv_rsp_regr: \$(REALITY_SIM)/reality.v \$(REGRESSION)/rsp_ctrace.v  \$(_FORCE)      \n";
     print "	VCS_RUNTIME=\$(VCSDIR)/lib/libvcs.so 						\\\n";
     print "	\$(VCS)  \$(VCSOPTS) -Mdir=designc -o \$@ \$(REALITY_SIM)/reality.v 		\\\n";
     print "	\$(REALITY_SIM)/dummy_rdp.v \$(REGRESSION)/rsp_ctrace.v 			\\\n";
     if ($MISC_TESTS==1) {
       print "	misc_tests.v		\\\n";
     }
     else {
       print "	rsp_tests.v		\\\n";
     }
     print "\n\n";
     ##################################################
     print "simv_rsp_regr_gate: \$(REALITY_SIM)/reality.v \$(REGRESSION)/rsp_ctrace.v  \$(_FORCE)      \n";
     print "	VCS_RUNTIME=\$(VCSDIR)/lib/libvcs.so 						\\\n";
     print "	\$(VCS)  \$(VCSOPTS) -Mdir=designc -o \$@ \$(REALITY_SIM)/reality.v 		\\\n";
     print "	\$(REALITY_SIM)/dummy_rdp.v \$(REGRESSION)/rsp_ctrace.v 			\\\n";
     print "	\$(GATE_FILES) +define+RSP_GATE		\\\n";
     if ($MISC_TESTS==1) {
       print "	misc_tests.v		\\\n";
     }
     else {
       print "	rsp_tests.v		\\\n";
     }
     print "\n\n";
     ##################################################
     print "$_";
     }
   else {
     print "$_";
     }
}