HDLBITS草稿
module top_module(
input [31:0] a,
input [31:0] b,
output [31:0] sum
);
wire cout1,sum1,sum2,sum3;
add16 instance_lower(.a(a[15:0]), .b(b[15:0]), .cin(), .sum(sum1[15:0]), .cout(cout1));
add16 instance_upper0(.a(a[31:16]), .b(b[31:16]), .cin(0), .sum(sum2[31:16]), .cout());
add16 instance_upper1(.a(a[31:16]), .b(b[31:16]), .cin(1), .sum(sum3[31:16]), .cout());
reg sum0;
if(cout1) sum0 = {sum3,sum1};
else
HDLBITS草稿最先出现在Python成神之路。
共有 0 条评论