Skip to content

Commit

Permalink
save11.21
Browse files Browse the repository at this point in the history
  • Loading branch information
RockyQLuo committed Nov 21, 2024
1 parent 343a861 commit 9402677
Show file tree
Hide file tree
Showing 17 changed files with 265 additions and 17 deletions.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ end

gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem 'jekyll-compose', group: [:jekyll_plugins]
gem 'logger'
gem 'logger'

gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
12 changes: 8 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ timezone: Asia/Shanghai
# ↓ --------------------------

#-----------------add myself logic here -----------------

scripts:
- /assets/js/shiki.js



Expand All @@ -29,7 +30,7 @@ description: >- # used by seo meta and the atom feed
# Fill in the protocol & hostname for your site.
# E.g. 'https://username.github.io', note that it does not end with a '/'.
url: "https://github.com/RockyQLuo/RockyQLuo.github.io.git"
url: "https://RockyQLuo.github.io.git"

github:
username: RockyQLuo # change to your GitHub username
Expand Down Expand Up @@ -104,7 +105,7 @@ theme_mode: # [light | dark]
cdn:

# the avatar on sidebar, support local or CORS resources
avatar: assets/img/favicons/web-app-manifest-512x512.png
avatar: /assets/img/favicons/web-app-manifest-512x512.png
favicon: /assets/img/favicon.ico

# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
Expand All @@ -116,7 +117,7 @@ toc: true

comments:
# Global switch for the post-comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
provider: giscus # [disqus | utterances | giscus]
# The provider options are as follows:
disqus:
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
Expand Down Expand Up @@ -232,3 +233,6 @@ jekyll-archives:
permalinks:
tag: /tags/:name/
category: /categories/:name/

plugins:
- jekyll-sitemap
21 changes: 21 additions & 0 deletions _posts/2024-10-10-环境配置.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@ sudo rpm -Uvh *.rpm --force --nodeps
- 向后翻半页:`ctrl-d`
- 向前翻半页:`ctrl-u`

- 6.替换

```
:[range] s/{old-pattern}/{new-pattern}/[flags]
% # 表示整个文件内容
. # 表示当前行
$ # 表示最后一行
m,n # 表示从第m行到第n行
,n # 表示从当前行到第n行
n, # 表示从第n行到当前行
n # 指定行
+n # 表示当前行之后的n行
```

:put=range(a,b) 生成a,b自加一的序列

 g 然后C-a自动在列上递增



## 4.Git
* `git checkout master` : 切换到master分支
* `git checkout -b aa` : 新建一个aa分支
Expand Down
47 changes: 47 additions & 0 deletions _posts/EDA/2024-11-15-tutorial of EDA tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
layout: post
title: EDA tools
date: 2024-11-15 20:34 +0800
categories: [tools, EDA工具]
tags: []
img_path: /assets/img/learn/
---

## vivado
[AXI VIP的简单使用](https://icode.best/i/36088746158033)






## Verdi

- 要查看二维数组的值,需要在Makefile及仿真的tb中添加
[使用VCS观察Verilog二维数组仿真值的方法](https://zhuanlan.zhihu.com/p/119326286)

```sh
“+v2k(VCS和Verdi中都要加),一个case如下”:
make:clean com sim
all:clean com sim verdi
com:
vcs -full64 -sverilog -debug_acc+all -timescale=1ns/10ps -f file.list -l coml.log -fsdb +define+FSDB +vc +v2k
sim:
./simv -l sim.log
verdi:
verdi -f file.list -ssf sim.fsdb -nologo +v2k &
clean:
rm -rf crsc *.log *.key *simv* *.vpd *DVE* rm -rf verdilog *.fsdb *.conf

“tb中需要有”:
initial begin
$fsdbDumpfile("sim.fsdb");
$fsdbDumpvars;
$fsdbDumpMDA(); //这个要放在最后
#10000 $finish;
end
```

- 添加Mark

你可以shift+m,出现添加mark的窗口,输入mark的名称和时间点,close即可。
9 changes: 0 additions & 9 deletions _posts/EDA/2024-11-15-tutorial of VCS.md

This file was deleted.

2 changes: 2 additions & 0 deletions _posts/协议类/2024-10-20-CHI随笔记.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ img_path: /assets/img/chi/

<scriptvar password = prompt("请输入密码:"); if (password !== "xiaokai") {document.body.innerHTML = "访问被拒绝。"; } </script>



## overall
[CHI的几个重要概念](https://mp.weixin.qq.com/s/JK9f90-1E6xQhOE8GWQ9vg)
[【CHI】transaction事务汇总](https://blog.csdn.net/m0_52840978/article/details/133967221?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522ACFA855F-A42C-44F5-A12D-C6401F400E9B%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=ACFA855F-A42C-44F5-A12D-C6401F400E9B&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-5-133967221-null-null.nonecase&utm_term=CHI&spm=1018.2226.3001.4450)
Expand Down
6 changes: 5 additions & 1 deletion _posts/协议类/2024-11-4-AXI4随笔记.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ img_path: /assets/img/axi/

<scriptvar password = prompt("请输入密码:"); if (password !== "xiaokai") {document.body.innerHTML = "访问被拒绝。"; } </script>


[反压的slice设计请参照这篇文章](https://rockyqluo.github.io/posts/%E7%94%B5%E8%B7%AF%E8%AE%BE%E8%AE%A1tips/)

## Outstanding Transfer
Expand Down Expand Up @@ -325,6 +326,7 @@ delete_hw_axi_txn rd_txn_lite
```

### 一个调试的Tcl脚本示例

```sh
#注:这里使用的是AXI-Lite接口
#**************W/R CONTROL**************
Expand Down Expand Up @@ -389,10 +391,12 @@ set fp [open $file_name r]
set file_data [read $fp]
puts $file_data
close $fp

```
[这是一个用什么VS来用c的api调试替换tcl的教程,但是我觉得没必要](https://blog.csdn.net/flzili/article/details/107139581)
---
## 附录-信号释意
- AxPROT[2:0] :给CPU用的,AxPROT[0]特权模式;AxPROT[1]Non-secure;AxPROT[2] Instruction
Expand Down
154 changes: 154 additions & 0 deletions _posts/算法/2024-11-18-VLSI-PJ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
layout: post
title: Digit-Serial 脉动结构(Systolic)的乘法器
date: 2024-11-18 20:19 +0800
categories: [项目学习, 算法]
tags: []
math: true
img_path: /assets/img/learn/
---

## 1. 概念的介绍
对于有限域 $GF(2^n)$,设其模多项式为

$$
m(x) = x^n + \sum_{i=0}^{n-1} m_i x^i \quad (m_i \in \{0,1\}),
$$

则满足以下公式:

$$
x^n \mod m(x) = [m(x) - x^n] = \sum_{i=0}^{n-1} m_i x^i
$$

设有限域 $GF(2^n)$上的任意两个多项式 A(x)、 B(x) 以及既约多项式 G(x) 分别为:

$$
A(x) = a_{n-1}x^{n-1} + a_{n-2}x^{n-2} + \cdots + a_1x + a_0,
$$

$$
B(x) = b_{n-1}x^{n-1} + b_{n-2}x^{n-2} + \cdots + b_1x + b_0,
$$

$$
G(x) = x^n + r(x) = x^n + g_{n-1}x^{n-1} + g_{n-2}x^{n-2} + \cdots + g_1x + g_0,
$$

其中,$a_i, b_i, g_i in GF(2^n)$。

设 A(x) 与 B(x) 的乘积 P(x)为:

$$
P(x) = [A(x) \cdot B(x)] \mod G(x) = p_{n-1}x^{n-1} + p_{n-2}x^{n-2} + \cdots + p_1x + p_0,
$$

则:

$$
P(x) = A(x) \cdot \left(b_{n-1}x^{n-1} + b_{n-2}x^{n-2} + \cdots + b_1x + b_0 \right) \mod G(x).
$$

展开可得:

$$
P(x) = \left\{\cdots \left[A(x) \cdot b_{n-1}x^{n-1} \mod G(x) + A(x) \cdot b_{n-2}x^{n-2} \mod G(x)\right] \cdots + A(x) \cdot b_1x \mod G(x) + A(x) \cdot b_0 \right\}.
$$

由上述公式可知,有限域 $GF(2^n)$上的多项式运算可以通过选代完成,选代单元为:

$$
T^{(i)} = T^{(i-1)} \cdot x \mod G(x) + b_{n-i}A(x), \quad 0 < i \leq n,
$$

其中:

$$
T^{(0)} = 0, \quad T^{(n)} = P(x).
$$

实际上,选代单元 $T^{(i)}$ 也是有限域 $GF(2^n)$ 中的多项式元素,令:

$$
T^{(i)} = t_{n-1}^{(i)}x^{n-1} + t_{n-2}^{(i)}x^{n-2} + \cdots + t_1^{(i)}x + t_0^{(i)},
$$


$$
T^{(i-1)} = t_{n-1}^{(i-1)}x^{n-1} + t_{n-2}^{(i-1)}x^{n-2} + \cdots + t_1^{(i-1)}x + t_0^{(i-1)}.
$$

由选代关系可以推得:

$$
T^{(i)} = T^{(i-1)} \cdot x \mod G(x) + b_{n-i}A(x)
$$

展开为:

$$
T^{(i)} = \left[ t_{n-1}^{(i-1)}x^{n-1} + \cdots + t_1^{(i-1)}x + t_0^{(i-1)} \right]x \mod G(x) + b_{n-i}A(x)
$$

即:

$$
T^{(i)} = \left[ t_{n-1}^{(i-1)}x^n + \cdots + t_1^{(i-1)}x^2 + t_0^{(i-1)}x \right] \mod G(x) + b_{n-i}A(x).
$$

由此可得:

$$
T^{(i)} = t_{n-1}^{(i-1)} \cdot r(x) + t_{n-2}^{(i-1)}x^{n-1} + \cdots + t_1^{(i-1)}x^2 + t_0^{(i-1)}x + b_{n-i}A(x).
$$

分项展开为:

$$
T^{(i)} = \left[t_{n-1}^{(i-1)}g_{n-1} + t_{n-2}^{(i-1)} + b_{n-i}a_{n-1}\right] \cdot x^{n-1}
$$

$$
+ \left[t_{n-1}^{(i-1)}g_{n-2} + t_{n-3}^{(i-1)} + b_{n-i}a_{n-2}\right] \cdot x^{n-2}
$$

$$
+ \cdots
$$

$$
+ \left[t_{n-1}^{(i-1)}g_1 + t_0^{(i-1)} + b_{n-i}a_1\right] \cdot x^1
$$

$$
+ \left[t_{n-1}^{(i-1)}g_0 + b_{n-i}a_0\right] \cdot x^0.
$$

即:

$$
t_j^{(i)} = t_{n-1}^{(i-1)}g_j + t_{j-1}^{(i-1)} + b_{n-i}a_j,
$$

其中 $1 \leq i \leq n$ 且 $t_i^{(0)} = 0, t_{-1}^{(i)} = 0$

则 $A(x)$ 与 $B(x)$ 的乘积 $P(x)$ 为:

$$
P(x) = T^{(n)} = \sum_{j=0}^{n-1} t_j^{(n)}x^j.
$$

考虑到上述各参数均处于有限域$GF(2^n)$中,因此其均为0或1,上式中乘法可以用与门实现,加法可以用异或门实现

![cell_t]({{ page.img_path }}cell_t.png){: width="972" height="589" }
![cell]({{ page.img_path }}cell.png){: width="972" height="589" }

假设n为8, Bit-Parallel阵列形式如下,这是一种并行度最高的架构。

![m8]({{ page.img_path }}m8.png){: width="972" height="589" }

Digit-Serial阵列在上述Bit-Parallel阵列的基础上降低了并行度,以此换得较低的资源占用率
![compress1]({{ page.img_path }}compress1.png){: width="972" height="589" }
![compress2]({{ page.img_path }}compress2.png){: width="972" height="589" }
![compress3]({{ page.img_path }}compress3.png){: width="972" height="589" }
12 changes: 12 additions & 0 deletions _posts/语言类/2024-10-15-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ tags: []
img_path: /assets/img/image/
---

[时序图工具WaveDrom](https://mbb.eet-china.com/forum/topic/112730_1_1.html)
[Hitchhiker's Guide to the WaveDrom](https://wavedrom.com/tutorial.html)

vitis_user_guide: [User Managed Mode in Vitis Unified Embedded IDE • Vitis Tutorials: Embedded Software • 阅读器 • AMD 技术信息门户](https://docs.amd.com/r/en-US/Vitis-Tutorials-Embedded-Software/User-Managed-Mode-in-Vitis-Unified-Embedded-IDE)

## scala语法

### 参数声明格式
Expand Down Expand Up @@ -38,6 +43,13 @@ channelGen: Parameters => ChannelOutwardNode => ChannelOutwardNode = p => u => u
1. 关于部分makefile的路径管理
- <font color="#d99694">\$(abspath ./sim_c/include)</font> :`abspath`函数会将给定的相对路径转换为绝对路径。在这个例子中,`./sim_c/include`是一个相对路径,`$(abspath ./sim_c/include)`会将其转换为绝对路径
- <font color="#d99694">\$(addprefix -I, $(INC_PATH))</font>:函数会将指定的前缀`-I`添加到`INC_PATH`变量中的每个路径前面
- <font color="#d99694">$@</font>:
```sh
target: dependency1 dependency2
echo "Target is $@" # target
echo "First dependency is $<" # dependency1
echo "All dependencies are $^" # dependency1 dependency2
```

## python
官方帮助:
Expand Down
5 changes: 3 additions & 2 deletions _tabs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ icon: fas fa-info-circle
order: 4
---

> Add Markdown syntax content to file `_tabs/about.md`{: .filepath } and it will show up on this page.
{: .prompt-tip }
Hi there~👏
* ☺︎IC Master’s student at FDU
*
Binary file added assets/img/learn/cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/learn/cell_t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/learn/compress1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/learn/compress2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/learn/compress3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/learn/m8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/js/shiki.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { codeToHtml } from 'https://esm.sh/[email protected]';

window.renderShiki = async function (elementId, code, lang = 'javascript', theme = 'rose-pine') {
const element = document.getElementById(elementId);
if (!element) {
console.error(`Element with ID "${elementId}" not found.`);
return;
}
element.innerHTML = await codeToHtml(code, { lang, theme });
};

0 comments on commit 9402677

Please sign in to comment.