Question:

I want to learn VHDL or Verilog, why should I care about using a Soft Processor like the Arduino core?

Answer:

The main goal for the Papilio is to figure out how to most effectively help people learn VHDL and Verilog, in my experience one of the biggest frustrations with learning these languages is that they are not good at all when it comes to writing "control" logic. If you think about HDL as a method to define a whole circuit board inside a chip then this starts to make sense. Lets say we want to make a circuit board that is a Barcode Scanner with a serial interface, like the Barcode Genie. So we would find a uart chip, a chip that can handle ps/2 keyboards, and a chip that can interface SD cards. We need to tie them all together with "control" logic, some controller needs to tell them all how to work together. The obvious way to do this is to include a simple 8-bit microcontroller. Or you could use a bunch of 7400 series chips and make a control interface that way, not much fun. Using HDL to define your control logic is possible, just like it is possible to use 7400 series chips on a circuit board. But it is tedious and not the best way to do the job, its much easier and efficient to use a simple Soft Processor just like you would use an 8 bit micro in the real world. That is why I place emphasis on the Arduino Core, I really think it will help beginners because what becomes difficult and frustrating is defining control logic for a larger project. The idea is that you will start out with the Arduino core which will do your control logic in an efficient and familiar way, then you start learning VHDL or Verilog by adding cores to the AVR8 soft processor. You can focus on a simple task like creating a core for something like reading ps/2 keyboard input. Learn the HDL concepts you need to do simple tasks at first and then grow from there until you don't need a soft processor.

Why is "control" logic difficult and frustrating for beginners? There are plenty of HDL projects out there, like the Logic Sniffer project, that don't use a soft processor. In HDL you typically use a Finite State Machine to define your control logic, for a beginner who is accustomed to a sequential programming language the tendency is to try and make a big state machine to control everything. One of the biggest adjustments to make with HDL is to realize that everything is parallel, its one thing to know this but it is another to really start practicing it... Experienced HDL programmers will naturally make everything parallel, instead of a big Finite State Machine to control everything they will have a several FSM's in each of the modules that make the modules work in parallel with each other. So a bunch of little FSM's will take the place of a big FSM and there is no need for a Soft Processor. But being able to pull this off takes time and practice, for beginners it causes a lot of frustration when you are trying to move beyond simple tasks. ---

  

Share |