Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 chisel + verilator #60

Merged
merged 18 commits into from
May 27, 2024

Conversation

KINGFIOX
Copy link

No description provided.

@shirok1
Copy link
Member

shirok1 commented May 26, 2024

有些拼写不太规范(大小写)

Copy link
Member

@Origami404 Origami404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请至少修改编译安装 verilator 片段, 或给出它确实在大部分情况下就是需要编译安装的理由

docs/popular-science/bash-dlc.md Show resolved Hide resolved
docs/unofficial-lab-env/comp-organ-lab2.md Outdated Show resolved Hide resolved
docs/unofficial-lab-env/comp-organ-lab2.md Show resolved Hide resolved
docs/unofficial-lab-env/comp-organ-lab2.md Outdated Show resolved Hide resolved
docs/unofficial-lab-env/comp-organ-lab2.md Outdated Show resolved Hide resolved
@Origami404
Copy link
Member

BTW, 如果你感兴趣的话可以看看这个仓库: https://github.com/Origami404/MiniRV-Chisel

Copy link
Member

@Origami404 Origami404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks


但是 mac 实际上使用 gtkwave 会有点兼容问题(无法双击打开)。但是可以在 shell 中 `gtkwave <.vcd>`打开。

如果是 ssh 连接的 linux,可以使用 CyberDuck 或者是 MountainDuck(付费)或者是 sshfs 挂载目录,然后在 宿主机上 `gtkwave <.vcd>` 或者是双击打开。(笔者就是用的这种方式)
Copy link
Member

@Origami404 Origami404 May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

说起来, 之前 @rewired-gh 教过我一个东西: 如何让 gtkwave 打开的时候把所有信号都展示出来. 原理大概是写一个 tcl 脚本来调 gtkwave:

# add_all_and_zoom_full.tcl
# Add all signals
set nfacs [ gtkwave::getNumFacs ]
set all_facs [list]
for {set i 0} {$i < $nfacs } {incr i} {
  set facname [ gtkwave::getFacName $i ]
  lappend all_facs "$facname"
}
set num_added [ gtkwave::addSignalsFromList $all_facs ]
puts "num signals added: $num_added"

# Zoom full
gtkwave::/Time/Zoom/Zoom_Full

# Print
# set dumpname [ gtkwave::getDumpFileName ]
# gtkwave::/File/Print_To_File PDF {Letter (8.5" x 11")} Minimal $dumpname.pdf

然后:

gtkwave -S add_all_and_zoom_full.tcl <.vcd> 2> /dev/null

有需要的话可以加上这一段.

@SoraShu SoraShu requested a review from Origami404 May 27, 2024 13:44
Copy link
Member

@SoraShu SoraShu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主要问题是一些英文拼写问题,请参考 规范英文拼写 进行修改。

并未列出所有问题。

@@ -0,0 +1,395 @@
# 计算机组成原理实验 2 环境指南(非官方)

以下指南适合有 linux/mac 环境的同学使用。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请正确拼写,例如 linux -> Linux,mac -> MacOS

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请一并修改其他处


以下指南适合有 linux/mac 环境的同学使用。

笔者心态:对 verilog 感到不适,并且想折腾一些花样。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verilog

## 实验需要的工具

- verilator
- chisel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chisel


## 实验需要的工具

- verilator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verilator


- verilator
- chisel
- gtkwave
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTKWave


## 安装依赖

实验工具安装需要
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用规范的商标/产品名,并且不鼓励使用每一项都很短且整体很长的 bullet list

sudo zypper in -t pattern devel_C_C++
```

如果配置环境过程中出现“command not found.”可能是有依赖的工具没装,此时可以利用搜索引擎。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现 “command not found.” 可


如果配置环境过程中出现“command not found.”可能是有依赖的工具没装,此时可以利用搜索引擎。

mac 需要安装 homebrew 作为包管理器,请查阅: https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew


## 安装 bison 和 flex

bison 和 flex 是 gnu 提供的两个语法解析工具。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNU

@SoraShu SoraShu changed the base branch from main to dev/unofficial-lab-env-comp-organ-lab2 May 27, 2024 16:21
@SoraShu SoraShu merged commit e33ffe2 into hitszosa:dev/unofficial-lab-env-comp-organ-lab2 May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants