⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrix_test.asm

📁 adsp2116x的矩阵乘运算
💻 ASM
字号:

/**************************************************************

File Name:		matrix_test.asm

Date Modified:  2/22/00	GGL		
				6/6/00	GGL	modified so that SIMD is enabled in
							matrixbymatrix.asm instead of here
				6/7/00	GGL verified on 0.1 Si; doesn't work in 0.0

Description:	Program to call matrixbymatrix.asm

**************************************************************/

#include    "def21160.h"
#define		M 8
#define		N 8
#define		P 4
/* dimension constants */

.GLOBAL mxnxnxp;

.section/DM seg_dmda;
.ALIGN 2;	/* Assembler directive to align buffers to longword address space */
.VAR		mat_a[M*N]="mat_a.dat";	/* Matrix A, input array in row major order  */
.VAR		mat_c[(M*P)+1];	/* Matrix C, output array in row major order */


.section/PM seg_pmda;
.ALIGN 2;	/* Assembler directive to align buffers to longword address space */
.VAR		mat_b[N*P]="mat_b.dat"; /* Matrix B, input array in row major order  */


/* PM interrupt vector code */
.section/pm   seg_rth;
Reserved_1:     rti; nop; nop; nop;
Chip_Reset:     idle; jump start; nop; nop;


/* program memory code */		
.section/PM seg_pmco;
start:		

/* modify values */
		m0=1;
		m1=2;
		m9=2;
/* buffers for input matricies (mat_a and mat_b) ouput matrix (mat_c) */
		b0=mat_a;	l0=@mat_a;
		b1=mat_c;	l1=0;
		b8=mat_b;	l8=@mat_b;
/* clear some registers */
  		r8=0;
		r12=0;
		r0=0;
/* matrix dimentions */
		r15=M;
		r14=N/2;
		r6=N;
		call mxnxnxp (db);	/* call function that multiplies the two matricies */
		r7=P;
		r5=i0;
/* Terminate and wait */
wait1:   jump wait1;
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -