Formality:Bug记录

相关阅读

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


本文记录博主在使用Synopsys的形式验证工具Formality中遇到的几个Bug。

Bug复现

情况一

复制代码
// 例1
module dff (
    input clk,    
    input d_in,      
    output d_out    
);
    reg q1, q2;  

    always @(posedge clk) begin
        q1 <= d_in;  
        q2 <= q1;       
    end

    assign d_out = q2;
endmodule

首先以例1的RTL代码作为参考设计和实现设计,然后在setup模式使用以下set_constant命令使得q1、q2触发器变成不可读触发器。

复制代码
set_constant -type net r:/WORK/dff_chain/d_out 1
set_constant -type net i:/WORK/dff_chain/d_out 1

关于不可读的更详细信息,可以参考下面的博客。

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

随后在fm_shell中使用match命令进行匹配,或在GUI界面点击Run Matching,此时fm_shell中显示的匹配结果与GUI界面显示的匹配结果出现了差别,如下所示。

复制代码
// fm_shell的匹配结果
*********************************** Matching Results ***********************************
 1 Compare points matched by name
 0 Compare points matched by signature analysis
 0 Compare points matched by topology
 0 Matched primary inputs, black-box outputs
 0(0) Unmatched reference(implementation) compare points
 0(0) Unmatched reference(implementation) primary inputs, black-box outputs
****************************************************************************************

// GUI界面的匹配结果
3 points matched by name
0 points matched by signature analysis
0 points matched by topology
0 points matched by user
0 unmatched reference points
0 unmatched implementation points

结果显示fm_shell没有考虑两对匹配的不可读触发器,而GUI界面考虑了,更严重的是,此时输入/输出端口没有显示在任何匹配报告中。

这对最后的验证结果没有影响,不可读触发器在默认情况下会被归为Not Compared类而不进行验证(可通过verification_verify_unread_compare_points变量改变),如下所示。

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

情况二

以例2的RTL代码的作为实现设计,而使用例1的RTL代码作为参考设计,匹配结果如下所示。

复制代码
// 例2
module dff (
    input clk,    
    input d_in,      
    output d_out    
);
    reg q1, q2, q3;  

    always @(posedge clk) begin
        q1 <= d_in;  
        q3 <= d_in; 
        q2 <= q1;       
    end

    assign d_out = q2;
endmodule

// fm_shell的匹配结果
*********************************** Matching Results ***********************************
 3 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
****************************************************************************************

// GUI界面的匹配结果
5 points matched by name
0 points matched by signature analysis
0 points matched by topology
0 points matched by user
0 unmatched reference points
0 unmatched implementation points

结果显示fm_shell的匹配结果中列出了这个未匹配的不可读触发器,而输入/输出端口显示在了匹配报告中。

情况三

以例2的RTL代码作为参考设计和实现设计,匹配结果如下所示。

复制代码
// fm_shell的匹配结果
*********************************** Matching Results ***********************************
 3 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
****************************************************************************************

// GUI界面的匹配结果
6 points matched by name
0 points matched by signature analysis
0 points matched by topology
0 points matched by user
0 unmatched reference points
0 unmatched implementation points

结果显示fm_shell没有考虑这对匹配的不可读触发器,而GUI界面考虑了,而输入/输出端口显示在了匹配报告中。

Bug总结

1、当使用set_constant命令导致不可读触发器时,fm_shell和GUI界面的匹配结果不一致,输入输出端口不会出现在任何匹配报告中,而匹配的不可读触发器不出现在fm_shell中(对最终验证没有影响)。

2、即使不使用set_constant命令,fm_shell和GUI界面的匹配结果也不一致,匹配的不可读触发器不出现在fm_shell中(对最终验证没有影响)。

Bug反馈

目前已在Solvnet上向Synopsys提出反馈,如下图所示。

相关推荐
逼子格11 小时前
滤波电路Multisim电路仿真实验汇总——硬件工程师笔记
笔记·嵌入式硬件·硬件工程·硬件工程师·硬件工程师真题·multisim电路仿真·滤波电路
MARIN_shen1 天前
Marin说PCB之Allegro高亮BOM器件技巧详解
单片机·嵌入式硬件·硬件工程·pcb工艺
日晨难再1 天前
Genus:设计信息结构以及导航方式(路径种类)
硬件工程·数字ic
狄加山6752 天前
Cadence模块复用
服务器·硬件架构·硬件工程·信号处理·智能硬件
逼子格2 天前
开关电源和线性电源Multisim电路仿真实验汇总——硬件工程师笔记
嵌入式硬件·硬件工程·硬件工程师·开关电源·multisim电路仿真·稳压电源·线性电源
逼子格2 天前
振荡电路Multisim电路仿真实验汇总——硬件工程师笔记
笔记·嵌入式硬件·硬件工程·硬件工程师·硬件工程师真题·multisim电路仿真·震荡电流
国科安芯8 天前
【AS32系列MCU调试教程】SPI调试的常见问题解析
单片机·嵌入式硬件·性能优化·硬件架构·硬件工程
水龙吟啸9 天前
计算机组成原理与体系结构-实验四 微程序控制器 (Proteus 8.15)
硬件架构·proteus·硬件工程
S,D9 天前
MCU引脚的漏电流、灌电流、拉电流区别是什么
驱动开发·stm32·单片机·嵌入式硬件·mcu·物联网·硬件工程
国科安芯19 天前
基于ASP4644多通道降压技术在电力监测系统中集成应用与发展前景
嵌入式硬件·硬件架构·硬件工程