30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

0 ≤i < numRows1<br />

0 ≤j < numCols2<br />

0 ≤k < numCols1Rows2<br />

Include: dsp.h<br />

Prototype: extern fractional* MatrixMultiply (<br />

int numRows1,<br />

int numCols1Rows2,<br />

int numCols2,<br />

fractional* dstM,<br />

fractional* srcM1,<br />

fractional* srcM2<br />

);<br />

Arguments: numRows1 number of rows in source one matrix<br />

numCols1Rows2 number of columns in source one matrix; which<br />

mustbe the same as number of rows in source<br />

two matrix<br />

numCols2 number of columns in source two matrix<br />

dstM pointer to destination matrix<br />

srcM1 pointer to source one matrix<br />

srcM2 pointer to source two matrix<br />

Return Value: Pointer to base address of destination matrix.<br />

Remarks: If the absolute value of<br />

is larger than 1-2<br />

-15<br />

, this operation results in saturation for the<br />

(i,j)-th element.<br />

If the source one matrix is squared,then this function can be computed<br />

in place and can be self applicable. See Additional Remarks at the<br />

beginning of the section for comments on this mode of operation.<br />

Source File: mmul.asm<br />

Function Profile: System resources usage:<br />

W0..W7 used, not restored<br />

W8..W13 saved, used, restored<br />

ACCA used, not restored<br />

CORCON saved, used, restored<br />

DOand REPEATinstruction usage:<br />

2 level DOinstructions<br />

no REPEATinstructions<br />

Program words (24-bit instructions):<br />

ma trận.<br />

Bao gồm: dsp.h<br />

Nguyên mẫu: ở ngoài phân đoạn * MatrixScale (<br />

int numrows,<br />

numCols int,<br />

phân đoạn * dstM,<br />

phân đoạn * srcM,<br />

phân đoạn sclVal<br />

);<br />

Đối số: numrows số hàng trong ma trận nguồn<br />

numCols số lượng cột trong ma trận nguồn<br />

dstM con trỏ đến ma trận điểm<br />

con trỏ srcM để ma trận nguồn<br />

sclVal giá trị mà quy mô các yếu tố ma trận<br />

Quay trở lại giá trị: Con trỏ trỏ tới địa chỉ cơ sở của ma trận đích.<br />

Bình luận: Chức năng này có thể được tính tại chỗ.<br />

Source File: mscl.asm<br />

Chức năng thông tin: sử dụng nguồn tài nguyên của hệ thống:<br />

W0..W5 sử dụng, không được khôi phục<br />

ACCA được sử dụng, không được khôi phục<br />

CORCON lưu, sử dụng, phục hồi<br />

DOand REPEATinstruction sử dụng:<br />

1 DOinstructions cấp<br />

không REPEATinstructions<br />

Từ chương trình (hướng dẫn 24-bit):<br />

14<br />

Chu kỳ (bao gồm cả cuộc gọi C-chức năng và trả các chi phí):<br />

20 + 3 (numrows * numCols)<br />

MatrixSubtract<br />

Mô tả: MatrixSubtractsubtracts giá trị của mỗi phần tử trong mã nguồn<br />

hai ma trận từ đối tác của mình trong nguồn một ma trận, và đặt<br />

kết quả trong ma trận đích.<br />

Bao gồm: dsp.h<br />

Nguyên mẫu: ở ngoài phân đoạn * MatrixSubtract (<br />

int numrows,<br />

numCols int,<br />

phân đoạn * dstM,<br />

phân đoạn * srcM1,<br />

phân đoạn * srcM2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!