在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3350|回复: 5

[求助] 怎样对一个数字verilog程序编写的流水线加法器做PT和ASTRO

[复制链接]
发表于 2014-9-6 22:20:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
我在做一个verilog编写的8位四级流水线加法器,这是我第一次做全流程的设计。从verilog设计编写、功能仿真、逻辑综合、时序分析然后做布局布线。现在卡在PT这了,不会做了,求助大神们帮帮忙!下面的程序:

moduleadder_pipeline(rst_n,clk,a,b,cin,sum);   

parameter     DATA_SIZE = 8;

input rst_n;

input clk;

input [DATA_SIZE -1 : 0] a;

input [DATA_SIZE -1 : 0] b;   

input cin;

output [DATA_SIZE: 0] sum;

reg [DATA_SIZE - 1: 0] a_r;

reg [DATA_SIZE - 1: 0] b_r;

reg cin_r;

reg [DATA_SIZE :0] sum;

reg [1:0]stage0_sum;

reg stage0_cout;

reg [DATA_SIZE - 1: 0] stage0_a_r;

reg [DATA_SIZE - 1: 0] stage0_b_r;

reg [3:0]stage1_sum;

reg stage1_cout;

reg [DATA_SIZE - 1: 0] stage1_a_r;

reg [DATA_SIZE - 1: 0] stage1_b_r;

reg [5:0]stage2_sum;

reg stage2_cout;

reg [DATA_SIZE - 1: 0] stage2_a_r;

reg [DATA_SIZE - 1: 0] stage2_b_r;

reg [7:0]stage3_sum;

reg stage3_cout;

always@(posedgeclk)

     if(!rst_n)

         begin

             a_r <= 8'd0;

             b_r <= 8'd0;

             cin_r <= 1'b0;

         end

     else

         begin

             a_r <= a;

             b_r <= b;

             cin_r <= cin;

         end

always@(posedgeclk)

     if(!rst_n)

         begin

             {stage0_cout,stage0_sum} <=3'd0;

             stage0_a_r <= 8'd0;

             stage0_b_r <= 8'd0;        

         end

     else

         begin

              {stage0_cout,stage0_sum} <={1'b0,a_r[1:0]} + {1'b0,b_r[1:0]} + cin_r;               

             stage0_a_r <= a_r;

            stage0_b_r <= b_r;        

         end

always@(posedge clk)

     if(!rst_n)

         begin

             {stage1_cout,stage1_sum} <=5'd0;

             stage1_a_r <= 8'd0;

             stage1_b_r <= 8'd0;   

         end

     else

         begin

             {stage1_cout,stage1_sum} <= {{1'b0,stage0_a_r[3:2]} + {1'b0,stage0_b_r[3:2]} + stage0_cout,stage0_sum };

             stage1_a_r <= stage0_a_r;

             stage1_b_r <= stage0_b_r;

         end        

always@(posedge clk)

     if(!rst_n)

         begin

             {stage2_cout,stage2_sum} <=7'd0;

             stage2_a_r <= 8'd0;

             stage2_b_r <= 8'd0;   

         end

     else

         begin

             {stage2_cout,stage2_sum} <= {{1'b0,stage1_a_r[5:4]} + {1'b0,stage1_b_r[5:4]} + stage1_cout,stage1_sum};            

             stage2_a_r <= stage1_a_r;

             stage2_b_r <= stage1_b_r;

         end        

always@(posedge clk)

     if(!rst_n)

         begin

             {stage3_cout,stage3_sum} <=9'd0;

         end

     else

         begin

             {stage3_cout,stage3_sum} <= {{stage2_a_r[7],stage2_a_r[7:6]} + {stage2_b_r[7],stage2_b_r[7:6]} +stage2_cout,stage2_sum };   

         end

  always@(posedge clk)

     if(!rst_n)

         begin

             sum <= 9'd0;

         end

     else

         begin

             sum <={stage3_cout,stage3_sum};        

         end

         

endmodule

接下来的时序分析,怎么用虚拟机做我就不会了

发表于 2014-9-7 11:29:04 | 显示全部楼层
太牛了,从前端到后端,

基本要靠flow支持的, 要教会很累的, 几句话说不清楚
 楼主| 发表于 2014-9-7 21:20:43 | 显示全部楼层
回复 2# icfbicfb

我们有一个实验流程,但是那个是orca,里面是已经全部都弄好的。可是要写很多tcl。我对tcl不太会呀
 楼主| 发表于 2014-9-9 19:42:42 | 显示全部楼层
回复 2# icfbicfb
大神,你知道怎么把上面的代码改写成门级的代码吗?就是用各种门把功能实现出来
发表于 2014-9-10 10:10:13 | 显示全部楼层
乖乖,你综合都没做,就后端啊,

先综合,再后端,如果就玩个流程的话,没啥意思, 工作后慢慢学吧
发表于 2016-5-25 10:00:15 | 显示全部楼层
5楼正解!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-2 15:54 , Processed in 0.027138 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表