模拟Sim入门(Getting started with Model Sim)

编程入门 行业动态 更新时间:2024-10-25 07:27:46
模拟Sim入门(Getting started with Model Sim)

我正在尝试在ModelSim PE Student Edition 10.4a模拟一个简单的组合电路。 但每次,当我尝试通过从库面板加载设计来模拟电路时。 我收到此错误消息

#加载设计时出错

虽然编译没有显示任何错误。

这是我正在使用的代码

module smpl_circuit(A,B,C,x,y); input A,B,C; output x,y; wire e; and g1(e,A,B); not g2(y,C); or g3(x,e,y); endmodule

甚至没有这个代码。 哪个代码我尝试,我收到相同的错误消息。

I'm trying to simulate a simple Combinatorial Circuit in ModelSim PE Student Edition 10.4a. But each time, when I try to Simulate the circuit by loading the design from Library Panel. I'm getting this error message

# Error loading design

Although compilation does not show any error.

Here's the code I'm using

module smpl_circuit(A,B,C,x,y); input A,B,C; output x,y; wire e; and g1(e,A,B); not g2(y,C); or g3(x,e,y); endmodule

Not even this code. Which ever code I try, I'm getting the same error message.

最满意答案

加载设计时出错通常发生在Model Sim无法找到您的文件时。 在Model Sim中成功设置项目并不是那么明显,因此请确保在创建文件时按照以下步骤操作:

文件 - > 创建项目 - > 创建新文件 输入您的文件名并选择您的文件类型(在本例中为Verilog)。 将您的代码复制粘贴到这个新生成的文件中。 转到项目选项卡 (它现在应位于屏幕左侧)。 右键单击您的文件。 按Compile - > Compile Selected 。 这应该会在选项卡的“状态”列下显示绿色复选标记。 现在转到库选项卡 。 展开“工作”目录。 右键单击您的文件,然后按“ 模拟”

这应该使您的项目正常工作。

PS 此视频整齐地显示了这个过程。

Error loading design usually happens when Model Sim can't find your file. Setting up a project in Model Sim successfully isn't as obvious as it should, so make sure you follow these steps when creating a file:

Press File -> Create Project -> Create New File Input your file name and select your file type (Verilog, in this case). Copy paste your code in this newly generated file. Go to the project tab (it should be on the left of your screen now). Right click your file. Press Compile -> Compile Selected. This should make a green check mark appear under the "status" column in the tab. Now go to the library tab. Expand the "work" directory. Right click on your file and press Simulate.

This should make your project work correctly.

P.S. This video shows the process neatly.

更多推荐

本文发布于:2023-08-03 01:10:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1382493.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:入门   Sim   Model   started

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!