zoukankan      html  css  js  c++  java
  • QS之force(2)

    Examples

    1) Force input1 to 0 at the current simulator time.

      force  input1  0

    2) Force the fourth element of the array bus1 to 1 at the current simulator time.

      force  bus1(4)   1

    3) Force bus1 to 01XZ at 100 ns after the current simulator time.

      force   bus1   01XZ   100 ns

    4) Force bus1 to 16#F at the absolute time 200 measured in the resolution units selected at simulation start-up.

      force   bus1   16#f   @200

    5) Force input1 to 1 at 10 time units after the current simulation time and to 0 at 20 time units after current. Repeat this cycle every 100 time   units after current. If the current simulation time is 100 ns, the next transition is to 1 at 110 ns and 0 at 120 ns, this pattern to start           repeating at 200 ns.

      force   input1  1  10,  0  20  -r  100

    6) Similar to the previous example, but also specifies the time units.

      force   input1  1   10 ns,  0  20 ns    -r  100 ns

    7) Force signal s to alternate between values 1 and 0 every 100 time units until 1000 time units have occurred, starting from time Now.               Cancellation occurs at the last simulation delta cycle of a time unit.

        force  s  1  0,  0  100  -repeat  200   -cancel   1000

      So,
        force    s  1  0   -cancel 0

      will force signal s to 1 for the duration of the current time period.

    8) Force siga to decimal value 85 whenever the value on the signal is 1.

      when {/mydut/siga = 10#1} {

       force  -deposit   /mydut/siga   10#85
      }

    9)  Force one bit of a record containing an array.

      force   struct1.bus1(4)    1

    10) Force a slice of an array.

       force   {bus1[2:5]}   'hF

  • 相关阅读:
    我常用的find命令
    Linux压缩和解压汇总
    windows下bat批处理实现守护进程
    windows2003批量添加和导出所有ip
    bat批量去除文件首行和合并到文件
    windows下批量删除文件
    windows添加和删除服务
    【转】自动实时监控Windows2003服务器终端登录并发邮件和发短信通知
    设置windows网络连接别名和linux网络连接别名
    我常用的crontab命令
  • 原文地址:https://www.cnblogs.com/mengdie/p/4517709.html
Copyright © 2011-2022 走看看