Author Topic: Online FPGA simulator?  (Read 18677 times)

0 Members and 1 Guest are viewing this topic.

Offline DmeadsTopic starter

  • Regular Contributor
  • *
  • Posts: 171
  • Country: us
  • who needs deep learning when you have 555 timers
Online FPGA simulator?
« on: February 12, 2019, 05:06:14 am »
Hello everyone! This is my first post!

I'm a 2nd year EE.

I am fascinated by FPGA, but I really don't have a lot of money to spend on a board.

I have seen things like arduino simulators online in autodesk products and things like that.

Just wondering if there are any online simulation options to save me some money, or should I just save up for a board.

Also could you please point me in the direction in some good getting started in FPGA tutorials please?

Thanks!
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Online FPGA simulator?
« Reply #1 on: February 12, 2019, 05:30:38 am »
How low is your budget? One of my favorite FPGA boards costs only about $13 + another $3 or so for the programming cable. The Cyclone II is an old part but it's still big enough to fit an entire 8 bit computer running BASIC in it and another advantage is projects compile much quicker than for bigger newer parts.

If you really want to just simulate VHDL or Verilog, all the FPGA development packages have a simulator.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11905
  • Country: us
    • Personal site
Re: Online FPGA simulator?
« Reply #2 on: February 12, 2019, 05:32:45 am »
Why do you need online simulators? Download tools from manufacturers. They all have simulators.

There are plenty of free and open simulators too.

Simulators for FPGAs are a very common thing. And using simulators is a good first step in any FPGA development anyway.
Alex
 

Online KE5FX

  • Super Contributor
  • ***
  • Posts: 2096
  • Country: us
    • KE5FX.COM
Re: Online FPGA simulator?
« Reply #3 on: February 12, 2019, 07:31:51 am »
Not exactly an "FPGA (board) simulator" but EDA Playground is an extremely valuable resource for accessing, evaluating, and learning about various HDL-related tools, IMO.  It is well worth signing up for an account and I don't say that about many sites.  :-+
 
The following users thanked this post: ebclr, spudboy488

Offline jackthomson41

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
Re: Online FPGA simulator?
« Reply #4 on: February 12, 2019, 07:53:31 am »
I think you should buy the cheapest FPGa board, available online. Simulator is a good start but I have many experiences where everything works pretty good on simulator but when I run it on actual hardware, it creates much trouble. So, go with the actual board, my suggestion. You can also try ESP8266, check ESP8266 Pinout first before working on it.
« Last Edit: February 28, 2021, 10:19:42 pm by jackthomson41 »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11905
  • Country: us
    • Personal site
Re: Online FPGA simulator?
« Reply #5 on: February 12, 2019, 07:57:10 am »
Post place-and-route simulation is very accurate to the actual hardware. But it is slow.

Behavioral simulation is fast, but does not reproduce the non-ideal behavior of the actual hardware (like propagation delays).
Alex
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Online FPGA simulator?
« Reply #6 on: February 12, 2019, 08:43:18 am »
I like having the actual board because for some reason it's a lot more fun, generally a simulation should be very accurate though. Where it gets difficult is trying to unit test modules that depend on complex external stimuli.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Online FPGA simulator?
« Reply #7 on: February 12, 2019, 03:55:14 pm »
https://www.fpga4fun.com/

When you look at boards to buy, you need to consider what is on the board.  I like lots of switches, LEDs, buttons and 7-segment displays.  I also want as many offboard connections as possible and I prefer with 50 pin headers over the 6 or 12 pin PMOD connections.  OTOH, in the Digilent world, there are a lot of interesting gadgets that connect to the PMOD headers.

I know it is over the top in price but I really like this type of board:

https://store.digilentinc.com/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum/

I can get a lot of diagnostic information from the LEDs and displays and I can select what I see with the switches.  I can also use a pushbutton for single-stepping.

A very common board might be something like the Arty

https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists/

I have a couple of them and they are very useful but in many ways it's like working in the dark.  Either that or I have to gin up some kind of display/switches/pushbutton arrangement and hang it off the edge.  Digilent has some gadgets that help with this but there is no way that Arty will ever be the board the Nexys board is.

Education has never been free and it won't be for FPGAs either.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5050
  • Country: si
Re: Online FPGA simulator?
« Reply #8 on: February 12, 2019, 04:16:20 pm »
Best simulators tend to be the ones included with your FPGA tools.

Main reason is that as soon as you use any chip specific functionality (Even as simple as memory blocks) you will need a simulation model for that block to be able to simulate a design that uses it. The manufacturers don't give out models for the on chip functionality in plain HDL source code so you can't just stick the code into any simulator out there. But they do have precompiled binary blobs of there modules for the specific simulator they support and the simulator is aware of them so it just magically works.

FPGAs are not like C where the same piece of code easily recompiles for any architecture that a C compiler exists for. The majority of HDL code you find in the real world is very vendor specific and will not port easily to any other compiler/IDE. Yes the actual HDL code is universal and portable, but real world projects with FPGAs always use some of the chip specific hardware because it makes for huge performance gains(memory blocks, hardware multiplier blocks, serdes blocks, memory controllers etc)

You can learn a HDL language really well in 1 week if you put yourself to it. Actually learning how to implement a large project and getting it to compile and run on a real FPGA is much harder as knowing a HDL language is only a small part of it. The other parts are knowing your way around the development tools, knowing how to properly simulate things, understanding timing closure, understanding the limitations and advantages of specific FPGA families, learning how to efficiently use the FPGA resources and in general a lot of computer science stuff in how to efficiently do various tasks in the digital world.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Online FPGA simulator?
« Reply #9 on: February 12, 2019, 05:20:23 pm »
.
« Last Edit: August 19, 2022, 02:14:12 pm by emece67 »
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Online FPGA simulator?
« Reply #10 on: February 12, 2019, 07:17:51 pm »
As I understand the FPGA design cycle, it is heavily based upon simulation, so it is a bad idea, IMHO, not to learn to use the simulator from the very begining.

In earlier times with Xilinx ISE, the simulator wasn't free.  The IDE was free, the synthesis and place/route tools were free but not the simulator.  As a result, I have never used the simulator.

Now the simulator is free in Vivado but I still don't use it.  I liken simulation to single stepping through pages of assembly code - a colossal waste of time.  Yes, it could be useful for small pieces of a project (perhaps observing the ALU or not, see below) but I'm not convinced it brings anything to the dance when the actual circuit fails about a million cycles into booting the OS.  And the OS is KNOWN to work...

The new Internal Logic Analyzer of Vivado, OTOH, can be quite handy because I can trigger it just before where I expect a problem.  Getting the constraints file correct can be a bit of a challenge but much of it is automated.

I can also arrange for an address breakpoint that will change the CPU mode from Run to Single Step and pause.  Now I can single step in the area where I expect to find a problem.

There are a lot of ways to debug projects, FPGAs or otherwise, and all have a place.  That's why I want a board with lots of LEDs and 7-segment displays.

A long time back I was messing with the design of an ALU for the PDP 11/45.  That thing is complicated!  So, I coded it up on an FPGA and I connected the inputs and outputs (data and flags) to a long shift register.  That allowed me to insert test vectors and grab the results.  I used another processor (Blackfin) to handle the data transfer while grabbing vectors from an NFS server.  And that's the way you test an ALU.  With a Raspberry Pi it might be even easier since it could handle the transfer and contain the files.  Handling the transfer on a typical Linux box seems daunting.

 

Online KE5FX

  • Super Contributor
  • ***
  • Posts: 2096
  • Country: us
    • KE5FX.COM
Re: Online FPGA simulator?
« Reply #11 on: February 12, 2019, 10:05:26 pm »
Hi,

Digilent has some breadboardable dev boards that, depending on budget, of course, may be affordable.

As others have said, use the simulator supplied with the vendor tool, otherwise, simulating vendor suplied cores will be not so easy.

As I understand the FPGA design cycle, it is heavily based upon simulation, so it is a bad idea, IMHO, not to learn to use the simulator from the very begining. Synchronous design and static time analysis ensure, to a high degree, that the real circuit will behave as the simulated one.

Unfortunately, the web if full of blatantly useless tutorials, courses & examples from experts that totally refuse to use simulators and disown the synchronous design.

Regards.

Wasting a lot of time with simulators and expecting it to improve your ability to get things done with FPGAs in real-world hardware projects is like wasting a lot of time alone with porn and expecting it to improve your sex life.

Buy a board, hook up a scope, and do some probing.  And yes, keep it synchronous.  8)
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11905
  • Country: us
    • Personal site
Re: Online FPGA simulator?
« Reply #12 on: February 12, 2019, 10:11:36 pm »
There are issues that can only be realistically debugged in a simulator. And keeping it synchronous is not always an option.

Simulators are useful tools and there is no financial penalty in trying it.
Alex
 
The following users thanked this post: Bassman59

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Online FPGA simulator?
« Reply #13 on: February 12, 2019, 10:37:24 pm »
.
« Last Edit: August 19, 2022, 02:14:27 pm by emece67 »
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2851
  • Country: us
Re: Online FPGA simulator?
« Reply #14 on: February 12, 2019, 10:45:06 pm »

Wasting a lot of time with simulators and expecting it to improve your ability to get things done with FPGAs in real-world hardware projects is like wasting a lot of time alone with porn and expecting it to improve your sex life.
Well, you can actually test a lot of things internal to a module of HDL code with a few minutes of writing a testbench and then simulating the sequence you think might not work as intended.  This can be MUCH faster than trying to instrument a physical board.  ChipScope (Xilinx in-FPGA logic analyzer) takes up a lot of room on small FPGAs and has limited record depth.  In really difficult cases, it can tell you what is going wrong between internal and external signals, but is a lot of hassle.  Guessing where the issues might turn up and then checking those by simulation can save a lot of hard work.
Quote
Buy a board, hook up a scope, and do some probing.  And yes, keep it synchronous.  8)
Really, trying to debug an FPGA in a more complex system with just a scope can be very frustrating.  And, of course, lacking synchronizers on inputs to the FPGA is something that will generally NOT be caught by simulation, but you need synchronizers on pretty much ALL inputs, so you should just check to make sure they are in the code.

Jon
 

Online KE5FX

  • Super Contributor
  • ***
  • Posts: 2096
  • Country: us
    • KE5FX.COM
Re: Online FPGA simulator?
« Reply #15 on: February 12, 2019, 10:59:01 pm »
Really, trying to debug an FPGA in a more complex system with just a scope can be very frustrating.

As opposed to simulating a USB controller, DDR SDRAM, and numerous complex proprietary peripherals for which you don't have models?

Simulation has its value in education, but you'll never convince me that it's a win in real-world complex designs.  The effort required to keep the simulation faithful to the peripheral hardware, including aspects that aren't documented, will generally be higher than the effort needed to debug the hardware itself. 

I have a big problem with people who stick their noses in the air and preach the virtues of simulation over getting one's hands dirty.  They generally have not shipped many FPGA products themselves, but they're happy to tell beginners how to do it.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Online FPGA simulator?
« Reply #16 on: February 12, 2019, 11:29:24 pm »
In earlier times with Xilinx ISE, the simulator wasn't free.  The IDE was free, the synthesis and place/route tools were free but not the simulator.  As a result, I have never used the simulator.

It's been free for a while, I've been doing FPGA development as a hobby for about 5 years and I've always had the simulator in ISE. I don't use it all that often because my projects are mostly small enough to just compile and debug but it's there and it works. I think if I were doing very large complex projects or things where timing was critical then I'd use the simulator a lot more.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Online FPGA simulator?
« Reply #17 on: February 12, 2019, 11:57:19 pm »
Really, trying to debug an FPGA in a more complex system with just a scope can be very frustrating.

As opposed to simulating a USB controller, DDR SDRAM, and numerous complex proprietary peripherals for which you don't have models?

OP do not have money to spend on FPGA board, not to mention multi-gigahertz scope :palm: It is unlikely that he owns ANY scope, yet you are pushing "hands dirty with scope" agenda. I would like to remind that simulator is what OP asked for. (You may want to check subject of this thread)
« Last Edit: February 13, 2019, 12:00:57 am by ogden »
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Online FPGA simulator?
« Reply #18 on: February 13, 2019, 12:40:05 am »
It's been free for a while, I've been doing FPGA development as a hobby for about 5 years and I've always had the simulator in ISE.

I started when I retired, about 15 years ago.  Modelsim was available but not free.  So I came up with a different plan.

There are lots of ways to do things.  Circumstances will often shorten the list of possibilities.
 

Online KE5FX

  • Super Contributor
  • ***
  • Posts: 2096
  • Country: us
    • KE5FX.COM
Re: Online FPGA simulator?
« Reply #19 on: February 13, 2019, 01:51:24 am »
OP do not have money to spend on FPGA board, not to mention multi-gigahertz scope :palm: It is unlikely that he owns ANY scope, yet you are pushing "hands dirty with scope" agenda. I would like to remind that simulator is what OP asked for. (You may want to check subject of this thread)

Yes, and if you'll notice, I recommended some free online simulation tools.  OP's use case falls into the category of "education," where simulation can be a valuable time saver and aid to understanding.
 
The following users thanked this post: ogden

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Online FPGA simulator?
« Reply #20 on: February 13, 2019, 01:55:47 am »
FPGA kits from china may go as low as $10.

If you want very cheap but yetadult FPGA, search for Cyclone II devices.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Online FPGA simulator?
« Reply #21 on: February 13, 2019, 02:09:37 am »
Here is a free simulator

http://ghdl.free.fr/

 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5050
  • Country: si
Re: Online FPGA simulator?
« Reply #22 on: February 13, 2019, 06:28:30 am »
Simulation is not that useful for simulating entire huge designs, it is for modules.

The simulation in HDL tends to be used more like unit tests in C++ programming. You just take one reasonably small self contained module of HDL code and write a test bench to exercise it. The modules being small makes it much easier to write a testbench for because the module doesn't have a massive number of complex states you have to exercise. If you are making a USB PHY you don't try to emulate an entire USB host to connect it to. You would just feed data trough it and then have the testbench decode that raw bits on the USB pins back out to compare if it matches. Other times you might use two of the modules under test to talk to each other. Like when i was working on a CAN controller i simply connected two of them together on a "virtual CAN network" so that i could watch them talk back and forth to each other on the bus rather than implementing a whole CAN device in my testbench for it to talk to.

Once all the modules are tested individually you can then stick them together and run it in a real FPGA to test it. If you find a problem with the interaction of two modules but after many hours of debugging still have no idea why it breaks, then you can go and stick those modules together in a simulator and exercise them to reproduce the problem and step trough the code to figure out why it happens.

Simulators are very useful for FPGA design, but they won't teach you anything more than VHDL/Verilog syntax and a bit of binary. It has to be stuck into a real FPGA chip at some point to experience the true challenges and pitfalls of FPGA design.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Online FPGA simulator?
« Reply #23 on: February 13, 2019, 09:16:07 am »
.
« Last Edit: August 19, 2022, 02:14:39 pm by emece67 »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Online FPGA simulator?
« Reply #24 on: February 13, 2019, 07:22:02 pm »
I think what it comes down to is if you want to do this professionally then being proficient with simulation and the latest tools is mandatory. You might not always simulate everything but you need to know how to do it and when it makes sense to do so.

If you're doing it as a hobby then the right approach is the one that works for you, as long as you're having fun then you're doing it right. I still think it's worth learning how to use the simulator because it's another tool to have on your belt when faced with a problem but I admittedly rarely use it myself. I'm more of the "build it and see what happens" type.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf