1 Vivado HLS 简介.doc

上传人:土8路 文档编号:10017683 上传时间:2021-04-11 格式:DOC 页数:15 大小:761.50KB
返回 下载 相关 举报
1 Vivado HLS 简介.doc_第1页
第1页 / 共15页
1 Vivado HLS 简介.doc_第2页
第2页 / 共15页
1 Vivado HLS 简介.doc_第3页
第3页 / 共15页
1 Vivado HLS 简介.doc_第4页
第4页 / 共15页
1 Vivado HLS 简介.doc_第5页
第5页 / 共15页
点击查看更多>>
资源描述

《1 Vivado HLS 简介.doc》由会员分享,可在线阅读,更多相关《1 Vivado HLS 简介.doc(15页珍藏版)》请在三一文库上搜索。

1、用用Vivado-HLS实现低实现低latency 除法器除法器 George Wang Xilinx DSP Specialist Table of Contents 1VIVADO HLS 简介简介.3 2创建一个创建一个VIVADO-HLS工程工程.4 2.1打开VIVADO HLS GUI .4 2.2创建新工程.5 2.3添加源文件.6 2.4添加测试文件 .8 2.5创建SOLUTION.10 3C VALIDATION.12 4C SYNTHESIS.13 5EXPLORE 不同新的不同新的SOLUTION.15 1Vivado HLS 简介简介 Xilinx Vivado Hi

2、gh-Level Synthesis (HLS) 工具将 C, C+,或者 SystemC 设计规范,算 法转成 Register Transfer Level (RTL)实现,可综合到Xilinx FPGA。 将DSP算法快速转到RTL FPGA 实现 将C 至 RTL时间缩短 4 倍 基于 C 语言的验证时间缩短100倍 RTL 仿真时间缩短 3 倍 2创建一个创建一个Vivado-HLS工程工程 2.1打开Vivado HLS GUI 双击桌面上Vivado HLS GUI 图标, 或从Start All Programs Vivado Vivado HLS GUI 打开GUI之后,Vi

3、vado-HLS welcome界面如下所示: 2.2创建新工程 在 Welcome Page, 选择Create New Project 2.3添加源文件 指定顶层需要综合的源文件名,并添加文件. 本除法器设计采用移位算法 #include radix2div.h quotient_t radix2div ( dividend_t dividend, / (numerator) divisor_t divisor, / (denominator) remainder_t *remainder / ) #pragma AP latency max=3 #pragma AP pipeline q

4、uotient_i_t quo, y; / +1 bits unsigned subtract_t sub_out, rem_r; / +1 bits signed boolean_t last_bit, next_bit; loop_cnt_t i; / last_bit = 0; rem_r = 0; if (LOOP_MAX 32) quo = 0ULL; else quo = 0; / div_booth_label0: for (i = 0; i LOOP_MAX; i = i+1) / concurrent blocks sub_out = rem_r - divisor; y =

5、 dividend if ( y = 0 ) next_bit = 0; else next_bit = 1; if (sub_out 0) / remainder - denominator is negative quo = quo 1; if (i != LOOP_MAX-1) rem_r = rem_r 1; rem_r = rem_r | next_bit; else / remainder - denominator is positive quo = quo 1; quo = quo | 1; if (i != LOOP_MAX-1) rem_r = sub_out 1; rem

6、_r = rem_r | next_bit; else rem_r = sub_out; / end for *remainder = rem_r; return quo; 2.4添加测试文件 添加测试文件. #include #include #include radix2div.h / quotient_t radix2div ( dividend_t dividend, / (numerator) divisor_t divisor, / (denominator) remainder_t *remainder / ); / int test_divider (dividend_t di

7、vidend, divisor_t divisor ) quotient_t quotient; remainder_t remainder; quotient = radix2div(dividend,divisor, fprintf(stdout, dividend = %u, divisor = %u quotient = %u remainder = %u n, dividend, divisor, quotient, remainder); fprintf(stdout, - n); if (quotient = dividend/divisor) else printf (FAIL n); return 1; / int main () int i, j; dividend_t max_num; max_num = 0; j = LOOP_MAX-1; for (i = 0; i new solution。 在同一个工程里面,可以使用同一套源代码,进行不同solutions的尝试。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1