30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

the base address of the matrix. Because each element of the matrix is 16 bits, the<br />

base<br />

address mustbe aligned to an even address.<br />

The two dimensional arrangement of a matrixis emulated in the memory storage<br />

area<br />

by placing its elements organized in row major order. Thus, the first value in<br />

memory is<br />

the first element of the first row. It is followed by the rest of the elements of the<br />

first row.<br />

Then, the elements of the second row are stored, and so on, until all the rows are<br />

in<br />

memory. This way, the element at row r and column c of a matrix with R rows<br />

and C<br />

columns is located from the matrix base address BA at:<br />

BA + 2(C(r-1) + c-1), for 1 ≤r ≤R, 1 ≤c ≤C.<br />

Note that the factor of 2 is used because of the byte addressing capabilities of<br />

the<br />

dsPIC30F.<br />

Unary and binary fractional matrix operations are implemented in this library.<br />

The<br />

operand matrix in a unary operation is called the source matrix. In a binary<br />

operation<br />

the first operand is referred to as the source one matrix, and the second matrix<br />

as the<br />

source two matrix. Each operation applies some computation to one or several<br />

elements of the source matrix(ces). The operations result in a matrix, referred to<br />

as the<br />

destination matrix.<br />

Some operations resulting in a matrix allow computation in place. This means<br />

the<br />

results of the operation is placed back into the source matrix (or the source one<br />

matrix<br />

for a binary operation). In this case, the destination matrix is said to (physically)<br />

replace<br />

the source (one) matrix. If an operation can be computed in place, it is indicated<br />

as<br />

such in the comments provided with the function description.<br />

For some binary operations, the two operands can be the same (physical) source<br />

matrix, which means the operation is applied to the source matrix and itself. If<br />

this type<br />

of computation is possible for a given operation,it is indicated as such in the<br />

comments<br />

provided with the function description.<br />

Some operations can be self applicable and computed in place.<br />

dsPIC<br />

®<br />

phạm vi của bộ nhớ dữ liệu có sẵn cho các thiết bị mục tiêu.<br />

b) Trong trường hợp hoạt động nhị phân số hàng và cột của toán hạng<br />

ma trận mustobey các quy tắc của vector đại số; tức là, cho ma trận cộng và trừ<br />

hai ma trận phải có cùng số hàng và cột,<br />

trong khi cho phép nhân ma trận, số lượng các cột của toán hạng phải đầu tiên<br />

giống như số lượng hàng của toán hạng thứ hai. Nguồn ma trận<br />

các hoạt động đảo ngược phải vuông (cùng một số hàng như của<br />

cột), và không ít (yếu tố quyết định của nó khác nhau hơn không).<br />

c) ma trận điểm đến mustbe đủ lớn để chấp nhận các kết quả của một hoạt động<br />

2.5.2 Xem xét tài khoản<br />

a) Không kiểm tra ranh giới được thực hiện bởi các chức năng này. Trong phạm<br />

vi kích thước<br />

(Bao gồm cả hàng không và / hoặc không có ma trận cột) cũng như sử dụng<br />

không phù hợp<br />

nguồn kích thước ma trận trong hoạt động nhị phân có thể tạo ra kết quả bất<br />

ngờ.<br />

b) Các cộng và trừ các hoạt động ma trận có thể dẫn đến bão hòa nếu tổng<br />

các yếu tố tương ứng trong nguồn (s) ma trận (CES) lớn hơn 1-2<br />

-15<br />

hoặc<br />

nhỏ hơn -1.<br />

c) Các hoạt động nhân ma trận có thể dẫn đến bão hòa nếu tổng sản phẩm<br />

các hàng và cột bộ kết quả tương ứng trong giá trị lớn hơn 1-2<br />

-15<br />

hoặc<br />

nhỏ hơn -1.<br />

d) Đó là khuyến cáo rằng tình trạng đăng ký (SR) được kiểm tra sau khi hoàn<br />

thành<br />

mỗi lần gọi hàm. Đặc biệt, người dùng có thể kiểm tra việc SA, SB và SAB cờ<br />

sau<br />

hàm trả về để xác định độ bão hòa xảy ra.<br />

e) Tất cả các chức năng đã được thiết kế để hoạt động trên các ma trận phân<br />

đoạn phân bổ<br />

trong không gian bộ nhớ RAM mặc định (X-Y-dữ liệu hoặc dữ liệu).<br />

e) Các hoạt động đó trả về một ma trận điểm đến có thể được lồng vào nhau, do<br />

đó ví dụ<br />

nếu:<br />

a = OP1 (b, c), với b = OP2 (d) và c = op3 (e, f), sau đó<br />

a = OP1 (OP2 (d), op3 (e, f))<br />

2.5.3 Bình luận khác<br />

Mô tả các chức năng giới hạn phạm vi của nó những gì có thể được coi là<br />

thường xuyên<br />

sử dụng các hoạt động này. Tuy nhiên, vì không có kiểm tra biên giới được thự<br />

hiện trong quá trình<br />

tính toán của các chức năng này, bạn có quyền tự do để giải thích các hoạt động

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

Saved successfully!

Ooh no, something went wrong!