项目

一般

简介

行为

开发环境

本课程的开发环境基本要求如下:

  • CPU架构: x64
  • 操作系统: GNU/Linux
  • 编译器: GCC
  • 编程语言: C语言

为了减少往届课程教学中,因为同学们构建开发环境的多样性而造成的各种兼容性问题影响实验进度的问题,课程组集中提供了虚拟机镜像(基于Ubuntu 20.04 Desktop)供同学们下载:
Virtual Box镜像 (注意,VirtualBox虚拟机"设置->系统->主板",启用EFI要选中。用户/密码: hust/hust)
如果自己搭建环境,可以参考手册中章节: Installing GNU/Linux 。如果还有问题,可以咨询老师。

开发步骤

  • 首次设置
    1. Clone code from hust server
      git clone https://course.cunok.cn:52443/pa/ics2019.git
      
    2. Modify STUID and STUNAME in nemu/Makefile.git, then add and commit it. (Make sure you are in master branch)
      git add -u
      git commit -m 'updated id/name'
      
    3. Setup your remote git repo (hustpa):
      make setup
      
    4. Change password after setup:
      make password
      
  • 阶段切换
    Everytime you finish current stage and wanna go to the next PA stage, don't forget to do merge first. e.g when entering pa1 from pa0
    git checkout pa1
    git merge pa0
    
  • 代码提交
    1. Important! when you finished current task phase, please submit it for review.(pa1 (make sure you are in pa0/pa1/pa2... branch, username is your STUID):
      make submit
      
    2. See the review progress of your submission, and state of your report:
      make info
      
  • 代码备份
    1. Push code to hustpa remote(in branch pa0/pa1/pa2..) as many time as you want for backup:
      git push hustpa pa1:pa1
      
    2. Go ahead and have fun!

代码恢复

从hustpa远程库恢复代码
(假设当前目录为/home/hust. 注意本地如有ics2019目录,先改名或备份):
  1. 克隆代码(其间可能会显示unable to checkout或“不能检出”,这不是错误,是远程库没有master分支。可以使用git branch -avv 来查看远程分支来确定是否代码克隆下来了。)
    git clone https://course.cunok.cn:52443/git/学号.git ics2019
    
  2. 假设git branch -avv 看到有remotes/origin/pa1
    你可以通过下列命令查看代码:
    git checkout origin/pa1
    

    然后从此远程分支新建一个本地分支:
    git checkout -b pa1
    
  3. 修改.git/config,将其中的origin改成hustpa
  4. 检查环境变量设置,~/.bashrc 中的NEMU_HOME、AM_HOME、NAVY_HOME指向了新代码目录。然后source ~/.bashrc 或重开一个终端窗口。

课程检查要求

ISA使用RISCV32,并完成以下内容:
  1. 已经完成的PA阶段代码已经通过 make submit 提交
  2. 最终实验报告的pdf版(加上电子版签名),已经通过 make submit 提交(选6, Report)

相关资源

  1. Git code framework: https://course.cunok.cn:52443/pa/ics2019.git
  2. Manual: https://course.cunok.cn:52443/pa/doc2019/
  3. VirtualBox disk image for PA (虚拟机设置->系统->主板,启用EFI要选中。用户/密码: hust/hust):
    https://course.cunok.cn:52443/pa/root.vdi.tgz
  4. VirtualBox for Windows:
    https://course.cunok.cn:52443/pa/VirtualBox-6.1.22-144080-Win.exe
  5. PAL resource: (for PA3, Decompress the package and put the "pal" directory into ics2019/navy-apps/fsimg/share/games/)
    https://course.cunok.cn:52443/pa/pal.tbz
  6. The RISC-V Reader中文版
  7. RISC-V ISA Specification Volume 1
  8. RISC-V ISA Specification Volume 2
  9. RISC-V ABI
  10. RISC-V Cross-compiler
  11. Linux software hust mirror site:
    http://mirror.hust.edu.cn

常见问题

Any other question, feel free to contact me: 姚杰<>, 13517261606

姚杰 更新于 大约一年 之前 · 12 修订