-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathverilog传奇第一章前半部分.html
158 lines (135 loc) · 9.68 KB
/
verilog传奇第一章前半部分.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!doctype html>
<html lang="en" itemscope itemtype="http://schema.org/Person">
<head>
<meta charset="utf-8">
<!-- Site Meta Data -->
<title>Verilog传奇第一章前半部分</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="rcjiang">
<link rel="shortcut icon" href="">
<!-- schema.org -->
<meta itemprop="name" content="JRC's blog">
<meta itemprop="image" content="">
<meta itemprop="description" content="">
<!-- Style Meta Data -->
<link rel="stylesheet" href="/theme/css/milligram.css" type="text/css" />
<link rel="stylesheet" href="/theme/css/custom.css" type="text/css" />
<!-- Feed Meta Data -->
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="JRC's blog ATOM Feed" />
<!-- Twitter Feed -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="">
<meta name="twitter:image" content="">
<meta name="twitter:creator" content="">
<meta name="twitter:url" content="/verilog传奇第一章前半部分.html">
<meta name="twitter:title" content="JRC's blog ~ Verilog传奇第一章前半部分">
<meta name="twitter:description" content="本blog主要讲了verilog语言的历史以及FPGA和ASIC芯片的设计流程">
<!-- Facebook Meta Data -->
<meta property="og:title" content="JRC's blog ~ Verilog传奇第一章前半部分" />
<meta property="og:description" content="本blog主要讲了verilog语言的历史以及FPGA和ASIC芯片的设计流程" />
<meta property="og:image" content="" />
</head>
<body>
<div class="container">
<!-- Navbar -->
<div class="navbar">
<ul>
<div>
<li>
<a href=""><h3>JRC's blog</h3></a>
</li>
<li>
</li>
</div>
</ul>
</div>
<!-- Sidebar -->
<sidebar>
<ul class="static-item">
<li><a href="http://github.com">github</a></li>
</ul>
<ul>
<div class="cat-border">
<li style="color: #F2F1EF; background-color: #6C7A89;">Categories</li>
<li><a href="/category/misc.html">misc</a></li>
<li><a href="/category/ting-geng.html">停更</a></li>
<li><a href="/category/verilogchuan-qi.html">Verilog传奇</a></li>
<li><a href="/category/vivado.html">vivado</a></li>
</div>
</ul>
<h2><br/>BLOGROLLS</h2>
<ul>
<li><a href="http://getpelican.com/">Pelican</a></li>
<li><a href="http://python.org/">Python.org</a></li>
<li><a href="http://jinja.pocoo.org/">Jinja2</a></li>
</ul>
<p>
<span>
<a href="http://github.com/daxionga/" target="_blank">
<img class="social-icons-m" src="/theme/images/icons/github.png">
</a>
</span>
</p>
<p>
<a href="/feeds/all.atom.xml" rel="alternate">
<img class="social-icons-m" src="/theme/images/icons/rss.png"></a>
</p>
<p>
</p>
</sidebar>
<maincontent>
<h2>
<a href="/verilog传奇第一章前半部分.html" rel="bookmark" title="Permalink to Verilog传奇第一章前半部分">Verilog传奇第一章前半部分</a>
</h2>
<div>
<b>By: </b><a href="/author/rcjiang.html">rcjiang</a><b> On: </b>日 17 十一月 2019<br />
<b>In: </b><a href="/category/verilogchuan-qi.html" rel="bookmark" title="Permalink to Verilog传奇">Verilog传奇</a><br />
<em><b>Tags: </b>
<span><a href="/tag/verilog.html">#verilog </a></span>
<span><a href="/tag/du-shu-bi-ji.html">#读书笔记 </a></span>
</em>
<hr>
</div>
<div>
<mainarticle>
<h3>verilog的历史</h3>
<p>  首先来说,电子工程师直接设计电路芯片的方式不是一开始就有的,这是由于工程的慢慢变大而现成的集成电路无法满足对于项目要求的时间以及功耗问题,所以才有了,ASIC以及FPGA的出现,verilog又是在ASIC和FPGA的出现后慢慢演变过来的,开始的时候大家都用VHDL,当然VHDL据说没有verilog这么灵活可以写仿真代码,又可以设计电路,但是我又不会VHDL所以据听说是这样我也没法考证。而verilog当时主要的作用就是测试,因为他是高级语言,据说是根据C语言改的,所以当时没有什么方法可以将它转化为电路,直到1987年,有个公司给verilog写了个综合工具,verilog变得可以综合了,也就可以组成电路了,于是便被广大ASIC、FPGA厂商采用,就出现了今天的这个局面。<br>
  然而,正是由于verilog是从仿真过度而来的,verilog有很多不可综合的关键字用于测试仿真,这对于初学者而言,往往分不清到底什么是可综合的。纵观verilog语言其实和C语言十分相像,有一个top_module类似于C语言的main,当然verilog的top_module的名字可以随便起,然后top_module可以调用别的子module,但不同的是verilog里的变量需要根据时序来改变数据,这个问题包括=与<=的区别,还有各module之间的组合问题,这些会在接下来以后的blog中慢慢讲解。而对于verilog的测试仿真功能,基本就是Initial和一些$*语句的使用,这些在以后也会详细的介绍。<br>
  verilog虽然取自于C但是实际上的表达的功能已经和C语言大相径庭了,所以在写代码上,初学者一般会出现下面的情况。 </p>
<blockquote>
<p>  *Verilog写完不能综合。这是由于新手对于综合的关键字并不熟悉造成的,一些大佬verilog的关键字也就用了不到1/3,这话不是我说的,是写书的那个作者写的。所以其实没必要把所有关键字都用一遍,只需要用常用的就好,就像C语言后来出了个柔性数组,也没见谁在程序里用它了。(也可能我见的太少了) </p>
<p>  综合器总报警告。这在某些情况下是正常现象,因为有些电路人想得明白但是检错程序里却认为这是个问题,如果你对这个电路熟悉,就不会有问题,要随时去巩固数电才行。 </p>
<p>  资源不够用。这是因为写的太像C语言了,而实际上,一个电路里不可能有那么多像C程序里暂时没用到的变量。 </p>
<p>  时序有问题。这个就需要多练习了。要多像电路一样思考才能对时序有深刻的理解。</p>
<p>  直接下到板子里看程序的对错。这个一般是搞单片机的人容易犯的错误,但是如果项目变得非常大,下到板子里,根本就看不出什么问题了,因为板子可以观察的数据很有限,所以应该先仿真没问题了再下到板子里。 </p>
<p>  还有就是愿意用循环。在verilog中只有C语言的for循环被保留了下来,其他的都不可综合,但是verilog的for循环每次循环都会生成一次变量,for在这本书里是提醒慎用的 </p>
</blockquote>
<p>综上所述,verilog的学习需要多了解数电,多像电路一样去思考。 </p>
<h3>ASIC的设计</h3>
<p>  值得注意的是ASIC的设计和软件一样也分前端与后端,前端负责设计具体的逻辑,以生成网表(就类似PCB设计中的画原理图)为最终目的,而后端负责由生成的网表,选mos管、布局布线(类似画PCB图)。 </p>
<h3>FPGA的设计</h3>
<p>  FPGA的设计是前后端一起干了,但是也会存在延时导致的竞争冒险问题,这个就需要仿真的帮助。</p>
<blockquote>
<p>逻辑仿真->综合后仿真->实现后仿真 </p>
</blockquote>
<p>这些一步一步接近现实的有延时的情况,最后都弄好了,才可以下到板子里看看还有没有什么问题。<br>
  实际上这本书上说,ASIC的设计要比FPGA难很多,因为FPGA厂家已经对芯片进行了很大程度的设计。</p>
</mainarticle>
</div>
<hr>
<div>
<i>If you found the article helpful, please share or cite the article, and spread the word:</i>
<p style="margin-top: 2%;">
<span><a target="_blank" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;" title="Twitter" href="https://twitter.com/share?url=/verilog传奇第一章前半部分.html&text=Verilog传奇第一章前半部分&via="><img class="social-icons-a" src="/theme/images/icons/twitter.png"></a></span>
<span><a target="_blank" title="Facebook" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700');return false;" href="https://www.facebook.com/sharer.php?u=/verilog传奇第一章前半部分.html&t=Verilog传奇第一章前半部分"><img class="social-icons-a" src="/theme/images/icons/facebook.png"></a></span>
<a target="_blank" title="Linkedin" href="https://www.linkedin.com/shareArticle?mini=true&url=/verilog传奇第一章前半部分.html&title=Verilog传奇第一章前半部分" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;"><img class="social-icons-a" src="/theme/images/icons/linkedin.png"></a>
</p>
</div>
<hr>
<p><i>For any feedback or corrections, please write in to: </i><b> rcjiang </b></p>
</maincontent>
<!-- Analytics -->
</div>
</body>
</html>