update dependency, move pics from tencent cloud to local repo
This commit is contained in:
@@ -49,7 +49,7 @@ description: Verilog 语言可以用多种方式来描述硬件,同时,使
|
||||
|
||||
<a id="fig.3-1"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
[图 3-1](#fig.3-1) 中的电路模型可以用如下的语句来描述:
|
||||
|
||||
@@ -85,7 +85,7 @@ assign #1 A_xor_wire = eq0 ^ eq1;
|
||||
|
||||
<a id="fig.3-2"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
在[图 3-2](#fig.3-2) 中,用两个半加器和一个或门组成一个全加器,这里将使用连续赋值语句描述这个电路。代码如下。
|
||||
|
||||
@@ -226,7 +226,7 @@ endmodule
|
||||
|
||||
<a id="fig.3-3"></a>
|
||||
|
||||
{width=700px}
|
||||
{width=700px}
|
||||
|
||||
同样,可以使用 `wand` 线网类型来将不同的输出“线与”在一起,如下:
|
||||
|
||||
@@ -248,7 +248,7 @@ endmodule
|
||||
|
||||
<a id="fig.3-4"></a>
|
||||
|
||||
{width=700px}
|
||||
{width=700px}
|
||||
|
||||
### 2.4.3. 三态总线功能
|
||||
|
||||
@@ -272,7 +272,7 @@ endmodule
|
||||
|
||||
<a id="fig.3-5"></a>
|
||||
|
||||
{width=700px}
|
||||
{width=700px}
|
||||
|
||||
# 3. 行为描述<a id="toc.3"><a>
|
||||
|
||||
@@ -362,7 +362,7 @@ end
|
||||
|
||||
<a id="fig.3-6"></a>
|
||||
|
||||
{width=600px}
|
||||
{width=600px}
|
||||
|
||||
要实现[图 3-6](#fig.3-6) 中这样一个 D 触发器,通常用以下代码:
|
||||
|
||||
@@ -510,7 +510,7 @@ end
|
||||
|
||||
<a id="fig.3-7"></a>
|
||||
|
||||
{width=700px}
|
||||
{width=700px}
|
||||
|
||||
在以上代码仿真时,正是利用了阻塞赋值的这一特点才模拟了该组合逻辑的行为。
|
||||
|
||||
@@ -579,7 +579,7 @@ end
|
||||
|
||||
<a id="fig.3-8"></a>
|
||||
|
||||
{width=600px}
|
||||
{width=600px}
|
||||
|
||||
正是利用了语句之间的非阻塞性,才实现了这个 3 级流水线的逻辑功能。
|
||||
|
||||
@@ -656,7 +656,7 @@ end
|
||||
|
||||
<a id="fig.3-9"></a>
|
||||
|
||||
{width=500px}
|
||||
{width=500px}
|
||||
|
||||
### 3.3.2. 并行语句组 `fork ... join`
|
||||
|
||||
@@ -676,7 +676,7 @@ join
|
||||
|
||||
<a id="fig.3-10"></a>
|
||||
|
||||
{width=500px}
|
||||
{width=500px}
|
||||
|
||||
### 3.3.3. 语句组的标识符
|
||||
|
||||
@@ -736,7 +736,7 @@ end
|
||||
|
||||
<a id="fig.3-11"></a>
|
||||
|
||||
{width=600px}
|
||||
{width=600px}
|
||||
|
||||
在 `if ... else` 语句中,条件是从上到下逐条检查的。因此,当满足一个条件时,就执行其后的语句,跳过 `else` 后面的语句、当所有条件都不满足,便执行最后一条 `else` 后面的语句。因此 `if ... else` 语句实际上是有优先级顺序的。
|
||||
|
||||
@@ -763,7 +763,7 @@ end
|
||||
|
||||
<a id="fig.3-12"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
{% note warning %}
|
||||
|
||||
@@ -790,7 +790,7 @@ end
|
||||
|
||||
<a id="fig.3-13"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
然而,在描述时序逻辑时,通常将利用 `if` 语句的隐式条件对带时钟使能的 D 触发器建模。代码如下:
|
||||
|
||||
@@ -807,7 +807,7 @@ end
|
||||
|
||||
<a id="fig.3-14"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
其中,`en` 信号时 D 触发器的时钟使能端,`rst_n` 是 D 触发器的异步清零信号。
|
||||
|
||||
@@ -1004,7 +1004,7 @@ endmodule
|
||||
|
||||
<a id="fig.3-15"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
以上内容提到了实例化基本门和其他模块。
|
||||
|
||||
@@ -1032,7 +1032,7 @@ endmodule
|
||||
|
||||
<a id="fig.3-16"></a>
|
||||
|
||||
{width=800px}
|
||||
{width=800px}
|
||||
|
||||
下面举例说明模块内部和外部的端口:
|
||||
|
||||
@@ -1270,7 +1270,7 @@ Verilog 语言作为一种用户工具,提供给用户许多描述硬件的手
|
||||
|
||||
<a id="fig.3-17"></a>
|
||||
|
||||
{width=600px}
|
||||
{width=600px}
|
||||
|
||||
下面简单介绍几种不同角色的工作特点,以及它们所处的设计层次:
|
||||
|
||||
@@ -1288,7 +1288,7 @@ Verilog 语言作为一种用户工具,提供给用户许多描述硬件的手
|
||||
|
||||
<a id="fig.3-18"></a>
|
||||
|
||||
{width=500px}
|
||||
{width=500px}
|
||||
|
||||
上图中只有两个状态,当在左边的状态时,`REQ` 输出 1;当在右边的状态时,`REQ` 输出 0。`ACK` 是状态机的输入信号,决定了状态的跳转。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user