yuanpin318的个人空间 https://blog.eetop.cn/13812 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

Verilog basics

已有 837 次阅读| 2019-5-27 10:37 |个人分类:Verilog|系统分类:芯片设计


0 Verilog History
   0.1. IEEE Std 1364-1995
   0.2. IEEE std 1364-2001
   0.3. IEEE std 1364-2005

1. 如何加pullup
    rtranif1 (port0, vdd_pull1, en);
    注意:assign (pull1, pull0) port0 = en ? 1'b1 : 1'bz; // port0还是strong1
    in continuous assignment, strength取决于drive signal, value也取决于drive signal

2. Verilog有两类assignment:
    2.1 continuous assignment
           assign (pull1, pull0) write_en = write_en_a | write_en_b;
     2.2 Procedure assignment:
            always @(posedge clk or negedge resetb)
              if (!resetb)
                 count <= 8'b0;
              else
                 count <= count+1;
3. Net:
    3.1. wire, tri: both are same, just has different application purpose
                 wire: driven by logic gate or continuous assignment.
                 tri: multi-driven (没用过,synthesizable???)
    3.2. wor, wand, trior, triand: wire and/or
    3.3. tri0, tri1: used for pull down/pull up (Not synthesizable)
    3.4. uwire: only allow one driver, in verilog-2005
    3.5. supply1/supply0: used in verdor cell library

4. verilog中的相等: ==,!= Vs ===,!==
  • Logic equality: ==
    • “a==b”
      • Only compare when a or b is 0 or 1
      • If a or b is “x”, “z”, result is always “x”/false
      • tests for 1 and 0, all other will result in x
  • Case equality: ===
    • “a===b”
      • Will compare 0/1/x/z
      • When both are x or both are z, result is 1
      • tests for 1, 0, z and x
      • never resulting in X
Wildcard Equality: ==?, !=?
  • Make few bits in RHS as don't-cares
  • a =?= b 
  • a equals b, X and Z values act as wild cards
  • may result in X if the left operand contains an x or Z

5. Verilog gate
     nand #(5) (strong1, strong0) INAND0 (out, a, b)
     bufif0 ar[3:0] (out, in, en);    //array of 3-state buffer
     pullup (strong1) p1 (neta), p2(netb);


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 11

    粉丝
  • 2

    好友
  • 18

    获赞
  • 7

    评论
  • 3609

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-8 21:48 , Processed in 0.028310 second(s), 15 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部