A disable named block statement stops the execution of all blocks with that same name in all threads, which probably causes unexpected behavior.

Specific to this test, the “disable PM_LINK_WAIT_USB2_L1” statement will stops all active threads of PM_LINK_WAIT_USB2_L1 blocks, even if these PM_LINK_WAIT_USB2_L1 blocks are in different sequences.

Below I list the process of this issue.

1. In sequence “fch_usb_multi_port_trans_seqs”, sequence “fch_usb_lpm_trans_seqs” was called twice for each Port.

//Start transfers for devices

for(int dn=0;dn<number_of_device;dn++) begin

automatic int j=dn;

fork

begin

for(int k=0;k<2;k++)   begin

usb_lpm_trans_seqs[j].otg_xhc_device_transfer= otg_xhc_device_transfer[j];

usb_lpm_trans_seqs[j].start(p_sequencer, this);

end

end

join_none

end

2. In sequence “fch_usb_lpm_trans_seqs”, we need to read register PORTSC_20 to check whether Port is in L1 LPM state.

//Enter low power

reg_port_num = otg_xhc_device_transfer.device_cfg.port_number;

if( pm_controller.pm_link_state == fch_otg_pm_controller::U1_L1 ||

pm_controller.pm_link_state == fch_otg_pm_controller::U2_L1 ) begin

fork : PM_LINK_WAIT_USB2_L1

begin

do begin

#5us;

expected_pm_link_state = 4'd2;

uvm_ext_fd_reg_access(`uvm_ext_fileline,RD,"dwc_usb3_reg","PORTSC_20",reg_data, reg_port_num);

end while(reg_data[8:5] != 4'd2);

end

begin

if(otg_xhc_device_transfer.device_cfg.connected_bus_speed == svt_usb_types::LS) begin

#3500us;

end else if(otg_xhc_device_transfer.device_cfg.connected_bus_speed == svt_usb_types::FS) begin

#2500us;

end else begin

#500us;

end

`uvm_fatal(get_type_name(), $psprintf("PM: Link, waiting for USB2.0 L1 failed for port %0d", otg_xhc_device_transfer.device_cfg.port_number));

end

join_any

            disable PM_LINK_WAIT_USB2_L1;

`uvm_info(get_type_name(), $psprintf("PM: Link, Port %0d is L1", otg_xhc_device_transfer.device_cfg.port_number), UVM_LOW);

end

3. below waveform snapshot,

At #T1, usb_lpm_trans_seqs_0 read register PORTSC_20, and the RDATA is 32’h603

At #T2, usb_lpm_trans_seqs_1 read register PORTSC_20, and the RDATA is 32’h643.

That is, Port0 is in L1 state, and Port1 is not.

4. However, The sequence mistakenly checked the Port0 and Port1 were both in L1 state, which was reported in below log.

sometimes we should use "disable fork" instead of "disable block_name"的更多相关文章

  1. Disable Maven Nature和disable workspace resolution

    1.Disable Maven Nature myeclipse更新maven的时候,手抖了一下,点上了Disable Maven Nature,然后工程右键菜单中的Maven栏就不见了! 其实这是把 ...

  2. How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows and Windows Server

    转自:https://support.microsoft.com/en-us/help/2696547/detect-enable-disable-smbv1-smbv2-smbv3-in-windo ...

  3. How to Disable/Enable IP forwarding in Linux

    This article describes how to Disable or Enable an IP forwarding in Linux. Current IP forwarding sta ...

  4. How To Disable MacBook ProTrackpad

    How To Disable MacBook Pro Trackpad how to close macbook pro touchpad? https://www.wikihow.com/Chang ...

  5. 最近遇到的若干Web前端问题:disable和readonly,JqueryEasyUI,KindEditor

    最近项目中用到了Jquery Easyui和KindEditor等框架组件,问题真不少啊~  一些看起来很简单理所当然的事情,竟然花费了不少时间,才解决好~  1.readonly和disable的区 ...

  6. FFMPEG ./configure 参数及意义

    FFMPEG版本:2.6.2,编译环境:ubuntu 14.4. 不同版本的FFMPEG参数可能不同,可在FFMPEG目录下使用以下命令查看 ./configure --help --help pri ...

  7. GDB教程详解

    GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具.或许,各位比较喜欢那种图形界面方式的,像VC.BCB等IDE的调试,但如果你是在UNIX平台下做软件,你会发现GDB这个调试工具有比VC ...

  8. centos 7.0 PHP 5.6.5 安装过程 (php+nginx)

    php网址 http://php.net/downloads.php 首先下载 php-5.6.5.tar.gz [root@localhost src]# wget http://cn2.php.n ...

  9. GDB中文手册

    用GDB调试程序GDB概述 2使用GDB 5GDB中运行UNIX的shell程序 8在GDB中运行程序 8调试已运行的程序 两种方法: 9暂停 / 恢复程序运行 9一.设置断点(BreakPoint) ...

随机推荐

  1. Tkinter(2.x 与3.X的区别)

    1.包的引入 2.X下是 from Tkinter import * 而3.x是 from tkinter import * 否则,会报找不到tkinter的错误 Traceback (most re ...

  2. 如何成为一名Top DevOps Engineer

    软件世界的战场 如果你对devops的概念不是很了解的话,没有关系,可以先跳到维基百科阅读一下DevOps条目.有了模模糊糊的概念之后, 我们先抛开所有市面上对于devops的各种夸大和炒作,首先来思 ...

  3. .NET 并行编程——数据并行

    本文内容 并行编程 数据并行 环境 计算 PI 矩阵相乘 把目录中的全部图片复制到另一个目录 列出指定目录中的所有文件,包括其子目录 最近,对多线程编程,并行编程,异步编程,这三个概念有点晕了,之前我 ...

  4. PHP中日志相关处理

    内置函数: 1.error_log() ,第三个参数不能是绝对路径,必须是相对路径.写入文件: error_log("warn:\nthis is a warn!\n",3,&qu ...

  5. Jquery计算时间戳之间的差值,可返回年,月,日,小时等

    /** * 计算时间戳之间的差值 * @param startTime 开始时间戳 * @param endTime 结束时间戳 * @param type 返回指定类型差值(year, month, ...

  6. 【PMP】项目风险管理~重点知识

    1.什么是风险,项目的风险从哪里来? 开展项目,不仅要面对各种制约因素和假设条件,而且还要应对可能相互冲突和不断变化的相关方期望.组织应该有目的的以可控方式去冒项目风险,以便平衡风险和回报,并创造价值 ...

  7. cas 资源

    http://blog.sina.com.cn/s/blog_6fda308501012tk2.html http://www.blogjava.net/xmatthew/archive/2008/0 ...

  8. 基于window自带功能生成目录树

    在写文档时,生成目录树是非常有必要的,可以清晰明了地用图阐释一些事情. 1 生成目录树 1.1 方案1:操作繁(只显示文件夹) 1 - win + R 2 - 输入 “CMD” ,打开命令提示窗口“ ...

  9. GCD 之线程死锁

    GCD 确实好用 ,很强大,相比NSOpretion 无法提供 取消任务的功能. 如此强大的工具用不好可能会出现线程死锁. 如下代码: - (void)viewDidLoad { [super vie ...

  10. [svc]linux的inode和block-软硬链接

    磁盘结构 容量 磁盘结构 磁盘容量 = 一个柱面大小柱面的总数 = 磁头数量每个磁道上的扇区数一个扇区大小柱面总数 存储容量=磁头数 × 磁道(柱面)数 × 每道扇区数 × 每扇区字节数 了解-什么是 ...