;; Copyright 1987 by NeXT Inc. ;; Author - John Strawn ;; ;; Modification history ;; -------------------- ;; 02/19/88/jms - initial file created from DSPAPSRC/cvadd.asm ;; 02/23/88/jms - cosmetic changes to code and documentation ;; 03/29/88/jms - fix bugs in CALLING DSP PROGRAM TEMPLATE ;; ;; ------------------------------ DOCUMENTATION --------------------------- ;; NAME ;; qc (AP macro) - utility for quality control and inhouse testing ;; - copy a datum into alu A register and into a standard memory location ;; ;; SYNOPSIS ;; include 'stdmacros' ; load standard DSP macro package ;; qc pf,ic,sinp,ainp ;; ;; MACRO ARGUMENTS ;; pf = global label prefix (any text unique to invoking macro) ;; ic = instance count (such that pf\_qc_\ic is globally unique) ;; sinp = input datum memory space ('x' or 'y') ;; ainp = input datum address ;; ;; DSP MEMORY ARGUMENTS ;; Access Description Initialization ;; ------ ----------- -------------- ;; x:(R_X)+ input vector 1 base address ainp ;; ;; DESCRIPTION ;; The qc array-processor macro copies a datum from a given location into ;; 1) the A alu register and 2) some standard location. That location ;; is examined by quality control software/personnel. After one or ;; more tests of a given macro are run, the result of each test should ;; be 999. The sum of all of those 999's should be added to ;; a constant to produce another 999, if all has gone well. ;; The address of that final 999 is passed to the qc macro. In ;; pseudo-C notation: ;; ;; ainp = x:(R_X)+; ;; ;; y:adr = sinp:ainp; ;; A = sinp:ainp; ;; ;; MEMORY USE ;; 1 x-memory argument ;; 5 program memory locations ;; ;; EXECUTION TIME ;; 5 instruction cycles ;; ;; DSPWRAP ARGUMENT INFO ;; qc (prefix)pf,(instance)ic, ;; (dspace)sinp,ainp ;; ;; DSPWRAP C SYNTAX ;; ierr = DSPqc(aS1); /* ;; aS1 = source base address */ ;; ;; CALLING DSP PROGRAM TEMPLATE ; see also DSPAPSRC/test/tqc.asm ;; include 'stdmacros' ;; beg_ap 'tqc' ;; symobj ax_vec ;; new_xeb ax_vec,1,$999 ;; qc ap,1,x,ax_vec ;; end_ap 'tqc' ;; end ;; ;; TEST PROGRAM ;; DSPAPSRC/test/tqc.asm ;; ;; SOURCE ;; DSPAPSRC/qc.asm ;; ;; REGISTER USE ;; A input datum ;; R_I1 pointer to input term ;; beg_def 'qc' qc macro pf,ic,sinp,ainp0 beg_mac 'qc' ; argument definitions new_xarg pf\_qc_\ic\_,ainp,ainp0 ; get inputs move x:(R_X)+,R_I1 ; input address nop ; for pipelining of address register ; inner loop move sinp:(R_I1),A ; input datum to A move A1,y:>$FF ; move datum to high Y internal memory end_mac 'qc' endm end_def 'qc'