” COMP1027程序 写作、Java,c++,Python编程语言COMP1027 Computer FundamentalsSession Semester AutumnModule Name Computer Fundamentals Code COMP1027Module Convenor(s)(CW Convenor in Bold)Amr AhmedCoursework Name Exercise 3 (part 3 of the Coursework) Weight 20%Deliverable(a brief description of what isto be handed-in; e.g.software, report,presentation, etc.)Please See details (last page) in the assignment document (below), includinglist and Description of the required tasks and details of the submission.Group Submission ONLYDetails explained in the Submission Details section (last page, below)Format(summary of the technicalformat of deliverable, e.g.C source code as zip file,pdf file, 2000 word max,ppt file, 10 slides max, etc.)As explained in the Submission Details, (last pages, below).All the required files.Issue Date 9th November 2020 (HACK already started in Lab on 5th Nov)Submission Date November 2020 (22:00) nd 22Submission Mechanism Online, through moodle.Late Policy(University of Nottinghamdefault will apply, if blank)Feedback Date Usual 15 working days.Feedback Mechanism Online, on moodle.Instructions See the Ex3 document (below)Assessment Criteria All chips code will be tested through testing scripts.Developed and working properly full mark of the component(unless there is any Concern of any cutting corners/plagiarism,.etc.).Missing any required file(s), using different formats, naming,etc. will attractpresentation penalty. Marks Of this Ex3 submission will be modified by multiplying by afactor from the VIVA process, which can heavily affect the final mark(depending on the demonstrated understanding of the group individuals in the viva)COMP1027 Computer Fundamentals2Exercise 3: The Hack Computer (All together)(Covering Teaching Weeks 7-9)[ GROUP Submissions are Assessed, worth 20%]IntroductionIn total, the coursework (lab work, split into multiple submissions, and assignments) is worth50% of your final mark.This exercise has TWO parts, as you can see below. But first, in Task 0, you need to downloadthe files required for this exercise, which specifies the folder structure and names for thesubmission.Task 0: Download Files [ALL]Ex3-Files.zip provides all the sekelton .hdl and .asm (as well as most of the related tst and cmpfiles). Download the Ex3-Files.zip file, from the Exercise 3 area on moodle. Extract the files and fill in the required HDL and Assembly codes, as per the tasks in thisdocument (both part1 and part2, in there respective folders). MAINTAIN the same folder structure, file names, and all test compare files, when yousubmit. You Can add any additional files you may need to get your submissions workingproperly.Marking note See the associated Marking Sheet, on moodle, for the breakdown of marks. You are allowed to use Built-in chips, for chips/gates already done in the previous exercisesand/or any auxiliary chips that you may need (except any of those that are required, to bedeveloped, in this exercise 3 itself). All chips code will be tested through testing scripts. Marks of this Ex3 submission will be modified by multiplying by a factor from the VIVA process,which can Heavily affect the final mark (depending on the demonstrated understanding of the group individuals in the viva)This exercise has TWO parts.COMP1027 Computer Fundamentals3Part 1: Assembly Code [ 35% of Ex3 marks]In this part of the assignment, you are required to provide two Assemblyprograms (for the HACK computer) to the following tasks:a. An Assembly code that does Multiplication: [GROUP] Implement a multiplication Assembly code that multiplies R1 (RAM[1]) andR2 (RAM[2]) and stores the result in R3 (RAM[3]).Hint: Obviously, there is no multiplication instruction/code to use (the underlyingALU can only Add numbers). So, how do you perform a multiplication for twonumbers A and B? Well, you can just add A for B-numbers of times. For example,if B is 3, then A x B is the same as A + A + A. Here, you would treat A as a storedconstant while B is a variable that you keep track of. If you make no progress. Why dont you implement the algorithm in CLanguageand use what you learn from the Addition example, demonstrated indetails in the lecture and lab, to come out with the corresponding machine code forthis task.b. An Assembly Code that does Factorial: [GROUP]o Implement an Assembly program to calculate the factorial of a givennumber n, F(n). A factorial of a number is given by:F(n) = n*(n-1)*(n-2)*……*2*1o The user should enter the value of the number n into R0. i.e. RAM[0]o The factorial result F(n) should be saved in RAM[1].SUBMISSION: SUBMIT your answers, i.e., completed Mult.asm and Factorial.asmfiles (and all associated tst and cmp files).P.T.O COMP1027 Computer Fundamentals4Part 2: The Hack Computer [65% of Ex3 marks]Context, Description, and suggestions: In the previous exercises and lab sessions, we used combinatorial and sequential logiccircuits to construct Many of the various core logic circuits that form the basis of a CPU andMemory. This exercise concludes all the effort by completing the construction of the Hack computer,i.e. putting it all Together and have the Hack Computer working executing instructions.o Firstly, The Memory will be built according to the Hack architecture.o Secondly, the CPU will combine the ALU and other circuits. But youll need todevelop the Control Unit that manages the data flow and execution of instructions.o Finally, all are connected together as one chip (the Computer)o You should go through Lecture slides, Chapter 5 and Appendix A of the primary textcarefully. More lab reading resources are available at www.nand2tetris.org/05.php. In particular, go tothe Resources subsection, download Chapter 5 (and relevant appendices). Note that for this exercise, all tasks are made in Group work. You are encouraged to breakyour group into subgroups, each working on a different task. You should finish your tasksfaster this way. However, you must maintain communication between subgroups, that is,every single member is Expected to be able to explain the design implementation for eachindividual task (this will be verified during the VIVA examination, after the submission).NOTEs: Do not worry if you didnt manage to complete any of the previous exercises, or yourimplementation (from previous exercises) doesnt work correctly since nand2tetris providesbuilt-in implementations (implemented in Java) of all the required chips. To ensure you usethese built-in implementations, we recommend you keep the files for this exercise away fromthe previous exercises (and you MUST maintain the provided folder structure).All files, for Part2, will be under ONE folder (i.e. NO Sub-folderunder Part2). Please see stick to the provided zip file its folderstructure file namesTask A: Memory [GROUP] Implement the Memory chip.Hint: The Specification for the memory chip is described in the lecture and Chapter 5. Notethat you Would have to use RAM16K, Screen, and Keyboard parts (built-in, but you shouldrefresh yourself with its interface specifications in Chapter 5, for the latter two).COMP1027 Computer Fundamentals5 If you make no progress. You need to understand what makes a memory chip there is thisneed for addressing/selecting memory banks. How do you select between 3 outputs(RAM16K, Screen, Keyboard)? (Mux4Way*? DMux4Way*?). You still need tointerpret/decode a 15-bit address and pass them through to the right memory banks(RAM16K, Screen, or Keyboard). The memory addresses are already given to you (e.g.lecture slides, And Chapter 5). The logic for interpretation/decoding would make more senseonce you convert them to binary. You would note that only certain address bits are crucial forselection.SUBMISSION: SUBMIT your answers, i.e., completed Memory.hdl file (and associated tstand cmp files).Task B: CPU [GROUP] Implement the CPU chip.Hint: This may be the most challenging task So, give it enough attention. The CPUimplementation (framework) is given in the lecture and Chapter 5, Section 5.3.1. In general,the CPU as a complex logical gate would fetch and execute instructions in theircorresponding A- and C-Instruction codes (16-bits long). If you make no progress. Look at the Chip diagram of CPU implementation in the lectureand in Chapter 5. Adopt a divide-and-conquer approach, that is, try to solve the problem byparts. Use this skeleton and compare with the Chip diagram:// Instruction decode// Use a Combination of elementary logical gates to decode the instructions// You should first decode between A and C-Instructions,// then the computation and destination..And (a=cInst, b=instruction[4], out=destD);..// A register and input muxMux?? ();?? ();ARegister ();// D registerDRegister(in=aluOut, load=destD, out=dReg);// ALU and input muxMux16 ();ALU ();COMP1027 Computer Fundamentals6// PC with jump test// Use a combination of elementary logical gates to implement the truth table for jump// functions, given in lectures.// For example, try to figure out why one implementation would make use of:// Or (a=jle, b=jgt, out=jmp);..PC (in=aReg, reset=reset, inc=true, load=jmp, out[0..14]=pc);NOTE: the above pseoudo-code is for illustration purposes only. It may NOT be complete/accurate for the HDLsimilar. You only use it as a guide/hint.SUBMISSION: SUBMIT your answers, i.e., completed CPU.hdl file (and associated tst andcmp files). You are also required to submit a full circuit diagram of your CPU implementation.Task C: Computer [GROUP] Implement the Computer chip.Hint: This is easy, and as a bonus only 3-lines of code:CPU (inM=??, instruction=??, reset=??, writeM=??, outM=??, addressM=??, pc=??);Memory (in=??, load=??, address=??, out=??);ROM32K (address=??, out=??); The provided zip file contains couple of test files (e.g. ComputerMax, ComputerAdd,ComputerRect), to test your Computer chip. Make sure to utilize them and properly test yourchip before submission.SUBMISSION: SUBMIT your answers, i.e., completed Computer.hdl file (and associatedtst and cmp files). P.T.O COMP1027 Computer Fundamentals7FINAL SUBMISSION INSTRUCTIONS1. For All Tasks, students are required to work in small groups (as listed).2. Each group will have ONE submission ONLY (by one nominated member of the group).3. The nominated Member, for each group, should notify us about the submission and indicatewhich group he/she represents.4. We reserve the right to ask all/some students to explain any/all of their submitted work atany time. Failure to answer/respond appropriately could affect your marks.5. The group Submission must be submitted through Moodle as a ZIP archive containing allthe requested files (same folder structure as per the downloaded file). The ZIP file shouldbe named as CSF-Ex3-XX.zip, where XX is the Group Number.6. NOTE about the Compressed File:a. Use .ZIP format ONLY (any other compression formats is NOT acceptable and willresult in you losing marks for not adhering to instructions).b. Compress the whole folder structure/tree only (see the provided zip file, for anexample). i.e. Avoid compressing each individual folder/file. Nested compression willprevent the marking Process and could result in marking scripts failing, and hencelosing a lot (if not all) of marks.Click on the Exercise 3 link under Coursework Submission. Take note of theDeadline 22nd November 2020, 22:00.Any submission after this will be subject to the usual penalty rule.There will be a VIVA (oral examination) after the submission. The result ofthe viva could highly Affect the final mark of the group and individuals(depending on the demonstrated understanding in the viva).——————————————- Best Wishes ———————————————–如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。