UVM – Stop Hitting Your Brother Coding Guidelines

Configuration Tips

  • don't config_db the individual values, group values tnto config object
  • calling set()/get() 
  • group a component's configuration: env and agent
  • config_db 明确路径, 减少wildcard;config_db::get如果失败,打印提示
  • config 跟TB 匹配

Transaction Tips

  • write the do_copy(), do_compare()
  • never mix the two

Sequence Tips

  • no more murky m_sequencer/p_sequencer, 你可以把sqr放到config中
  • avoid the traning wheels: uvm_do

More UVM Tips

  • Minimize UVM objections to test level, and maybe scoreboard, avoid in sequences, drivers, ...
  • construct objects with factory create(), not new(); 可以自定义macro: my_create_o/c
  • always check the result from randomize(); not assert(txn.randomize())
  • checker $cast() too

Systemverilog Tips

  • Single value: $urandom(n)
  • avoid randcase: hard to debug
  • never $random()
  • avoid obscure constructs from the LRM: streaming operators; wildcard compares
  • watch out for X and Z: ===
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值