verilog 中begin 和end 的详细用法

verilog 中begin 和end 的详细用法,第1张

1、首先,在项目上右键,点击New Source创建新的代码文件。

2、选择User Document创建自定义的文本文件,文件名和后缀随意。

3、创建好后,在下方切换到Files面板,双击打开该文件,按照自己喜欢的形式输入数据。

4、数据文件写好后,在项目上右键,点击New Source,接着选择Verilog Test Fixture,输入文件名并继续,选择待测模块,接着创建文件。

5、双击打开该文件,看到待测试模块输入对应了一些reg寄存器类型,输出部分对应了一些wire类型。添加两个parameter常量,接着添加计数变量J用于for循环,添加一个向量数组用于存放文件读取的数据。

6、如图是程序自动生成的实例化和连接待测模块的代码,在下面的initial begin ... end之间编写测试代码就可以了。

<!doctype html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=1024" />

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9" />

<title>动态背景演示</title>

<link type="text/css" rel="stylesheet" href="https://sqimg.qq.com/qq_product_operations/im/https_src/css/pc_6_0.css" />

</head>

<body id="page0">

<div class="opbg"></div>

<div id="container" class="mpage">

<div id="anitOut" class="anitOut"></div>

</div>

<!--这里添加你自己的内容-->

<script src="https://sqimg.qq.com/qq_product_operations/jslib/jquery-1.9.1.min.js"></script>

<script type="text/javascript" src="https://sqimg.qq.com/qq_product_operations/im/https_src/js/pc7.js"></script>

</body>

</html>

楼主可直接复制上面的代码另存为HTML,可看效果,请采纳。

可以吧这两个form嵌入到panel上啊,panel放在tabcontrol上。

下面是把form显示到panel上方法,至于panel放在tab上就不说了:

procedure PnlShowForm(ShowForm:TFormClass)

procedure PnlShowClear

procedure

TFrmMain.PnlShowForm(ShowForm:TFormClass)

var

MyForm:TForm

begin

PnlShowClear

MyForm:=ShowForm.Create(Application)

MyForm.Parent:=PnlShow

MyForm.Left:=0

MyForm.Top:=0

MyForm.Show

end

procedure TFrmMain.PnlShowClear

var

i:Integer

begin

for i:=0 to PnlShow.ControlCount - 1 do

begin

if PnlShow.Controls[i] is TForm

then

PnlShow.Controls[i].Free

end

end

备注:子窗口formstyle属性要设为fsNormal,设为其他值子窗口显示在父窗口中,而不在panel内,和panel分离.


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11375431.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-15
下一篇2023-05-15

发表评论

登录后才能评论

评论列表(0条)

    保存