Git Product home page Git Product logo

test's Introduction

(1)程序是个状态机 画出计算1+2+...+100的程序的状态机. 答: (0, x, x) -> (1, 0, x) -> (2, 0, 0) -> (3, 0, 1)-> (4, 1, 1) -> (2, 1, 1) -> (3, 1, 2)-> (4, 3, 2) ... -> (2, 4851, 98) -> (3, 4851, 99)-> (4, 4950, 99) -> (2, 4950, 99) -> (3, 4950, 100)-> (4, 5050, 100) -> (5, 5050, 100) ->(5, 5050, 100) ... -> (5, 5050, 100) -> (5, 5050, 100) (2)这个学期下来, 你将会在调试上花费多少时间?简易调试器帮它节省多长时间? 答:我将在调试上花费75h,简易调试器帮我节省50h。 (3)尝试在你选择的ISA手册中查阅以下问题所在的位置:(a) riscv32有哪几种指令格式?(b) LUI指令的行为是什么? (c) mstatus寄存器的结构是怎么样的? 答:(a) 位于Volume I,page 15-16,(b) 位于Volume I,page 23,(c)位于Volume II,page 20. (4)shell命令 完成PA1的内容之后, nemu/目录下的所有.c和.h和文件总共有多少行代码?你是使用什么命令得到这个结果的?和框架代码相比, 你在PA1中编写了多少行代码? 除去空行之外, nemu/目录下的所有.c和.h文件总共有多少行代码? 答: .c和.h文件有3994行代码,使用命令: find . -name "[.h|.cpp]" | xargs wc -l 和框架代码相比,在PA1中写了1008行代码. 除去空行之外, nemu/ 目录下的所有.c 和.h 文件总共有3308行代码。 find . –name “[.cpp|.h]” | xargs grep “^.” | wc -l

(5)打开nemu/scripters/build.mk文件, 你会在CFLAGS变量中看到gcc的一些编译选项. 请解释gcc中的-Wall和-Werror有什么作用? 为什么要使用-Wall和-Werror? 答: -Wall:输出所有错误或警告信息。 -Werror:将所有的警告当成错误进行处理,并中断编译过程。 使用-Wall和-Werror是为了尽可能地帮助找到存在的错误。

test's People

Contributors

struggggle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.