 •Introduction
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Questions for the SelfTesting
 •Laboratory work 1.2 a study of a systolic processor module using the simulation modeling method
 •Basic Principles
 •Execution of the laboratory work
 •Make a careful study of the components systolic processor modules are realized with.
 •Contents of the Experimentation Paper
 •H ome work
 •Questions for the SelfTesting
 •Module 2 CalculationGraphical Work modeling of algorithmic calculation graphs using petri nets
 •Execution of the CalculationGraphical Work
 •Laboratory work 2.1 a study of parallelism in algorithmic structure
 •Basic Principles
 •1. (Aiaktf); 2. (Fiaktf); 3. (FiFktf); 4. )aitk); 5. )ti); 6. )Fitk).
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Home work
 •Questions for the SelfTesting
 •Laboratory work 2.2 modeling of an onboard computers by means of a petri nets
 •Basic Principles
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Home work
 •Questions for the SelfTesting
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Questions for the SelfTesting
 •Laboratory work 3.2 realization of dl addition and subtraction operations
 •Basic Principles
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Questions for the SelfTesting
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Questions for the SelfTesting
 •Laboratory work 4.2 realization of dl division operations
 •Basic Principles
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Questions for the SelfTesting
 •Laboratory work 4.3 processing of measurement results
 •Basic Principles
 •Execution of the laboratory work
 •Contents of the Experimentation Paper
 •Questions for the SelfTesting
 •Exercises and tasks
 •List of literature
MINISTRY OF EDUCATION AND SCIENCE OF UKRAINE
National Aviation University
COMPUTER MODELING
AND SIMULATION
Laboratory Manual for students
Speciality 6.091500 "Computer systems and networks"
Kyiv 2008
Introduction
The given laboratory works are aimed at students fixing the theoretical material studied within the subject “Computer Modeling and Simulation” and acquiring skills for their independent solution of computer modeling and simulation design problems.
The manual contains basic facts about the subject and has been compiled according to the curriculum.
Preparation for the laboratory works requires student’s independent work with appropriate literature. The theoretical material, which is necessary for successful execution of the laboratory works, is considered in the appropriate sections of the subject and given in the works [16].
MODULE 1
Laboratory work 1.1
MODELING OF DATA PROCESSING PRECISION IN A DIGITAL SUBSYSTEM
Aim of the work: The work is aimed at studying the precision of data processing in digital subsystems at the instructionoperation level.
Basic Principles
Digital subsystems realize multiplication operations. Algorithms of multiplication and raising to a power are performed with using digital logarithmic (DL) data representation.
The main statements of DL representation are as follows [1, 2]. Let an ncapacity binary number A be represented in a fixed point format (FP); where is the radix.
Each digit a_{i} equal to nonzero ( ) may be represented as a position digit number N_{i}. Thus the binary number A can be represented by an array of nonzero digit numbers:
where N_{i} is the number of nonzero digits ( ).
The conversion from binary representation to the form where each nonzero digit is represented by its number is uniquely determined and realized without additional functional transforms. The substitution operation is performed with each nonzero digit.
The binary numbers A = 1101000101 and B = 101101101 in DL representation have the form: A^{N} = 9.8.6.2.0. and B^{N} = 8.6.5.3.2.0.. For a reverse transfer into binary representation (binary code) a decoding operation should be used.
For displaying the number of nonzero N_{i} digit, ]log_{2}(n + 1)[ binary digits are needed (] ∙ [ is the largest nearest integer), where n is the operand capacity. In computer memory digit number n with a number of significant (nonzero) digits Q occupies the volume of bits. Note that for the operand representation which has no significant digits (equal to zero), the descriptor should be used which designates the equality to zero of this operand. The structure of DL representation which indicates the number of significant unities is the most practical. The operand A^{N} with Q(A) significant unities is written (for FP format) as signA,Q(A),A^{N}. Since for writing N_{i}, ]log_{2}(n + 1)[ digits are needed, it occupies the volume of bits. When DL data representation in the computer is realized, the simulation of information flows shows that real numbers can be represented as the array with the number of elements from 57 up to 1520. For example, the operand A = +1011.0101 is represented as
signA,Q(A),N_{1}N_{2}N_{3}N_{4}N_{5} → 0,5,3.1.0.2.4.
The use of DL representation makes it possible to build a common structure for formats with floating points (FlP) and fixed points (FP). For each number of nonzero digits in FlP format, the representation capacity may be increased by 1 bit; the value of the order is added to each number if this order is the power index of 2. Consequently, the structure of a generalized representation for FlP and FP has the form:
signA 
Q 
N_{1} + p 
N_{2} + p 
… 
N_{i} + p 
… 
N_{n} + p 
where n is the order.
By means of the common structure for data, the organization of hardware and software can be simplified.
Let us define the range of number change in computer by using DL representation. Let B_{max}, B_{min} be the numbers corresponding to maximum and minimum values; n is the word length. If the coefficient of the range overlapping S for binary representation is defined as [3], for DL representation it is similarly defined as . The mantissa of the binary operand A of n capacity may be used for displaying the position number of significant unity by DL representation of the number A. With the capacity n, the maximum number is defined as 2^{n} – 1. Taking into account that the number of significant unity is written with a sign, the maximum and minimum numbers are defined by DL representation as:
.
The range overlapping coefficient is much greater than the n capacity. Note that by DL representation, the capacity is increased from n_{2} to n_{DL }= 2(2^{n}  1).
Now we give the numbers of binary digits n_{2} and the digits of DL representation n_{DL} obtained by coding in appropriate n_{2} and also the ranges of D number change at word lengths n_{DL}.
n_{2} 
7 
8 
9 
10 
n_{DL} 
254 
510 
1022 
2046 
D 
2^{127}≤x≤2^{+127} 
2^{255}≤x≤2^{+255} 
2^{511}≤x≤2^{+511} 
2^{1023}≤x≤2^{+1023} 
When the range of data change is extended, the calculation precision becomes higher in hardware. Contrary to the traditional number representation, DL codes permit decrease of the influence of the rounding factor because, along with the most significant digits, the least significant digits can be retained. These latter were usually rejected. This property is of a practical importance: for example, in digital signal processing, the possibility appeared of complex treatment of signals with great and small amplitudes.
The method of number representation determines the performance rules and algorithms for the operations to be made. Consider the realization of computer operations in DL representation.
The rules of digital operation performance (N_{i}, N_{k} are the nonzero digits of operands):
addition: N_{i} + N_{k} = N_{i}, N_{k}, if N_{i} > N_{k};
N_{i} + N_{k} = N_{i} + 1, if N_{i} = N_{k};
subtraction: N_{i}  N_{k} = N_{i}_{1}, N_{i}_{2}, … , N_{k}, if N_{i} > N_{k};
N_{i}  N_{k} = 0, if N_{i} = N_{k};
multiplication: N_{i} ∙ N_{k} = N_{i}, + N_{k};
shift of the number at c digits: (N_{1},N_{2},…,N_{n})(N_{1}+c,N_{2}+c,…,N_{n}+c);
AND logic: N_{i} Λ N_{k} = 0, if N_{i} ≠ N_{k}; N_{i} Λ N_{k} = N_{i} if N_{i} = N_{k};
OR logic: N_{i} V N_{k} = N_{i} if N_{i} = N_{k}; N_{i} V N_{k} = N_{i}, N_{k}, if N_{i} ≠ N_{k}.
For organizing data processing in DL representation one should take into account the equality of the position number of a nonzero digit to the logarithm of weight which is defined by this digit. As is shown above, in the rules of multiplication performance, this representation reduces multiplications to the realization of additionsubtraction operations. The product of two numbers in DL representation is realized as the procedure of elementbyelement addition of two vectors [1].
Using DL representation permits extending the range of data processing (with the given n capacity) up to , which is enough to exclude the influence of the rounding.
Multiplication operations in this laboratory work has been chosen because the exact result of such operations requires doubling the word length, which may not always be realized in multiple calculations.
Example 1: A=25_{10}=11001_{2}=4.3.0._{DL} and B=13_{10}=1101_{2}=3.2.0._{DL}

4.+3. 3.+3. 0.+3.
Product A∙B =
4.+2. 3.+2. 0.+2.
= 7.6.4.6.5.3.3.2.0._{DL}
4.+0. 3.+0. 0.+0.
Next we collect the terms of the resultant array:
A∙B = 8.6.2.0._{DL}
Transforming it to decimal representation, we have:
A∙B = 2^{8} + 2^{6} + 2^{2} + 2^{0} = 325_{10}.
For modeling the precision of processing, we realize multiplication of the operands A and B in the binary and DL representations. We represent both results in DL codes and compare the numbers of significant units in both variants.
During the multiplication of A = 25_{10} and B = 13_{10}, a part of partial products is lost for the case of singleprecision realization:
Example 2: A = 29067.125_{10} = 14.13.12.8.7.3.1.0.3._{DL}
B = 897543.5_{10} = 19.18.16.15.13.12.9.2.1.0.1._{DL}
We get the product as the array:
33 
32 
30 
29 
27 
26 
23 
16 
15 
14 
13 
32 
31 
29 
28 
26 
25 
22 
15 
14 
13 
12 
31 
30 
28 
27 
25 
24 
21 
14 
13 
12 
11 
27 
26 
24 
23 
21 
20 
17 
10 
9 
8 
7 
26 
25 
23 
22 
20 
19 
16 
9 
8 
7 
6 
22 
21 
19 
18 
16 
15 
12 
5 
4 
3 
2 
20 
19 
17 
16 
14 
13 
10 
3 
2 
1 
0 
19 
18 
16 
15 
13 
12 
9 
2 
1 
0 
1 
16 
15 
13 
12 
10 
9 
6 
1 
2 
3 
4 
The ordered array of the product:
33 
32 
32 
31 
31 
30 
30 
29 
29 
28 
28 
27 
27 
27 
26 
26 
26 
26 
25 
25 
25 
24 
24 
23 
23 
23 
22 
22 
22 
21 
21 
21 
20 
20 
20 
19 
19 
19 
19 
18 
18 
17 
17 
16 
16 
16 
16 
16 
16 
15 
15 
15 
15 
15 
14 
14 
14 
14 
13 
13 
13 
13 
13 
13 
12 
12 
12 
12 
12 
11 
10 
10 
10 
9 
9 
9 
9 
8 
8 
7 
7 
6 
6 
5 
4 
3 
3 
2 
2 
2 
1 
1 
0 
0 
1 
1 
2 
3 
4 
The ordered array of the product with collected terms:
34 33 28 25 24 18 17 15 13 11 10 9 8 7 6 4 1 0 2 3 4.
The product calculated by a PC algorithm is 34 33 28 25 24 18 17 15 14.
The bits of difference between the two products are:
13 11 10 9 8 7 6 4 1 0 2 3 4.
The difference between the two products is 12.5.3.2.1.4._{DL} = 4140.5625_{10}. In calculating products of large numbers, the error increases.
Тут вы можете оставить комментарий к выбранному абзацу или сообщить об ошибке.
Оставленные комментарии видны всем.