DVCon US 2018 论文分享

本文探讨了在UVM验证环境中应用备忘录模式的方法,该模式有助于存储和恢复对象状态,尤其适用于多电源域设计中的配置保存与恢复。
部署运行你感兴趣的模型镜像

写在前面:此篇论文是DVCon US 2018年的一篇论文:UVM Verification Environment Based on Software Design Patterns,主要介绍了在开发UVM验证环境中使用软件设计模式方法,论文相关的重点在本文里给出标记。本文介绍原文中备忘录模式的应用。

  • Abstract

Software design pattern is a technique utilized to tackle a commonly occurring problem in the software development. As a significant part of work done by verification engineers includes coding in an object-oriented language,such as SystemVerilog, many of the encountered challenges are suitable to be resolved applying certain design patterns.Their incorporation into the code provides many benefits, contributing to the code reusability and maintainability, andtherefore improving the overall code quality. Several practical examples appropriate for employing design patterns arepresented in the paper.

《验证芯发现》:软件开发中的设计模式提供了一种解决问题的思路,systemverilog也支持面向对象开发的特性,此篇文章把设计模式的思路运用到验证环境的设计开发中,提升了代码的复用性、可维护性,进而全面提升代码质量

  • Memento(备忘录模式)

Memento is a behavioral software design pattern used to capture the state of an object and restore the object into its previous state. In the software development context,it provides the undo mechanism in the applications,promoting the data hiding and not violating the encapsulation principle. In the verification environment, it is utilized to model the "restore" feature.The device is implemented using multiple power domains -PD1 and PD2, as shownin Figure 1. While PD2 is in operational Run Mode(RM), the block configuration is defined in the appropriate register. When the PD2 enters the low-power mode(LPM), the configuration register behaves as read-only andreading the register results in read value isolation. During the LPM, the RM configuration is stored within always-on PD1.Upon the PD2 LPM exit, the content of the configuration register is restored to the value before the LPM entry.Memento is a good candidate to model the content reversal.

《验证芯发现》:备忘录模式用于存储对象状态,以便程序能够恢复对象的历史状态,备忘录模式可以保持对象的封装性不受破坏。软件备忘录模式一个实际例子就是经常使用的撤销操作(ctrl+z),能够撤销成功,就需要首先备份对象的历史记录,然后再恢复历史信息。文章中给出一个多电源域的设计:两个电源域PD1和PD2,PD1可以认为是一个AO区(always-on),PD2有两种工作模式:工作模式和低功耗模式。当PD2进入低功耗模式前,其配置会存储到PD1中;当PD2恢复到工作模式时,会加载低功耗模式前的配置信息。

The Memento state design pattern defines three main components:

  1. Memento - Represents a container class for the content to be saved and restored.In the example shown in Figure Appendix-1, Memento class contains a single configuration register,with corresponding get/set methods.

  2. Originator - Uses the Memento class to save the current state it is in, as shown in Figure Appendix-2.

  3. Caretaker - Requests from the Originator to save its state. It is aware of all saved states and can request a certain state to be restored, as shown in Figure Appendix-3.

《验证芯发现》:备忘录模式主要包含三个角色:Memento、Originator 和CaretakerMemento用于存储对象的状态;Originator可以创建或恢复一个Memento,上图类中的save_state_to_memento和get_state_from_memnto方法;Caretaker负责管理好备忘录,如上图类中的add和get方法。三者的UML类图如下:

The save and restore operations are demonstrated in Figure 2, with the corresponding log output in Figure 3:

《验证芯发现》:上述的过程如下:

  • run mode,在工作模式下调用Originator的set_state方法设置当前工作状态;

  • LPM Entry,调用Originator的save_state_to_memento方法,创建一个备忘录,并使用Caretaker的add方法记录当前状态对象,并调用Originator的set_state方法设置当前工作状态为低功耗模式。

  • LPM Exit,使用Caretaker的get方法,获取想要恢复的备忘录对象,然后使用Originator的get_state_from_memnto方法,从备忘录中恢复状态信息;


验证芯发现icon-default.png?t=M85Bhttps://mp.weixin.qq.com/s?__biz=Mzg3ODczNDg0NA==&mid=2247483778&idx=1&sn=5768d0328c15d0193d50fb6888e1e4e9&chksm=cf0e7d11f879f407e7c8991884f3621d790d96208ae5233afdf9231298b41ea0b62c225e43c8&token=1266482168&lang=zh_CN#rd 

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

### 关于DVCon(Design and Verification Conference)的相关论文 DVCon(Design and Verification Conference)是一个专注于电子设计自动化(EDA)、硬件描述语言(HDL)以及验证方法学的重要国际会议。该会议提供了大量高质量的技术论文,涵盖了从芯片级到系统级的设计与验证解决方案[^2]。 #### 如何获取DVCon论文资源 DVCon的官方站点通常会提供历年的会议论文集下载链接。这些论文主要涉及以下领域: - 验证策略与流程优化 - 形式化验证的应用与发展 - 基于UVM/OVM的测试平台开发 - 功能覆盖率驱动的验证方法 - 软件与硬件协同验证技术 可以通过访问官方网站或者通过IEEE Xplore数据库检索DVCon相关的出版物来获得具体论文。例如,在Sun Burst Design网站上也提到了一些实用的经验总结和技术文章,它们可能间接引用了DVCon的内容。 以下是几个典型的DVCon主题方向及其潜在价值: 1. **形式化验证** 许多DVCon论文探讨如何利用形式化方法提升RTL代码的质量并减少回归测试的时间开销。这类研究对于复杂SoC项目的成功至关重要。 2. **低功耗设计与验证** 近年来,随着移动设备市场的增长,关于降低动态功率消耗及管理状态机转换效率的研究成为热点之一。相关工作展示了先进技术和最佳实践案例[^2]。 3. **机器学习辅助验证** 新兴趋势显示AI算法正在被引入传统EDA工具链当中以加速仿真周期或预测错误模式的发生概率。此类创新性成果往往会在顶级会议上首次亮相,比如DVCon。 下面给出一段简单的Python脚本用于模拟搜索特定关键词下的所有可用年份内的DVCon记录(假设已连接至相应API): ```python import requests def fetch_dvcon_papers(keyword, start_year=2000, end_year=2023): base_url = "https://api.dvconf.example.com/search" params = { 'q': keyword, 'startYear': str(start_year), 'endYear': str(end_year) } response = requests.get(base_url, params=params) if response.status_code == 200: data = response.json() return [(item['title'], item['year']) for item in data['papers']] else: raise Exception(f"Failed to retrieve papers with status code {response.status_code}") # Example usage try: results = fetch_dvcon_papers('formal verification') for title, year in results[:5]: print(f"{year}: {title}") except Exception as e: print(e) ``` 此函数可以根据指定关键字查询一定时间范围内的DVCon文献列表,并打印前五个匹配项作为示例展示。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值