是否可以查看Vivado是否推断了阻滞剂?

发布于 2025-02-01 03:46:14 字数 1663 浏览 4 评论 0 原文

我有以下代码:

module cw305_reg_aes #(
   parameter pADDR_WIDTH = 21,
   parameter pBYTECNT_SIZE = 14,
   parameter pPK_WIDTH = 800 // 800 * 8
)(
   input  wire                                  usb_clk,
   input  wire                                  crypto_clk,
   input  wire [pADDR_WIDTH-pBYTECNT_SIZE-1:0]  reg_address,

   input  wire [pBYTECNT_SIZE-1:0]              reg_bytecnt,

   output reg  [7:0]                            read_data,
   input  wire [7:0]                            write_data,
   input  wire                                  reg_read,
   input  wire                                  reg_write,

   output wire [7:0]                            reg_pk
);

reg  [7:0]                   reg_read_data;
reg  [7:0]                   reg_crypt_public_key [pPK_WIDTH-1:0];
(* ASYNC_REG = "TRUE" *) reg  [7:0] reg_crypt_public_key_crypt [pPK_WIDTH-1:0];

always @(posedge crypto_clk) begin
   for (i=0; i<pPK_WIDTH;i=i+1) begin
      reg_crypt_public_key_crypt[i] <= reg_crypt_public_key[i];
   end   
end

assign reg_pk = reg_crypt_public_key_crypt[0]

always @(*) begin
   if (reg_read) begin
      case (reg_address)          
         `REG_CRYPT_PUBLIC_KEY:      reg_read_data = reg_crypt_public_key[reg_bytecnt];
         default:                    reg_read_data = 0;
      endcase
   end
   else
      reg_read_data = 0;
end

always @(posedge usb_clk) begin
   if (reg_write) begin
      case (reg_address)
         `REG_CRYPT_PUBLIC_KEY:      reg_crypt_public_key[reg_bytecnt] <= write_data;
      endcase
   end
end

如何查看Vivado 2021.1推断block RAM而不是分布式RAM的 reg_crypt_public_key 数组?

I have a following piece of code:

module cw305_reg_aes #(
   parameter pADDR_WIDTH = 21,
   parameter pBYTECNT_SIZE = 14,
   parameter pPK_WIDTH = 800 // 800 * 8
)(
   input  wire                                  usb_clk,
   input  wire                                  crypto_clk,
   input  wire [pADDR_WIDTH-pBYTECNT_SIZE-1:0]  reg_address,

   input  wire [pBYTECNT_SIZE-1:0]              reg_bytecnt,

   output reg  [7:0]                            read_data,
   input  wire [7:0]                            write_data,
   input  wire                                  reg_read,
   input  wire                                  reg_write,

   output wire [7:0]                            reg_pk
);

reg  [7:0]                   reg_read_data;
reg  [7:0]                   reg_crypt_public_key [pPK_WIDTH-1:0];
(* ASYNC_REG = "TRUE" *) reg  [7:0] reg_crypt_public_key_crypt [pPK_WIDTH-1:0];

always @(posedge crypto_clk) begin
   for (i=0; i<pPK_WIDTH;i=i+1) begin
      reg_crypt_public_key_crypt[i] <= reg_crypt_public_key[i];
   end   
end

assign reg_pk = reg_crypt_public_key_crypt[0]

always @(*) begin
   if (reg_read) begin
      case (reg_address)          
         `REG_CRYPT_PUBLIC_KEY:      reg_read_data = reg_crypt_public_key[reg_bytecnt];
         default:                    reg_read_data = 0;
      endcase
   end
   else
      reg_read_data = 0;
end

always @(posedge usb_clk) begin
   if (reg_write) begin
      case (reg_address)
         `REG_CRYPT_PUBLIC_KEY:      reg_crypt_public_key[reg_bytecnt] <= write_data;
      endcase
   end
end

How can I see if Vivado 2021.1 inferred block ram instead of distributed ram for the reg_crypt_public_key array?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

提赋 2025-02-08 03:46:14

在合成日志中报告了块公羊。如果推断出Brams,将有一个部分详细说明HDL产生的哪些部分是哪些端口,宽度等的Brams,

它读取的读取的读物如论坛上所述的日志: https://support.xilinx.com/s/article/61027?language= en_us
借助标头

|Module Name   ------     | RTL Object | PORT A (depth X width)   | W | R | PORT B (depth X width)  | W | R | OUT_REG      | RAMB18 | RAMB36 | Hierarchical Name  

,打开最终利用率报告还将显示设计中使用Brams vs Luts作为内存(分布式)的分层分解。

最后,请参阅《综合指南》,以获取如何根据制造商推荐的代码指南有意推断BRAM。 p。 111

Block rams are reported in the synthesis log. If BRAMs are inferred there will be a section detailing what parts of the HDL produced which BRAMs of how many ports, width, etc

It reads like the log mentioned on the forums here: https://support.xilinx.com/s/article/61027?language=en_US
With header like

|Module Name   ------     | RTL Object | PORT A (depth X width)   | W | R | PORT B (depth X width)  | W | R | OUT_REG      | RAMB18 | RAMB36 | Hierarchical Name  

Additionally opening the final utilization report will show a hierarchical break down of where in the design is using BRAMs vs LUTs as memory (distributed).

Finally see the synthesis guide for how to intentionally infer BRAM per the manufacturers recommended code guidelines. p. 111 https://www.xilinx.com/content/dam/xilinx/support/documents/sw_manuals/xilinx2021_2/ug901-vivado-synthesis.pdf

遗心遗梦遗幸福 2025-02-08 03:46:14

另一种方法:

  • 在Vivado GUI中打开Post Route设计或DCP文件。
  • 找到NetList窗口,并在预期的Bram路径上浏览层次路径。
  • 右键单击Netlist窗口中的设计元素上的“原理图”。
  • 示意图的观看器打开了:推断BRAM,分布式RAM或寄存器。

这是显示连接到布拉姆的寄存器的一个小示例:

这是一种可以探索使用RTL代码所做的事情的一般方式。

Another way:

  • Open the post route design or dcp file in the Vivado GUI.
  • Locate the netlist window and surf the hierarchical path to expected BRAM path.
  • Right click 'schematic' on the design element in the netlist window.
  • The schematic viewer opens showing: inferred BRAM, distributed RAM or registers.

Here is a little example showing a register connected to a BRAM:
enter image description here

This is a general way you can explore what the tools have done with the RTL code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文