Skip to content

Commit

Permalink
Merge branch 'pr/1'
Browse files Browse the repository at this point in the history
  • Loading branch information
onlypinocchio committed Jul 17, 2018
2 parents 24b2b32 + 7b400c0 commit 874e1fc
Show file tree
Hide file tree
Showing 17 changed files with 1,578 additions and 58 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ before_install:
install:
- npm install gitbook-cli -g
# 安装 gitbook 插件
- gitbook install
- travis_wait 10 gitbook install

# 构建脚本
script:
# 自定义输出目录 gitbook build src dest
- gitbook build . ./build/$CUSTOM_PATH
- travis_wait 20 gitbook build . ./build/$CUSTOM_PATH

# 分支白名单
branches:
Expand Down
2 changes: 1 addition & 1 deletion 01-Introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 第一章 介绍

## 1.1 高层次综合HLS)
## 1.1 高层次综合(HLS)

硬件设计与处理近几年来发展迅速。 过去我们的电路相对简单,硬件设计师们可以很方便的画出每一个晶体管,规划他们的连接方式,甚至他们的板上位置。可以说所有工作都是人工完成的。但随着越来越多晶体管的设计需要,硬件工程师也越来越需要依赖自动化设计工具来帮助他们完成设计,而这些设计工具也相对应的变得越来越精密。工程师在这些设计工具的协助下也更具效率。他们不再具体操作每一个晶体管,而只需要设计数字电路,电子设计自动化工具(EDA)把这些抽象而概括的电路自动转换成实际的部件构造版图。

Expand Down
206 changes: 205 additions & 1 deletion 02-Finite-Impulse-Response-Filters.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 04-Discrete-Fourier-Transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

本章的前两小节有大量的数据计算和推导,这可能看起来有些多余,但是它对于我们充分理解代码重构优化以下一章快速傅里叶变换的对称性计算有着很大作用。但是如果你对HLS 优化内容更感兴趣,可以直接跳至第4.6章开始阅读。

## 4.1 傅里叶级数
## 4.1 傅里叶级数

为了解释离散傅里叶变换,我们首先要了解傅里叶级数。傅立叶级数提供了一种可选方法来观察信号从-π到π的一个周期内的连续实值周期信号。Jean Baptiste Joseph Fourier的开创性成果表明,在2π周期内任何连续的周期性信号都可以用周期为2π的余弦和正弦和表示。最终,傅里叶级数的表现形式如下:

Expand Down Expand Up @@ -379,7 +379,7 @@ void dft(IN_TYPE sample_real[N], IN_TYPE sample_imag[N]) {
请使用HLS实现DFT的基线代码,实现后查看报告,与乘法和加法相比,实现三元函数的相对成本是多少? 对哪些操作尝试优化更有意义?通过流水线操作内循环可以实现什么性能?
{% endhint %}
## 4.7 DFT 优化
## 4.7 DFT优化
上一节的基线的DFT实现使用了相对较高的 **double** 数据类型。实现浮点运算尤其是双精度浮点运算通常代价很高并且需要很多流水线操作。我们可以从图4.16中看到这显着影响了循环的性能。通过流水线操作,这些高延迟操作的影响不那么重要,因为可以同时执行多个循环执行。此代码中的例外是用于累加结果的变量temp real []和temp imag []。这个累加是一种循环,并在流水线化内循环时限制了可实现的II。该运算符的依赖性如图4.17所示。
Expand Down
483 changes: 482 additions & 1 deletion 05-Fast-Fourier-Transform.md

Large diffs are not rendered by default.

246 changes: 245 additions & 1 deletion 08-Prefix-Sum-and-Histogram.md

Large diffs are not rendered by default.

589 changes: 588 additions & 1 deletion 10-Sorting-Algorithms.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

电子书阅读地址: [https://xupsh.github.io/pp4fpgas-cn](https://xupsh.github.io/pp4fpgas-cn)

电子书下载地址: [pdf]()
电子书下载地址: [暂无]()

## 写在前面
国内鲜有介绍HLS的书,我们希望通过翻译Parallel Programming for FPGAs这本书,让更多的人来了解HLS和FPGA开发。
Expand All @@ -15,7 +15,7 @@ Parallel Programming for FPGAs这本书的原作采用的是`latex`进行内容
这也给参与翻译任务的诸位带来了一点小挑战,需要诸位事先熟悉一下`GitHub`平台的使用、`git`的使用以及`Markdown`语言的规范,下面是相关的参考链接给诸位快速上手。

### 排版约定
- [排版约定](RULES.md)
- [排版约定](https://xupsh.github.io/pp4fpgas-cn/RULES.html)

### 编辑器
一个界面美观、交互UI设计良好的编辑器可以帮我们节省很多力气,这里我们比较推荐使用以下几款编辑器来进行翻译工作
Expand Down
45 changes: 45 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,59 @@
----
## 正文
- [第一章](01-Introduction.md)
+ [1.1 高层次综合(HLS)](01-Introduction.md#11-高层次综合(HLS))
+ [1.2 FPGA构造](01-Introduction.md#12-fpga构造)
+ [1.3 FPGA设计与处理](01-Introduction.md#13-fpga设计与处理)
+ [1.4 设计优化](01-Introduction.md#14-设计优化)
+ [1.5 重建代码](01-Introduction.md#15-重建代码)
+ [1.6 本书结构](01-Introduction.md#16-本书结构)
- [第二章](02-Finite-Impulse-Response-Filters.md)
- [第三章](03-CORDIC.md)
- [第四章](04-Discrete-Fourier-Transform.md)
+ [4.1 傅里叶级数](04-Discrete-Fourier-Transform.md#41-傅里叶级数)
+ [4.2 DFT背景介绍](04-Discrete-Fourier-Transform.md#42-dft背景介绍)
+ [4.3 矩阵向量乘法的优化](04-Discrete-Fourier-Transform.md#43-矩阵向量乘法的优化)
+ [4.4 流水线和并行运行](04-Discrete-Fourier-Transform.md#44-流水线和并行运行)
+ [4.5 存储权衡和数据分区](04-Discrete-Fourier-Transform.md#45-存储权衡和数据分区)
+ [4.6 Baseline实现](04-Discrete-Fourier-Transform.md#46-baseline实现)
+ [4.7 DFT优化](04-Discrete-Fourier-Transform.md#47-dft优化)
+ [4.8 结语](04-Discrete-Fourier-Transform.md#48-结语)
- [第五章](05-Fast-Fourier-Transform.md)
- [第六章](06-Sparse-Matrix-Vector-Multiplication.md)
+ [6.1 背景](06-Sparse-Matrix-Vector-Multiplication.md#61-背景)
+ [6.2 基本实现](06-Sparse-Matrix-Vector-Multiplication.md#62-基本实现)
+ [6.3 测试平台](06-Sparse-Matrix-Vector-Multiplication.md#63-测试平台)
+ [6.4 指定循环的属性](06-Sparse-Matrix-Vector-Multiplication.md#64-指定循环的属性)
+ [6.5 C/RTL协同仿真](06-Sparse-Matrix-Vector-Multiplication.md#65-crtl协同仿真)
+ [6.6 循环的优化与数组的分块](06-Sparse-Matrix-Vector-Multiplication.md#66-循环的优化与数组的分块)
+ [6.7 小节](06-Sparse-Matrix-Vector-Multiplication.md#67-小节)
- [第七章](07-Matrix-Multiplication.md)
- [第八章](08-Prefix-Sum-and-Histogram.md)
+ [8.1 前缀和](08-Prefix-Sum-and-Histogram.md#81-前缀和)
+ [8.2 直方图](08-Prefix-Sum-and-Histogram.md#82-直方图)
+ [8.3 直方图优化和错误依赖](08-Prefix-Sum-and-Histogram.md#83-直方图优化和错误依赖)
+ [8.4 提高直方图性能](08-Prefix-Sum-and-Histogram.md#84-提高直方图性能)
+ [8.5 结论](08-Prefix-Sum-and-Histogram.md#85-结论)
- [第九章](09-Video-Systems.md)
+ [9.1 背景](09-Video-Systems.md#91-背景)
* [9.1.1 视频像素表示](09-Video-Systems.md#911-视频像素表示)
* [9.1.2 数字视频格式](09-Video-Systems.md#912-数字视频格式)
* [9.1.3 视频处理系统架构](09-Video-Systems.md#913-视频处理系统架构)
+ [9.2 实现](09-Video-Systems.md#92-实现)
* [9.2.1 行缓冲和帧缓冲](09-Video-Systems.md#921-行缓冲和帧缓冲)
* [9.2.2 因果滤波器](09-Video-Systems.md#922-因果滤波器)
* [9.2.3 边界条件](09-Video-Systems.md#923-边界条件)
+ [9.3 结论](09-Video-Systems.md#93-结论)
- [第十章](10-Sorting-Algorithms.md)
+ [10.1 简介](10-Sorting-Algorithms.md#101-简介)
+ [10.2 插入排序](10-Sorting-Algorithms.md#102-插入排序)
* [10.2.1 插入排序的基本实现](10-Sorting-Algorithms.md#1021-插入排序的基本实现)
* [10.2.2 并行化插入排序](10-Sorting-Algorithms.md#1022-并行化插入排序)
* [10.2.3 显式脉动阵列插入排序](10-Sorting-Algorithms.md#1023-显式脉动阵列插入排序)
+ [10.3 归并排序](10-Sorting-Algorithms.md#103-归并排序)
* [10.3.1 归并排序的基本操作](10-Sorting-Algorithms.md#1031-归并排序的基本操作)
* [10.3.2 重构归并排序](10-Sorting-Algorithms.md#1032-重构归并排序)
+ [10.4 总结](10-Sorting-Algorithms.md#104-总结)
- [第十一章](11-Huffman-Encoding.md)

----
Expand All @@ -24,3 +68,4 @@
----
## 其它
- [排版约定](RULES.md)

3 changes: 3 additions & 0 deletions book.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"custom-favicon"
],
"pluginsConfig": {
"katex-plus": {
"forceSVG": false
},
"hints": {
"info": "fa fa-info-circle",
"tip": "fa fa-mortar-board",
Expand Down
47 changes: 0 additions & 47 deletions chapter 4

This file was deleted.

Binary file added images/10.1.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 images/10.10.jpg
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 images/10.13.jpg
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 images/10.15.jpg
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 images/10.9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions styles/website.css
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
p { text-indent: 2em; }
.book .book-summary, .book .book-body {
font-family: "Microsoft YaHei UI", "Microsoft Yahei", "PingFang SC", "Lantinghei SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", "WenQuanYi Zen Hei", "Noto Sans CJK SC", "Microsoft JhengHei UI", "Microsoft JhengHei", "PingFang TC", "Lantinghei TC", "Noto Sans CJK TC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

0 comments on commit 874e1fc

Please sign in to comment.