Find Jobs
Hire Freelancers

Datapath Simulator

$30-5000 USD

已关闭
已发布大约 16 年前

$30-5000 USD

货到付款
Refer to the following datapath, write a program to simulate the instruction execution in this datapath. We assume initially the value of the general-purpose registers as follows: Reg[y] = y + 20, for 0![][1] For example, you can use the following code to declare and initialize the Registers and Data Memory int Reg[32]; Reg[0] = 0; for (int k=1 ; k<32 ; k++) Reg[k] = k + 20; const int MEM_SIZE = 5000; int DataMem[MEM_SIZE]; for (k=0 ; k< MEM_SIZE ; k++) DatMem[k] = 100+k; Simulator Input: The input is a file of MIPS machine instructions program with hexadecimal representation. An example file is the following. ********* [login to view URL] begins ***************** 8ca40004 ae520004 010c4020 012a7020 ********* [login to view URL] ends **************** As shown above, the [login to view URL] may contain many instructions. After executing each instruction, the memory unit and/or registers used by the current instruction need to be updated for the following instruction. Thus the memory content and/or registers will not all have the initial value after executing the first instruction. This will require you to complete the last step for each instruction, e.g., for sw instruction, you need to finish DataMem[[login to view URL]] = DM.WriteData. For lw, add, sub instruction, you need to finish Reg[[login to view URL]] = [login to view URL] Only the following instructions in the [login to view URL] file will be used: lw sw add sub beq bne ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Visual C++ Simulator Output: Your simulator should output the values of following buffers in the datapath for the execution of each instruction. Component Buffer Instruction Memory (IM) Instruction Read Address Registers (Reg) ReadRegister1 ReadRegister2 WriteRegister WriteData ReadData1 ReadData2 ALU Input1 Input2 ALUResult Data Memory (DM) Address WriteData ReadData User Interface : You can simply print the content of each buffer as text output after executing each instruction. The following is an example output for the above [login to view URL] file. Executing instruction "8ca40004", Instruction Memory : Instruction = 8ca40004 ReadAddress = 0 Registers: ReadRegister1 = 5 ReadRegister2 = 4 WriteRegister = 4 ? Executing instruction "ae520004", Instruction = ae520004 ReadAddress = 4 Registers: ReadRegister1 = 18 ?
项目 ID: 3800380

关于此项目

远程项目
活跃16 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

UNITED STATES的国旗
United States
5.0
1
会员自3月 16, 2008起

客户认证

这个客户的其他工作

Dr. Scheme Box Pattern
$30-5000 USD
谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。