- Joined
- Oct 20, 2008
- Messages
- 5
- Reaction score
- 0
hey guys,
i need ur help in my project realy i dont know how to start and how to combine
plz i will put it and im waiting ur replay if u can
thx in advanced
Overview
In this project you will build a simple part of a microprocessor. Firstly you will build two main blocks: the ALU and the register file, then you will connect them together and run a simple machine code program on them.
In order to ensure that your design is individual to you, various aspects of the design will be dictated by your student ID number. These include the machine code used by your design, the contents of the register file, and the purpose of the program that you will use to demonstrate the correctness of your design. This means that every student should have a unique design.
You have to work individually in this project and demonstrate your work to me and submit a report about your design and implementation of this assignment.
Part 1
The ALU
Write a VHDL description of an ALU with two 32-bit inputs, A and B, and a 32-bit output Result.
The result is derived from one or both of the inputs according to the value of a 6-bit opcode. The operations that the ALU can perform are listed below:
• a + b
• a - b
• |a| (i.e. the absolute value of a)
• -a
• |b| (i.e. the absolute value of b)
• -b
• a or b
• not a
• not b
• a and b
• a xor b
The opcode that will be used to represent each of these operations is determined by the last digit of your student ID number. The table below shows which opcode you should use in your design for each instruction.
Digit of ID no. 0 1 2 3 4 5 6 7 8 9
a + b 15 8 15 9 2 8 9 11 8 15
a – b 10 1 8 1 7 11 6 12 15 11
|a| 1 6 2 3 14 10 15 14 5 10
-a 8 2 3 13 1 9 10 13 10 8
|b| 12 4 11 5 15 15 8 8 14 6
-b 11 12 5 2 3 2 11 7 3 3
a or b 5 14 10 15 9 14 5 3 6 5
not a 7 11 12 4 4 6 12 15 11 1
not b 3 10 6 10 8 7 2 4 9 14
a and b 6 5 4 12 5 3 13 10 1 2
a xor b 9 7 14 6 12 4 1 5 4 13
So, for example, if the last digit of your ID number is 2, then a+b is to be represented by opcode 15, a-b is to be represented by opcode 8, |a| is to be represented by opcode 2 and so on. (These are shown as denary values; your design will of course have to use binary or hexadecimal values.)
The register file
Inside a modern processor there is a very small amount of memory that is used to hold the operands that it is presently working on. This is called the register file, and normally has the following appearance.
This is a very small fast RAM, typically holding 32 x 32-bit words, and therefore requiring a 5-bit address to select out one of the 32-bit words. It is unlike normal RAM in that it can process three addresses at the same time, two of which are always read operations, and one of which is always written to.
Output 1 produces the item within the register file that is address by Address 1. Similarly Output 2 produces the item within the register file that is address by Address 2. Input is used to supply a value that is written into the location addressed by Address 3.
The initial values stored in the register file are determined by the second-from-last digit of your student ID, and are shown in the table below:
ID/
Location 0 1 2 3 4 5 6 7 8 9
0 0 0 0 0 0 0 0 0 0 0
1 7942 11661 12641 12995 4197 11930 4615 15034 5985 16302
2 13224 11562 10591 11490 5596 5348 11649 8854 12259 2994
3 15461 15339 6230 7079 14426 7307 11253 179 482 1658
4 8026 9594 8949 6026 7611 15684 6786 7225 14245 5473
5 7809 15060 10650 10027 7473 4883 8977 11855 4820 14881
6 9882 3287 9436 10344 10040 9715 12431 8928 1847 10835
7 8248 5931 3056 6733 3939 7820 13548 7301 5260 4648
8 3431 1977 4859 15833 4150 5190 13461 8921 16179 523
9 178 4911 3405 15314 6406 14702 13454 1044 4766 12200
10 8079 1664 5303 1400 8434 8210 14267 7074 14928 5396
11 8301 1926 547 12195 8572 2351 13179 258 619 14734
12 591 12725 13053 11290 16323 15423 2982 7354 15105 10997
13 7430 176 2809 13359 8849 2670 8096 3294 9794 4420
14 10572 8407 12988 2086 8258 4171 514 14740 7455 8754
15 14767 5463 1940 6840 10796 5843 3350 6499 9728 1924
16 1238 13604 2193 7439 8462 4744 10870 10436 9309 9049
17 16007 10221 11914 14101 13284 1285 12527 11900 12314 8714
18 2426 7262 15864 13209 4675 8122 9860 14694 12805 12007
19 11939 10199 11832 3264 3989 4558 6166 8839 10477 1005
20 7913 1033 2642 15072 14026 9209 6547 4598 1058 7802
21 12790 12431 2191 15845 7632 13349 14436 4532 6778 12746
22 4841 8723 1849 11719 9845 6917 12135 9083 8430 5461
23 7108 5412 13995 14735 5441 11700 5134 13838 5700 11810
24 6296 11082 12054 5338 12487 10722 11957 10017 13422 7590
25 11333 1639 3710 12405 12661 12691 5413 15642 13067 6519
26 10848 6187 12152 1851 831 3309 5258 5814 1990 10358
27 14698 7056 9875 3898 4664 2385 12420 670 921 15252
28 16378 3743 8733 16251 6798 11212 3569 8832 6020 11953
29 15456 5765 8308 1048 14166 3504 1248 15186 15768 13704
30 7523 10033 15654 7617 4476 15265 15915 8810 6093 12656
31 0 0 0 0 0 0 0 0 0 0
So, for example, if your students ID is 1060381 then the second-from-last digit of your ID number is 8; so item 0 should be 0, item 1 should be 5985, item 2 should be 12259, and so on. (N.B. these values are in denary (i.e. base 10). You will need to convert them to binary or hexadecimal.)
i need ur help in my project realy i dont know how to start and how to combine
plz i will put it and im waiting ur replay if u can
thx in advanced
Overview
In this project you will build a simple part of a microprocessor. Firstly you will build two main blocks: the ALU and the register file, then you will connect them together and run a simple machine code program on them.
In order to ensure that your design is individual to you, various aspects of the design will be dictated by your student ID number. These include the machine code used by your design, the contents of the register file, and the purpose of the program that you will use to demonstrate the correctness of your design. This means that every student should have a unique design.
You have to work individually in this project and demonstrate your work to me and submit a report about your design and implementation of this assignment.
Part 1
The ALU
Write a VHDL description of an ALU with two 32-bit inputs, A and B, and a 32-bit output Result.
The result is derived from one or both of the inputs according to the value of a 6-bit opcode. The operations that the ALU can perform are listed below:
• a + b
• a - b
• |a| (i.e. the absolute value of a)
• -a
• |b| (i.e. the absolute value of b)
• -b
• a or b
• not a
• not b
• a and b
• a xor b
The opcode that will be used to represent each of these operations is determined by the last digit of your student ID number. The table below shows which opcode you should use in your design for each instruction.
Digit of ID no. 0 1 2 3 4 5 6 7 8 9
a + b 15 8 15 9 2 8 9 11 8 15
a – b 10 1 8 1 7 11 6 12 15 11
|a| 1 6 2 3 14 10 15 14 5 10
-a 8 2 3 13 1 9 10 13 10 8
|b| 12 4 11 5 15 15 8 8 14 6
-b 11 12 5 2 3 2 11 7 3 3
a or b 5 14 10 15 9 14 5 3 6 5
not a 7 11 12 4 4 6 12 15 11 1
not b 3 10 6 10 8 7 2 4 9 14
a and b 6 5 4 12 5 3 13 10 1 2
a xor b 9 7 14 6 12 4 1 5 4 13
So, for example, if the last digit of your ID number is 2, then a+b is to be represented by opcode 15, a-b is to be represented by opcode 8, |a| is to be represented by opcode 2 and so on. (These are shown as denary values; your design will of course have to use binary or hexadecimal values.)
The register file
Inside a modern processor there is a very small amount of memory that is used to hold the operands that it is presently working on. This is called the register file, and normally has the following appearance.
This is a very small fast RAM, typically holding 32 x 32-bit words, and therefore requiring a 5-bit address to select out one of the 32-bit words. It is unlike normal RAM in that it can process three addresses at the same time, two of which are always read operations, and one of which is always written to.
Output 1 produces the item within the register file that is address by Address 1. Similarly Output 2 produces the item within the register file that is address by Address 2. Input is used to supply a value that is written into the location addressed by Address 3.
The initial values stored in the register file are determined by the second-from-last digit of your student ID, and are shown in the table below:
ID/
Location 0 1 2 3 4 5 6 7 8 9
0 0 0 0 0 0 0 0 0 0 0
1 7942 11661 12641 12995 4197 11930 4615 15034 5985 16302
2 13224 11562 10591 11490 5596 5348 11649 8854 12259 2994
3 15461 15339 6230 7079 14426 7307 11253 179 482 1658
4 8026 9594 8949 6026 7611 15684 6786 7225 14245 5473
5 7809 15060 10650 10027 7473 4883 8977 11855 4820 14881
6 9882 3287 9436 10344 10040 9715 12431 8928 1847 10835
7 8248 5931 3056 6733 3939 7820 13548 7301 5260 4648
8 3431 1977 4859 15833 4150 5190 13461 8921 16179 523
9 178 4911 3405 15314 6406 14702 13454 1044 4766 12200
10 8079 1664 5303 1400 8434 8210 14267 7074 14928 5396
11 8301 1926 547 12195 8572 2351 13179 258 619 14734
12 591 12725 13053 11290 16323 15423 2982 7354 15105 10997
13 7430 176 2809 13359 8849 2670 8096 3294 9794 4420
14 10572 8407 12988 2086 8258 4171 514 14740 7455 8754
15 14767 5463 1940 6840 10796 5843 3350 6499 9728 1924
16 1238 13604 2193 7439 8462 4744 10870 10436 9309 9049
17 16007 10221 11914 14101 13284 1285 12527 11900 12314 8714
18 2426 7262 15864 13209 4675 8122 9860 14694 12805 12007
19 11939 10199 11832 3264 3989 4558 6166 8839 10477 1005
20 7913 1033 2642 15072 14026 9209 6547 4598 1058 7802
21 12790 12431 2191 15845 7632 13349 14436 4532 6778 12746
22 4841 8723 1849 11719 9845 6917 12135 9083 8430 5461
23 7108 5412 13995 14735 5441 11700 5134 13838 5700 11810
24 6296 11082 12054 5338 12487 10722 11957 10017 13422 7590
25 11333 1639 3710 12405 12661 12691 5413 15642 13067 6519
26 10848 6187 12152 1851 831 3309 5258 5814 1990 10358
27 14698 7056 9875 3898 4664 2385 12420 670 921 15252
28 16378 3743 8733 16251 6798 11212 3569 8832 6020 11953
29 15456 5765 8308 1048 14166 3504 1248 15186 15768 13704
30 7523 10033 15654 7617 4476 15265 15915 8810 6093 12656
31 0 0 0 0 0 0 0 0 0 0
So, for example, if your students ID is 1060381 then the second-from-last digit of your ID number is 8; so item 0 should be 0, item 1 should be 5985, item 2 should be 12259, and so on. (N.B. these values are in denary (i.e. base 10). You will need to convert them to binary or hexadecimal.)