RTL Coding 读书笔记4:Data Path

#############################################################
# 1) coding guideline for datapath synthesis   SYNOPSYS
#############################################################

关键字:  符号   位宽

正确:
  1)  用signed实现,不要用unsigned模拟
  2)  不要手动扩展符号位、0
  3) 不要在一个表达式中混用 signed unsigned
  4)  不要用[x:x]选择signed数的所有bit,任意选择都将变成unsigned
  5)  不要用self-determined 表达式(隐式位宽,可能出错)
  6)  .... VHDL

优良:
  7) 将相关逻辑放一个block中
  8) 不要在一组datapath中混用signed unsigned
  9)  用符号标志位变量来切换signed/unsigned复用datapath
  10)用POS: (a+ci)*b  instead of a*b + ci? b:0
  11) 不要调用DesignWare
  12) 用retiming辅助实现pipeline
  13)不要用 ~a + 1来实现补码转换,用-a
  14) 对因子取负,而不是对积取负
  15)共享移位,来优化并行常数乘法
  16)共享表达式
  17)用LSB位加1来四舍五入,而不是加和的LSB

工具:
  1)note warings: sigend-to-unsigned unsigend-to-signed coversion  VER-318
  2)report_resources:  report synthesized datpath

 

 

发布了20 篇原创文章 · 获赞 4 · 访问量 3085

猜你喜欢

转载自blog.csdn.net/niceshotgoodball/article/details/104046231