Formality:时序变换(二)(不可读寄存器移除)

相关阅读

Formalityhttps://blog.csdn.net/weixin_45791458/category_12841971.html?spm=1001.2014.3001.5482https://blog.csdn.net/weixin_45791458/category_12841971.html?spm=1001.2014.3001.5482


一、引言

时序变换在Design Compiler的首次综合和增量综合中都可能发生,它们包括:时钟门控(Clock Gating)、寄存器合并(Register Merging)、寄存器复制(Register Replication)、常量寄存器移除(Constant Register Removal)、不可读寄存器移除(Unread register removal)、流水线重定时(Pipeline Retiming)、自适应重定时(Adaptive Retiming)、相位反转(Phase Inversion)、多比特寄存器组(Multibit Banking)。

合适的时序变换越多,就能获得更好的结果质量(QoR),但时序变换会无法避免地造成等价性检查的困难,因为这改变了逻辑锥的结构。虽然使用SVF文件能够解决大部分的问题(关于SVF文件的介绍,参考Design Compiler:set_svf命令以及svf文件简介一文),但对这些时序变换的了解有助于在不使用SVF文件时进行设置和在SVF文件失效时进行调试。

本文将详细阐述时序变换中的不可读寄存器的移除,将简单介绍不可读寄存器的概念,有关不可读概念的详细介绍,参考下面的这篇博客。

Formality:不可读(unread)的概念https://chenzhang.blog.csdn.net/article/details/145242304https://chenzhang.blog.csdn.net/article/details/145242304

二、不可读寄存器移除

图1 不可读寄存器的综合

如图1所示,当Design Compiler识别到不可读寄存器后,它会将其从设计中移除;Formality将自动识别不可读寄存器(无需使用SVF文件和用户设置),一般情况下参考设计中会存在未匹配的不可读寄存器,即使不可读寄存器匹配成功了,默认情况下也不会进行验证(可通过verification_verify_unread_compare_points变量改变)。

三、示例

例1 不可读寄存器

复制代码
// 参考设计
module unread(input a, b, clk, output z);
reg a_r1, a_r2;

assign z = a_r1;
always@(posedge clk) begin
    a_r1 <= a;
    a_r2 <= a & b; // 没有负载
end
 
endmodule
 
// 实现设计
module unread ( a, b, clk, z );
  input a, b, clk;
  output z;


  DFFQXL a_r1_reg ( .D(a), .CK(clk), .Q(z) );
endmodule

例1的匹配结果如下所示,可以看出参考设计中存在一个未匹配的不可读点。

复制代码
*********************************** Matching Results ***********************************
 2 Compare points matched by name
 0 Compare points matched by signature analysis
 0 Compare points matched by topology
 2 Matched primary inputs, black-box outputs
 0(0) Unmatched reference(implementation) compare points
 0(0) Unmatched reference(implementation) primary inputs, black-box outputs
 1(0) Unmatched reference(implementation) unread points
****************************************************************************************

使用report_unmatched_points -status unread可以显示该点的详细信息,可以看出不匹配的点就是被Design Compiler移除的不可读寄存器,如下所示。

复制代码
**************************************************
Report         : unmatched_points
                 -status unread 

Reference      : r:/WORK/unread
Implementation : i:/WORK/unread
Version        : O-2018.06-SP1
Date           : Thu Jan 23 22:32:31 2025
**************************************************

1 Unmatched point (1 reference, 0 implementation):

  Ref  DFF        r:/WORK/unread/a_r2_reg

例1的验证结果如下所示,可以看到即使参考设计中出现了未匹配的寄存器,但由于其被识别为不可读寄存器,因此验证成功。

复制代码
********************************* Verification Results *********************************
Verification SUCCEEDED
----------------------
 Reference design: r:/WORK/unread
 Implementation design: i:/WORK/unread
 2 Passing compare points
----------------------------------------------------------------------------------------
Matched Compare Points     BBPin    Loop   BBNet     Cut    Port     DFF     LAT   TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent)           0       0       0       0       1       1       0       2
Failing (not equivalent)       0       0       0       0       0       0       0       0
****************************************************************************************

假设使用RTL描述同时作为参考设计和实现设计,不可读寄存器能够匹配成功,如下所示。

复制代码
*********************************** Matching Results ***********************************
 2 Compare points matched by name
 0 Compare points matched by signature analysis
 0 Compare points matched by topology
 2 Matched primary inputs, black-box outputs
 0(0) Unmatched reference(implementation) compare points
 0(0) Unmatched reference(implementation) primary inputs, black-box outputs
****************************************************************************************

验证结果如下所示,可以看出不可读的比较点默认情况下会被归为Not Compared类而不进行验证。

复制代码
********************************* Verification Results *********************************
Verification SUCCEEDED
----------------------
 Reference design: r:/WORK/unread
 Implementation design: i:/WORK/unread
 2 Passing compare points
----------------------------------------------------------------------------------------
Matched Compare Points     BBPin    Loop   BBNet     Cut    Port     DFF     LAT   TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent)           0       0       0       0       1       1       0       2
Failing (not equivalent)       0       0       0       0       0       0       0       0
Not Compared
  Unread                       0       0       0       0       0       1       0       1
****************************************************************************************

如果将verification_verify_unread_compare_points变量设置为true,则会对成功匹配的不可读比较点进行验证,如下所示。

复制代码
********************************* Verification Results *********************************
Verification SUCCEEDED
----------------------
 Reference design: r:/WORK/unread
 Implementation design: i:/WORK/unread
 3 Passing compare points
----------------------------------------------------------------------------------------
Matched Compare Points     BBPin    Loop   BBNet     Cut    Port     DFF     LAT   TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent)           0       0       0       0       1       2       0       3
Failing (not equivalent)       0       0       0       0       0       0       0       0
****************************************************************************************
相关推荐
智源研究院官方账号7 小时前
众智FlagOS 1.6发布,以统一架构推动AI硬件、软件技术生态创新发展
数据库·人工智能·算法·架构·编辑器·硬件工程·开源软件
浩子智控1 天前
电子产品设计企业知识管理
运维·服务器·eclipse·系统安全·硬件工程
qq_672592751 天前
STM32超声测距离的测量精度评估
stm32·硬件架构·硬件工程
日晨难再1 天前
Design Compiler:Multibit优化(增强型布局感知的Multibit Banking流程)
数字ic
恒锐丰小吕1 天前
屹晶微 EG2181D 600V耐压、2.5A驱动、无闭锁带欠压保护的紧凑型半桥驱动器技术解析
嵌入式硬件·硬件工程
恒锐丰小吕1 天前
矽塔 SA8339 单通道 12V/12A 峰值、低内阻、全集成 H 桥电机驱动器技术解析
嵌入式硬件·硬件工程
莫桑晚-为尚天2 天前
LED恒流驱动&恒压驱动
硬件工程
日晨难再4 天前
我在CSDN的三年创作历程
数字ic
Archie_IT4 天前
基于STM32F103C8T6标准库的OLED显示屏中文汉字显示实现_资料编号39
stm32·单片机·嵌入式硬件·mcu·硬件工程·信息与通信·信号处理
weixin_669545205 天前
高精度二合一锂电池保护芯片XR2130B
人工智能·硬件工程·信息与通信