paper:synthesizable finite state machine design techniques using the new systemverilog 3.0 enhancements 之 FSM Coding Goals
1.the fsm coding style should be easily modifiable to change state encoding and FSM styles.
FSM 的的 状态编码和风格易于改变
2.the coding style should be compact.
代码比较紧凑
3.the coding style should facilitate debugging.
代码易于debug
4.the coding style should yield efficient synthesis results.
基于综合做coding
Important common guidelines :
Guideline:Make each FSM design a separate Verilog moulde.
一个module中只有一个FSM 。
Guideline:Use parameters to define state encoding instead of the Verilog `define macro definition construct.
能用parameter 就不用define ,当定义状态编码时。
Guideline:When creating verilog constants,think parameters first,then find good justification before changing to use a global `define macro.
如果真的需要全局常量就用define,否则尽量用parameter,当定义一个常量时。
most verilog constants should be coded using parameters.
parameter 定义的是模块局部的,define 定义的是全局的,整个project都可以看到。
Guideline: make state and next(next state) declarations right before the parameter assignments
先声明后使用。
Guideline:Code all sequential always block using nonblocking assignments(<=).
Guideline : Code al combinational always block using blocking assignments(=).
防止race conditions
paper:synthesizable finite state machine design techniques using the new systemverilog 3.0 enhancements 之 FSM Coding Goals的更多相关文章
- paper:synthesizable finite state machine design techniques using the new systemverilog 3.0 enhancements 之 standard verilog FSM conding styles(二段式)
1.Two always block style with combinational outputs(Good Style) 对应的代码如下: 2段式总结: (1)the combinational ...
- paper:synthesizable finite state machine design techniques using the new systemverilog 3.0 enhancements 之 standard verilog FSM conding styles(三段式)
Three always block style with registered outputs(Good style)
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之onehot coding styles(index-parameter style with registered outputs)
case语句中,对于state/next 矢量仅仅做了1-bit比较. parameter 值不是表示FSM的状态编码,而是表示state/next变量的索引.
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之fsm summary
主要是1.不要用1段式写FSM 2.不要用状态编码写one-hot FSM ,要用索引编码写one-hot FSM.
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之enhanced coding styles
1.ANSI style 的代码比较紧凑. 下面规范推荐,比较好. 下面是带有parameter的module header的完整规范 一般1bit ,大家都是wire signal1 = gen_s ...
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之onehot coding styles(encoded-parameter style with registered outputs不推荐但是经常有人写这样的代码)
这样写法,不利与综合,case语句中比较也是full-vector比较.
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之全0/1/z/x的SV写法
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之fsm1各种style的timing/area比较
整体说,一般还是用2段式,再加上output encodecd/default -X技巧.
- paper:synthesizable finit state machine design techniques using the new systemverilog 3.0 enhancements之output encoded style with registered outputs(Good style)
把输出跟状态编码结合起来,即使可以省面积又是寄存器输出.但是没有讲解如何实现这种高效的编码.
随机推荐
- Struts2拦截器再认识
拦截器(Interceptor)是 Struts 2 的核心组成部分. Struts2 很多功能都是构建在拦截器基础之上的,例如文件的上传和下载.国际化.数据类型转换和数据校验等等. Struts2 ...
- 【BZOJ2428】均分数据
题解 先说说黄学长的做法: 当温度比较高的时候,贪心 每次随机一个数,把他放进当前和最少的那一组里面 温度足够低的时候就完全随机然后转移 对于一个排列,分组强制连续 答案显然唯一,做一遍(dp)就好 ...
- jQuery banner切换插件
今天学写了一个基于jQuery焦点图切换插件,有不对的地方还请多多指教,不多说下面是代码: 1.引jQuery库 <script src="http://code.jquery.com ...
- .md文件插图片,不建议使用绝对地址。
一 主要有两种方法,一种绝对地址,一种相对地址. 而百度的话,全都是说绝对地址的. 但是,有很大的弊端啊 orz 二 先说绝对地址 环境
大家可通过下面五条命令来查看linux 系统是否安装了java 环境 1.java -version 2.which java 3.rpm -qa |grep java 4.echo $PATH 5. ...
- css文字与文本相关样式
css文字属性定义文本的字体系列,大小,加粗,风格和变形 font-family 设置字体系列 font-size 设置字体的尺寸 font-style ...
- <Android 应用 之路> 简易贪吃蛇
最简单的贪吃蛇 最近想着忙里偷闲写点简单的Android应用,增加一些生活乐趣,由于平时工作主要精力并不是集中在书写apk上,更多的是解决代码问题和维护模块稳定,但是写代码本身是一件比较有趣的事情,因 ...