jxbl13的个人空间 https://blog.eetop.cn/1761936 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

Verilog实例化数组实现级联加法(HDL bits 题目:Bcdadd100)

已有 1287 次阅读| 2021-4-22 01:02 |个人分类:Verilog小记|系统分类:芯片设计| instance

module bcd_fadd {
    input [3:0] a,
    input [3:0] b,
    input     cin,
    output   cout,
    output [3:0] sum );
module top_module( 
    input [399:0] a, b,
    input cin,
    output cout,
    output [399:0] sum );
    //bcd_fadd inst[99:0];
    reg[99:0]cout1;
    bcd_fadd inst[99:0](.a(a[399:0]),.b(b[399:0]),.cin({cout1[98:0],cin}),
    .cout(cout1[99:0]),.sum(sum[399:0]));

    assign cout = cout1[99];

endmodule

主要是instance array的使用,其中bcd_fadd是4位BCD加法器。


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 0

    粉丝
  • 0

    好友
  • 0

    获赞
  • 0

    评论
  • 66

    访问数
关闭

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

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

GMT+8, 2024-4-29 02:20 , Processed in 0.024461 second(s), 15 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部