From 4cc9cd5474c3d51288ead20034a4033c19f014b8 Mon Sep 17 00:00:00 2001 From: Jillian Ye Date: Wed, 8 Apr 1998 20:57:28 +0000 Subject: [PATCH] c_gen.pl: Added subroutine perform_test_read_only --- sim/testsuite/sky/ChangeLog | 5 +++++ sim/testsuite/sky/Makefile.in | 2 +- sim/testsuite/sky/c_gen.pl | 29 +++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/sim/testsuite/sky/ChangeLog b/sim/testsuite/sky/ChangeLog index fe8990ab95b..62852a30c45 100644 --- a/sim/testsuite/sky/ChangeLog +++ b/sim/testsuite/sky/ChangeLog @@ -1,3 +1,8 @@ + +Wed Apr 8 16:53:00 1998 Jillian Ye + + * c_gen.pl: Added subroutin perform_test_read_only. + Wed Apr 8 14:03:13 1998 Jillian Ye (jillian@cygnus.com> * sce_test40.dvpasm, sce_test41.dvpasm, sce_test42.dvpasm, sce_test43.dvpasm: diff --git a/sim/testsuite/sky/Makefile.in b/sim/testsuite/sky/Makefile.in index a0b544b2b65..353778f3d49 100644 --- a/sim/testsuite/sky/Makefile.in +++ b/sim/testsuite/sky/Makefile.in @@ -171,7 +171,7 @@ sce2_%.vu.o: sce2_%.vuasm sce%.ok: sce%.exe rm -f sce$*.ok - ulimit -t 30 ; $(RUN_FOR_TARGET) $< >& sce$*_our_gif.dat; \ + ulimit -t 30 ; $(RUN_FOR_TARGET) $< > sce$*_our_gif.dat; \ if [ $$? -ne 0 ]; then \ touch sce$*.ok; \ else \ diff --git a/sim/testsuite/sky/c_gen.pl b/sim/testsuite/sky/c_gen.pl index f22c09f4aa1..24288bafabd 100755 --- a/sim/testsuite/sky/c_gen.pl +++ b/sim/testsuite/sky/c_gen.pl @@ -17,6 +17,7 @@ # ! (reg wrt 32) 0xH (addr) 0xH (data) # ~ (reg wrt 64) 0xH (addr) 0xHigh_Low (data) # % (reg read 64) 0xH (addr) 0xHigh_Low (data) +# r (read only) 0xH (addr) 4/8 # # comment line # Note: n can be 0 (for VU1), 1 (for VU2), or 2 (for GIF). # H, High, or Low is hex data in the format of FFFFFFFF @@ -95,6 +96,10 @@ while( $inputline = ) { &perform_test64; } + elsif ( $inputline =~ /^\r/ ) # A line starts with "r" is a read only test request + { + &perform_test_read_only; + } else # ignore this input { print OUTFILE ("\n"); @@ -260,6 +265,30 @@ sub perform_test64 { } +sub perform_test_read_only { + print OUTFILE ("\n"); + print OUTFILE ("/******************************************************************/\n"); + print OUTFILE ("/*Just trying to read data from the specified address: */\n\n"); + + @columns = split ( /[\s]+/, $inputline ); + + #column[1] is the address; + #column[2] is the byte-indicator, which can be 4 or 8; + + if ( $column[2] =~ /^4/ ) # This is a 4-byte data address + { $d_type = "long "; } + else { + $d_type = "long long "; # assuming the input is "8" + } + + print OUTFILE ("\n{\n"); + print OUTFILE (" volatile ".$d_type."int* test_add = \(".$d_type."int *\)".$columns[1].";\n"); + print OUTFILE (" long long int test64_data = \(long long\) \( *test_add \);\n"); + print OUTFILE ("}\n"); + +} + + -- 2.30.2