⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00864.html

📁 这是一本关于verilog编程语言的教程,对学习verilog语言有帮助
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>第十八章 层次</title>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('systemverilog31a.html', 'topic', '00864.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->
<div class="Element801" id="popup00371">
<div class="Element800">
<div class="Element14">
链接</div>
<div class="Element11">
<div class="Element10">
<a href="00953.html" target="topic">主题</a></div>
</div>
</div>
</div>

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="33%">
<div class="Element1">
<a href="#" onmousedown="showPopup(this, 'popup00371');"><img src="seealsolink.png" border="0" alt="" title=""></a> SystemVerilog 3.1a语言参考手册</div>
</td><td width="34%">
<div class="Element2">
</div>
</td><td width="33%">
<div class="Element90">
<a href="00166.html" target="topic"><img src="btn_prev_lightblue.gif" border="0" alt="Previous" title="Previous" onmouseover="switchImage(this, 'btn_prev_lightblue_hover.gif');" onmouseout="switchImage(this, 'btn_prev_lightblue.gif');"></a><img src="btn_up_d.gif" border="0" alt="Up" title="Up"><a href="00188.html" target="topic"><img src="btn_next_lightblue.gif" border="0" alt="Next" title="Next" onmouseover="switchImage(this, 'btn_next_lightblue_hover.gif');" onmouseout="switchImage(this, 'btn_next_lightblue.gif');"></a></div>
</td></tr></table><div class="Element5">
第十八章 层次</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<div class="Element58">
<a name="主题"></a><div class="Element14">
<a onclick="toggleVisibilityStored('主题');" class="a_Element14"><img src="sectionminus.png" border="0" alt="" title="" id="img主题">主题</a></div>
<div id="div主题">
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="50%">
<div class="Element201">
主题&nbsp;</div></td><td class="Element204" valign="top" width="50%">
<div class="Element205">
描述&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00188.html" target="topic">18.1 简介(一般信息)</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
Verilog的组织结构较为简单。除系统任务和系统函数外,所有的数据、函数和任务都位于模块当中(系统任务和系统函数是全局的,并且可以在PLI中定义)。Verilog模块可以包含其它模块的实例。任何未被实例化的模块都位于顶层。这个规则不适用于库,因此库具有不同的状态和不同的过程来进行分析。一个层次名可以在实例层次的任何地方指定任何命名的对象。模块层次通常很随意,需要耗费很多精力来维护端口列表。<br><br>在Verilog中,只有线网、<span style="color: #0000FF">reg</span>、<span style="color: #0000FF">integer</span>和时间数据类型才可以通过模块端口传递。<br><br>为了表示设计层次,SystemVerilog加入了许多增强:
<ul class="Element632">
<li class="Element602">包含诸如数据、类型、类、任务和函数声明的包</li>
<li class="Element602">支持分离的编译</li>
<li class="Element602">仅在编译单元内可见的编译单元范围</li>
<li class="Element602">使用嵌套的模块声明来帮助表示自包含的模块和库</li>
<li class="Element602">在端口声明中可以使用较宽松的规则</li>
<li class="Element602">使用“<span style="color: #800080">.</span>name”来简化命名端口的连接</li>
<li class="Element602">使用“<span style="color: #800080">.</span>”的隐式端口连接</li>
<li class="Element602">与模块绑定的时间单位和时间精度说明</li>
<li class="Element602">使用接口的概念来封装模块间的连接(在<a href="00866.html" target="topic">第十九章</a>中提供)</li>
</ul>SystemVerilog的一个重要增强就是加入了通过模块端口传递任何数据类型的能力,包括线网、以及包括实数、数组和结构体在内的所有变量类型。&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00203.html" target="topic">18.2 包</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
SystemVerilog包提供了额外的机制在多个SystemVerilog模块、接口和程序间共享参数、数据、类型、任务、函数、序列以及特性的声明。包是显式命名的作用域,它出现在源文本的最外层(与顶层模块和原语处于同一层次)。类型、变量、任务、函数以及特性都可以在一个包中声明。这些声明可以在模块、宏模块、接口、程序和其它包中通过导入或完整解析的名字来引用。 &nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00206.html" target="topic">18.3 编译单元的支持</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
通过使用编译单元,SystemVerilog支持分离的编译。SystemVerilog提供了下列的术语和定义:
<ul class="Element632">
<li class="Element602">编译单元:a collection of one or more SystemVerilog source files compiled together</li>
<li class="Element602">编译单元作用域:a scope that is local to the compilation unit. It contains all declarations that lie outside of any other scope</li>
<li class="Element602"><span style="color: #0000FF">$unit</span>:用来显式地访问编译单元作用域中的标识符的名字</li>
</ul>The exact mechanism for defining which files constitute a compilation unit is tool specific. Tools shall provide a mechanism to specify the files that make up a compilation unit. Two extreme cases are:
<ol class="Element632">
<li value="1" class="Element602">All files make a single compilation unit (in which case the declarations in the compilation-unit scope are accessible anywhere within the design)</li>
<li value="2" class="Element602">Each file is a separate compilation unit (in which case the... <a href="00206.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00207.html" target="topic">18.4 顶层实例</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
The name $root is added to unambiguously refer to a top level instance, or to an instance path starting from the root of the instantiation tree. $root is the root of the instantiation tree.<br><br>For example: &nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -