English 中文(简体)
verilog modelsim fpga
原标题:

Sorry for Newbish question.

I am trying to learn about FPGA programming.

Before I spend $1K on a FPGA board:

if I just want to learn Verilog, can I run it entirely in 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. Have a $FAVOURITE_SEARCH_ENGINE around for keywords like verilog coding styles synthesis.

See Resources for learning Verilog for some info on the differences between HDL programming and computer programming.

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.

As you have mentioned simulation and testbenching is one aspect of FPGA design. 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. I would start with something like the low-cost Xilinx Spartan-6 board, which is a tad under $300. You ll get a device with a decent amount of logic, memory and DSP slices for that.

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). 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).

We had a hardware systems course in which some FPGA programming was done using VHDL. I downloaded ModelSim-Altera Software (starter edition available here)

We had FPGA boards in our lab, so it was easy to actually see your model behave. 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.

  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 :)

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).

Everyone above is right. However there is a synthesizable subset of Verilog and VDHL that can be used for actual hardware. For example $display can t be used. Recursion may be supported in some tools, as @Chiggs pointed out below. 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. 100% free versions of the industry standard tools for simulation from the major vendors. 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. Other sites have code examples that run on edaplayground, so you can run their code examples as a learning lesson by clicking one button. A list of verilog examples here: 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).

That being said edaplaygroud also has a synthesis tool.





相关问题
How to NOT use while() loops in verilog (for synthesis)?

I ve gotten in the habit of developing a lot testbenches and use for() and while() loops for testing purpose. Thats fine. The problem is that I ve taken this habit over to coding for circuits which ...

Displaying the Verilog parameter name

I am using the parameter keyword to define a state, i.e., RESET = 5 b00000. If I want to use $display to print out the state name instead of the binary representation, or display the state name in my ...

verilog modelsim fpga

Sorry for Newbish question. I am trying to learn about FPGA programming. Before I spend $1K on a FPGA board: if I just want to learn Verilog, can I run it entirely in Modelsim? (I realize there are ...

Assigning wires deep in a nested set of modules

I have a wire that is about 4 levels deep and I really don t want the hassle of having to propagate it up the hierarchy. Is there any way to assign the wire using some sort of referencing? I know I ...

schematic for verilog code that adds three inputs

What does the schematic looks like for the following verilog code? module mystery2(s, c, x, y, z); input x, y, z; output s, c; assign {c, s} = x + y + z; endmodule I know that {c, s} means ...

wire equation in verilog [closed]

If say I have the following wire set-ups, is the wire assignment all valid? wire[3:1] w; wire w1; wire [1:0] w2; A) w1 = w[2]; B) w2 = w[1:0]; C) w2 = w[1:2]; I am guessing that everything is ...

How to wire two modules in Verilog?

I have written two modules DLatch and RSLatch and i want to write verilog code to join those two.

热门标签