简体   繁体   English

verilog modelsim fpga

[英]verilog modelsim fpga

Sorry for Newbish question.对不起,新手问题。

I am trying to learn about FPGA programming.我正在尝试了解 FPGA 编程。

Before I spend $1K on a FPGA board:在我在 FPGA 板上花费 1000 美元之前:

if I just want to learn Verilog, can I run it entirely in Modelsim?如果我只想学习 Verilog,我可以完全在 Modelsim 中运行它吗? (I realize there are some timing issues that only show up in actual chips; but for learning syntax / style of coding / ...)_ (我意识到有一些时间问题只出现在实际芯片中;但是为了学习语法/编码风格/...)_

Thanks!谢谢!

You can of course!你当然可以!

However, there are a few things that a simulator will let you away with that the FPGA compiler will not.然而,有一些事情是模拟器会让你摆脱的,而 FPGA 编译器则不会。 Have a $FAVOURITE_SEARCH_ENGINE around for keywords like verilog coding styles synthesis .有一个 $FAVOURITE_SEARCH_ENGINE 周围的关键字,如verilog coding styles synthesis

See Resources for learning Verilog for some info on the differences between HDL programming and computer programming.有关 HDL 编程和计算机编程之间差异的一些信息,请参阅学习 Verilog 的资源

You most definitely don't need to splashout on a dev board if you are happy with just learning the language and simulating the results.如果您对学习语言和模拟结果感到满意,您绝对不需要在开发板上大肆宣传。

You can get the free Xilinx ISE Webpack which includes a basic version of ModelSim.您可以获得免费的Xilinx ISE Webpack ,其中包含 ModelSim 的基本版本。

As you have mentioned simulation and testbenching is one aspect of FPGA design.正如您所提到的,仿真和测试平台是 FPGA 设计的一个方面。 Actually getting a design to work on real hardware is usually the more challenging part.实际上,让设计在真实硬件上工作通常是更具挑战性的部分。 However, just using software you can learn the language, get to grips with simulation and even synthesize your design to make sure it will meet timing and fit on a target device.但是,只需使用软件,您就可以学习语言、掌握仿真,甚至可以综合您的设计,以确保它符合时序要求并适合目标设备。

I would also suggest that $1K for your first dev board is quite high.我还建议您的第一个开发板 1000 美元相当高。 I would start with something like the low-cost Xilinx Spartan-6 board , which is a tad under $300.我会从低成本的 Xilinx Spartan-6 板开始,它的价格不到 300 美元。 You'll get a device with a decent amount of logic, memory and DSP slices for that.为此,您将获得具有相当数量的逻辑、内存和 DSP 切片的设备。

If you're trying to learn Verilog there's no need to actually get an FPGA board (though, you can get FPGA development boards for much less than $1000 - you can get Xilinx's kit for $100).如果您正在尝试学习 Verilog,则无需实际购买 FPGA 板(不过,您可以获得远低于 1000 美元的 FPGA 开发板 - 您可以以 100 美元的价格购买 Xilinx 的套件)。 You can and should first learn Verilog using a simulator, though if you don't want to spend anything I'd suggest Icarus Verilog which is free (Open Source).您可以并且应该首先使用模拟器学习 Verilog,但如果您不想花任何钱,我建议您使用免费(开源)的Icarus Verilog

We had a hardware systems course in which some FPGA programming was done using VHDL.我们有一个硬件系统课程,其中一些 FPGA 编程是使用 VHDL 完成的。 I downloaded ModelSim-Altera Software ( starter edition available here)我下载了 ModelSim-Altera 软件(此处提供入门版

We had FPGA boards in our lab, so it was easy to actually see your model behave.我们的实验室中有 FPGA 板,因此很容易实际看到您的模型的行为。 In your case, I would suggest:在你的情况下,我建议:

  1. Start modeling basic circuits like adder, decoders etc. In ModelSim you can also create and configure(characteristics like frequency of different signals) a test bench to verify (using timing diagrams) your model.开始对加法器、解码器等基本电路进行建模。在 ModelSim 中,您还可以创建和配置(不同信号的频率等特征)测试平台来验证(使用时序图)您的模型。

  2. Once you are confident with the syntax and modeling, you can look for a lab around you which will allow you to get your hands dirty.一旦您对语法和建模充满信心,您就可以在您周围寻找一个可以让您亲自动手的实验室。

I hope this helps.我希望这有帮助。

cheers干杯

As others have noted, a simulator will get you a long way.正如其他人所指出的,模拟器会让你走得很远。 There's nothing quite like flashing some real LEDs on and off though - wiggly waveforms on a screen just aren't the same :)没有什么比打开和关闭一些真正的 LED 更像的了 - 屏幕上摆动的波形是不一样的 :)

Many of the starter kits have VGA outputs so you can display your own pictures, which is always gratifying (I've found anyway!) $1000 is a lot to spend, try this Xilinx starter kit for $189 (which does have VGA), or this Altera starter kit (which doesn't).许多入门套件都有 VGA 输出,因此您可以显示自己的图片,这总是令人欣慰的(反正我已经找到了!) 1000 美元花很多钱,试试这个 189 美元的Xilinx 入门套件(它有 VGA),或者这个Altera 入门套件(没有)。

Everyone above is right.楼上大家说的都对。 However there is a synthesizable subset of Verilog and VDHL that can be used for actual hardware.然而,有一个 Verilog 和 VDHL 的可综合子集可用于实际硬件。 For example $display can't be used.例如 $display 不能使用。 Recursion may be supported in some tools, as @Chiggs pointed out below.正如@Chiggs 在下面指出的那样,某些工具可能支持递归。 Keep that in mind when writing your code if it will ever be used in a chip.如果将在芯片中使用代码,请在编写代码时记住这一点。 However the full language can be used in test benches.然而,完整的语言可以在测试平台中使用。

No one mentioned www.edaplayground.com to learn SystemVerilog and/or VHDL.没有人提到www.edaplayground.com来学习 SystemVerilog 和/或 VHDL。 100% free versions of the industry standard tools for simulation from the major vendors.来自主要供应商的用于仿真的行业标准工具的 100% 免费版本。 Runs in the cloud.在云端运行。 Nothing to download.没什么可下载的。 Need email to register.需要邮箱注册。 Don't put your employers code up there;不要把你的雇主代码放在那里; its on someone else's computer.它在别人的电脑上。 There are example designs on the edaplaygroud site itself. edaplaygroud 网站上有示例设计。 Other sites have code examples that run on edaplayground, so you can run their code examples as a learning lesson by clicking one button.其他站点有在 edaplayground 上运行的代码示例,因此您可以通过单击一个按钮来运行他们的代码示例作为学习课程。 A list of verilog examples here: https://verificationguide.com/verilog-examples/这里的 verilog 示例列表: https : //verificationguide.com/verilog-examples/

As others have stated there are aspects of FPGA & ASIC design that you will not learn in the simulation flow, specifically those related physical implementation but you can learn a lot from this approach, and it is very low cost (they want your email).正如其他人所说,FPGA 和 ASIC 设计的某些方面你不会在仿真流程中学到,特别是那些相关的物理实现,但你可以从这种方法中学到很多东西,而且成本非常低(他们想要你的电子邮件)。

That being said edaplaygroud also has a synthesis tool.也就是说 edaplaygroud 也有一个综合工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM