|
|
1.1 ! root 1: #include "fpp_defs.h" ! 2: ! 3: ! 4: /***************************************************************************** ! 5: * ! 6: * PIPELINE TEST #10 ! 7: * ! 8: * LDF(op1), MULF(op2), STF op3, SUBF op3, STF ! 9: * ! 10: * -where the operands are the fmacro1 MULF data patterns. The SUBF operand ! 11: * is the stored result of the MULF. ! 12: * -If the 1st STF isn't completed before the SUBF data is fetched then we ! 13: * won't get a final accumulator of zero. ! 14: *****************************************************************************/ ! 15: pipe_10() ! 16: { ! 17: asm(".globl _pipeline_10_t"); ! 18: asm("_pipeline_10_t:"); ! 19: if( (cycle == 1) && (prt_hdrs) ) /* print headers on 1st cycle */ ! 20: writes(" PIPE_10"); ! 21: force_loop = FALSE; /* clear force_loop flag */ ! 22: for( index = 0; index <= max_mulf_1_index; index++ ) ! 23: { ! 24: sgl_value_1 = mulf_1_data[index].op_1; /* get the data */ ! 25: sgl_value_2 = mulf_1_data[index].op_2; /* operands */ ! 26: sgl_expected = mulf_1_data[index].exp; ! 27: /* ! 28: * This is the start of the LOOP ON ERROR section ! 29: */ ! 30: asm("_pipe10_1_lp:"); ! 31: asm("ldf _sgl_value_1"); /* get the 1st operand */ ! 32: asm("mulf _sgl_value_2"); /* multiply by the 2nd op. */ ! 33: asm("stf _sgl_value_3"); /* save the MULF result */ ! 34: asm("subf _sgl_value_3"); /* and subtract it again */ ! 35: asm("stf _sgl_st_acc"); /* save the final result */ ! 36: if( force_loop ) ! 37: asm("brb _pipe10_1_lp");; /* loop on the error */ ! 38: /* ! 39: * Verify the results ! 40: */ ! 41: if( sgl_st_acc ) { /* the Acc s/b cleared */ ! 42: errcnt++; /* bump the error count */ ! 43: if ( prt_error ) ! 44: pipe10_print(); /* print the error mesage */ ! 45: if ( halt_flg ) ! 46: pipe10_halt( 1 ); /* halt on the error */ ! 47: if ( loop_on_err ) { ! 48: force_loop = TRUE; ! 49: asm("jmp _pipe10_1_lp");; ! 50: } ! 51: } ! 52: } ! 53: asm("jmp *return"); /* return to the test monitor */ ! 54: } ! 55: ! 56: ! 57: ! 58: ! 59: /* ! 60: ************************************************************************** ! 61: * ! 62: * print an error message of the form ! 63: * ! 64: * cycle: xx Test xx, Error subtracting the stored data (op3), index = xx ! 65: * test sequence = LDF(op1), MULF(op2), STF(op3), SUBF(op3), STF ! 66: * operand 1 = xxxxxxxx, final Acc = xxxxxxxx, data index = dd ! 67: * operand 2 = xxxxxxxx, expected Acc = xxxxxxxx ! 68: * operand 3 = xxxxxxxx, expected op3 = xxxxxxxx ! 69: **************************************************************************/ ! 70: pipe10_print() ! 71: { ! 72: writes(" \n"); /* start a new print line */ ! 73: writes("cycle: "); ! 74: writed( cycle ); ! 75: writes(" Test "); ! 76: writed( test_no ); ! 77: writes(" (Pipe 10), error\n"); ! 78: writes(" LDF(op1), MULF(op2), STF(op3), SUBF(op3), STF\n"); ! 79: writes("operand 1 = "); ! 80: write32h( sgl_value_1 ); ! 81: writes(", final Acc = "); ! 82: write32h( sgl_st_acc ); ! 83: writes(", data index = "); ! 84: writed( index ); ! 85: writec('\n'); ! 86: writes("operand 2 = "); ! 87: write32h( sgl_value_2 ); ! 88: writes(", expected Acc = "); ! 89: write32h( 0 ); ! 90: writec('\n'); ! 91: writes("operand 3 = "); ! 92: write32h( sgl_value_3 ); ! 93: writes(", expected op3 = "); ! 94: write32h( 0 ); ! 95: writec('\n'); ! 96: } ! 97: ! 98: ! 99: ! 100: /* ! 101: ************************************************************************** ! 102: * ! 103: * HALT ON AN ERROR ! 104: * ! 105: ************************************************************************** ! 106: */ ! 107: pipe10_halt() ! 108: { ! 109: sgl_value_4 = 0; ! 110: asm("movl _test_no,r0"); /* r0 = test number */ ! 111: asm("movl $1,r1"); /* r1 = subtest number */ ! 112: asm("movl $1,r2"); /* r2 = error code */ ! 113: asm("movl _cycle,r3"); /* r3 = cycle count */ ! 114: asm("movl _sgl_value_1,r4"); /* r4 = sgl operand #1 */ ! 115: asm("movl _sgl_value_2,r5"); /* r5 = sgl operand #2 */ ! 116: asm("movl _sgl_value_3,r6"); /* r6 = sgl operand #3 */ ! 117: asm("movl _sgl_st_acc,r7"); /* r7 = sgl stored */ ! 118: asm("movl _sgl_expected,r8"); /* r8 = sgl expected */ ! 119: asm("movl _sgl_value_4,r9"); /* r9 = op3 expected */ ! 120: asm("movl _index,r10"); /* r10 = data index */ ! 121: asm("halt"); /* HALT ... */ ! 122: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.