美文网首页
讲解:COMP1212、GitLab、Java/Python、c

讲解:COMP1212、GitLab、Java/Python、c

作者: hezhonghong | 来源:发表于2020-01-12 11:49 被阅读0次

    Coursework 2Computer Processors (COMP1212)The files required to complete this coursework are available on GitLab.You should complete the coursework in the files provided, do not renameany of the files or change the directory structure.Submission You must submit your work via GitLab and also on the Minerva.1. GitLab: Ensure that all changes have been committed and pushedbefore the deadline. You should commit frequently.2. Minerva: Ensure that the coursework directory is compressed intoa .tar.gz archive and submitted to the Minerva.Late submissions are accepted up to 7 days late. Each day, or part ofa day, will incur a 5% penalty.Deadline TBC.Weighting This piece of summative coursework is worth 15% of your grade.This coursework involves implementing components of a computer processorcovered in te lectures. You should provide an implementation of eachof the following components in hdl. You are provided with a description ofthe behaviour of each of the components as well as test files to ensure itbehaves according to specification.Implement the following .hdl files- HalfAdder.hdl- FullAdder.hdl- Add16.hdl- ALU.hdl- Bit.hdl- Register.hdl- Inc16.hdl1- PC.hdl- RAM8.hdl- RAM64.hdl- RAM512.hdl- RAM4K.hdl- RAM16K.hdl- CPU.hdl- Computer.hdlMarkingThe marking of the .hdl files is automated so it is important that you do notrename or alter the directory structure of your submission from that providedon GitLab and Minerva. Marks will be allocated in the following way:- 10 marks for correct implementation of the components according totheir specification- 5 marks for minimising complexity of the implementations2Chip descriptionsChip name: HalfAdderInputs: x, yOutputs: sum, carryFunction: Computes the sum of two bits.Chip name: FullAdderInputs: x, y, zOutputs: sum, carryFunction: Computes the sum of three bits.Chip name: Add16Inputs: x[16], y[16]Outputs: resultFunction: Adds two 16-bit values. The most significant carry bit is ignored.3Chip name: ALUInputs: x[16], y[16], zx, nx, zy, ny, f, noOutputs: out[16],zr,ngFunction: Computes one of the following functions: on two 16-bit inputs, according to 6 input bits denoted zx, nx, zy,ny,f, no. The bit-combinations that yield each function are documentedFigure 2.6 of The elements of Computing Systems. In addition, theALU computes two 1-bit outputs: if the ALU output is 0, zr is set to1; otherwise zr is set to 0; If out to 0.Chip name: BitInputs: x, loadOutputs: outFunction: If load[t] = 1 then out[t + 1] = x[t] else out does not change(out[t + 1] = out[t])Chip name: RegisterInputs: x[16], loadOutputs: out[16]Function: If load[t] = 1 then out[t + 1] = x[t] else out does not change4Chip name: Inc16Inputs: x[16]Outputs: out[16]Function: 16-bit incrementer: out = x + 1 (arithmetic addition)Chip name: PCInputs: x[16], load, inc,resetOutputs: out[16]Function: A 16-bit counter with load and reset control bits.if (reset[t] == 1) out[t + 1] = 0else if (load[t] == 1) out[t + 1] = in[t]else if (inc[t] == 1) out[t + 1] = out[t] + 1 (integer addition)else out[t + 1] = out[t]Chip name: RAM8Inputs: x[16], load, address[3]Outputs: out[16]Function: Memory of 8 registers, each 16 bit-wide. ‘Out’ holds the valuestored at the m代写COMP1212作业、GitLab留学生作业代做、Java/Python编程作业代做、代写c/c++课程作业 调试Memory location specified by address. If load= 1, thenthe ‘x’ value is loaded into the memory location specified by address(the loaded value will be emitted to out after the next time step.)5Chip name: RAM64Inputs: x[16], load, address[6]Outputs: out[16]Function: Memory of 64 registers, each 16 bit-wide. ‘Out’ holds the valuestored at the memory location specified by address. If load= 1, thenthe ‘x’ value is loaded into the memory location specified by address(the loaded value will be emitted to out after the next time step.)Chip name: RAM512Inputs: x[16], load, address[6]Outputs: out[16]Function: Memory of 512 registers, each 16 bit-wide. Out holds the valuestored at the memory location specified by address. If load=1, thenthe in value is loaded into the memory location specified by address(the loaded value will be emitted to out after the next time step.)Chip name: RAM4KInputs: x[16], load, address[12]Outputs: out[16]Function: Memory of 4K registers, each 16 bit-wide. Out holds the valuestored at the memory location specified by address. If load=1, thenthe in value is loaded into the memory location specified by address(the loaded value will be emitted to out after the next time step.)6Chip name: RAM16KInputs: x[16], load, address[14]Outputs: out[16]Function: Memory of 16K registers, each 16 bit-wide. Out holds the valuestored at the memory location specified by address. If load=1, then thein value is loaded into the memory location specified by address (theloaded value will be emitted to out after the next time step.)Chip name: CPUInputs: inM[16], instruction[16],resetOutputs: outM[16], writeM ,addressM[16], pc[15]Function: Consists of an ALU and a set of registers, designed to fetch andexecute instructions written in the Hack machine language. In particular,functions as follows: Executes the inputted instruction accordingto the Hack machine language specification. The ‘D’ and ‘A’ in the languagespecification refer to CPU-resident registers, while ‘M’ refers tothe external memory location addressed by ‘A’, i.e. to Memory[A]. The‘inM’ input holds the value of this location. If the current instructionneeds to write a value to ‘M’, the value is placed in ‘outM’, the addressof the target location is placed in the ‘addressM’ output, and the‘writeM’ control bit is asserted. (When ‘writeM’= 0, any value may appearin ‘outM’). The ‘outM’ and ‘writeM’ outputs are combinational:they are affected instantaneously by the execution of the current instruction.The ‘addressM’ and ‘pc’ outputs are clocked: although theyare affected by the execution of the current instruction, they committo their new values only in the next time unit. If ‘reset’= 1 then theCPU jumps to address 0 (i.e. sets ‘pc’= 0 in next time unit) ratherthan to the address resulting from executing the current instruction.7Chip name: ComputerInputs: resetOutputs:Function: The HACK computer, including CPU, ROM and RAM. Whenreset is 0, the program stored in the computer’s ROM executes. Whenreset is 1, the execution of the program restarts. Thus, to start aprogram’s execution, reset must be pushed “up” (1) and “down” (0).From this point onward the user is at the mercy of the software. Inparticular, depending on the program’s code, the screen may show someoutput and the user may be able to interact with the computer via thekeyboard.8转自:http://www.7daixie.com/2019050430752748.html

    相关文章

      网友评论

          本文标题:讲解:COMP1212、GitLab、Java/Python、c

          本文链接:https://www.haomeiwen.com/subject/itviactx.html