macrocell 不够用怎么办?

ivorstar ivorstar 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
verilog写了个小程序,发现macrocell需要6XX,找了几个cpld平台好像最大只能支持到512,有没有支持更多的?还是只能选择fpga?

或者能不能优化程序?


`timescale 1ns / 1ps

module tmvp(a, b, c);
input [62:0] a;
input [31:0] b;
output [31:0] c;

tmvp_32 m1 (a, b, c);

endmodule

module tmvp_32(a, b, c);
input [62:0] a;
input [31:0] b;
output [31:0] c;

wire [30:0] t01;
wire [30:15] t12;
wire [15:0] b01, p0, p1, p2;

//calc T0+T1
assign t01 = a[30:0] ^ a[46:16];

//calc the first column of T1+T2, t12[-1:-n] = t01[n:1]
assign t12 = a[46:31] ^ a[62:47];
assign b01 = b[15:0] ^ b[31:16];

tmvp_16 mul_1 (t01, b[31:16], p0),
mul_2 ({t12, t01[30:16]}, b[15:0], p1),
mul_3 (a[46:16], b01, p2);

assign c[31:16] = (p1 & ~p2) | (~p1 & p2);
assign c[15:0] = (p0 & ~p2) | (~p0 & p2);
endmodule


module tmvp_16(a, b, c);
input [30:0] a;
input [15:0] b;
output [15:0] c;

wire [14:0] t01;
wire [14:7] t12;
wire [7:0] b01, p0, p1, p2;

//calc T0+T1
assign t01 = a[14:0] ^ a[22:8];

//calc the first column of T1+T2, t12[-1:-n] = t01[n:1]
assign t12 = a[14:7] ^ a[30:23];
assign b01 = b[7:0] ^ b[15:8];

tmvp_8 mul_1 (t01, b[15:8], p0),
mul_2 ({t12, t01[14:8]}, b[7:0], p1),
mul_3 (a[22:8], b01, p2);

assign c[15:8] = p1 ^ p2;
assign c[7:0] = p0 ^ p2;
endmodule


module tmvp_8(a, b, c);
input [14:0] a;
input [7:0] b;
output [7:0] c;

wire [6:0] t01;
wire [6:3] t12;
wire [3:0] b01, p0, p1, p2;

//calc T0+T1
assign t01 = a[6:0] ^ a[10:4];

//calc the first column of T1+T2, t12[-1:-n] = t01[n:1]
assign t12 = a[10:7] ^ a[14:11];
assign b01 = b[3:0] ^ b[7:4];

tmvp_4 mul_1 (t01, b[7:4], p0),
mul_2 ({t12, t01[6:4]}, b[3:0], p1),
mul_3 (a[10:4], b01, p2);

assign c[7:4] = p1 ^ p2;
assign c[3:0] = p0 ^ p2;
endmodule

module tmvp_4(a, b, c);
input [6:0] a;
input [3:0] b;
output [3:0] c;

wire [2:0] t01;
wire [2:1] t12;
wire [1:0] b01, p0, p1, p2;

//calc T0+T1
assign t01 = a[2:0] ^ a[4:2];

//calc the first column of T1+T2, t12[-1:-n] = t01[n:1]
assign t12 = a[4:3] ^ a[6:5];
assign b01 = b[1:0] ^ b[3:2];

tmvp_2 mul_1 (t01, b[3:2], p0),
mul_2 ({t12, t01[2]}, b[1:0], p1),
mul_3 (a[4:2], b01, p2);

assign c[3:2] = p1 ^ p2;
assign c[1:0] = p0 ^ p2;
endmodule

module tmvp_2(a, b, c);
input [2:0] a;
input [1:0] b;
output [1:0] c;

wire t01;
wire t12, p0, p1, p2;

//calc T0+T1
assign t01 = a[0] ^ a[1];

//calc the first column of T1+T2, t12[-1:-n] = t01[n:1]
assign t12 = a[1] ^ a[2];
assign b01 = b[0] ^ b[1];

//calc p0, p1, p2
and (p0, t01, b[1]),
(p1, t12, b[0]),
(p2, b01, a[1]);

assign c[0] = p0 ^ p2;
assign c[1] = p1 ^ p2;
endmodule
...全文

相关推荐

usb2-transceiver-macrocell-interface-specifications.pdf

《USB 2.0 Transceiver Macrocell Interface (UTMI) 规范》是USB设备开发中的一个重要技术文档,由Intel公司发布。

qq_41164373

ITM(Instrumentation Trace Macrocell,仪表跟踪宏单元)

ITM(仪器跟踪宏单元)是ARM Cortex-M处理器中的高性能调试模块,可实时捕获程序数据而不中断CPU运行。通过SWO引脚输出调试信息(如变量值、中断事件),支持printf重定向和性能分析,适用于实时系统调试。相比传统串口打印,ITM具有非阻塞、高速(MHz级)和低资源占用优势。使用时需硬件支持ITM模块与SWO引脚连接,并在IDE中配置Trace功能。ITM是实时系统调试的高效工具,尤其适合时序敏感场景。

YahirQ

[HTM] AMBA AHB Trace Macrocell Technical Reference Manual.pdf

根据提供的文件内容,我们可以生成关于ARM AMBA AHB Trace Macrocell(简称HTM)技术参考手册的知识点。

hu_xo

TD_LTE系统中从Macrocell到Femtocell的切换研究

在TD-LTE系统中,宏蜂窝(Macrocell)与微蜂窝(Femtocell)之间的切换是一项关键的技术挑战,因为不适当的切换可能导致服务中断时间(DL SIT)增加和数据包丢失率提高,影响用户体验。

weixin_38629391

EDA/PLD中的CoolRunner-II器件的宏单元Macrocell

宏单元Macrocell概念**在电子设计自动化(EDA)和可编程逻辑器件(PLD)领域,宏单元(Macrocell)是基本的逻辑构建模块。

weixin_38556416
评论 2
收藏 已收藏
分享
返回顶部
ivorstar
硬件设计 6,172 成员 11,288 内容