Adding and calling parts

Thread Starter

prophoss

Joined Feb 26, 2019
36
I am just messing around a bit with learning verilog at the moment. I have an FPGA dev board with an altera cyclone 4 on it. I am using quartis 2 to program it. With that out of the way I was wondering about building programs. Lets say you want to use a push button to iterate through numbers on a 7 segment display. You would need a BCD, button, de-dounce, etc... for it to work properly. Now basically how would you build that? I am not asking for the code but the structure of the code. Would you build/describe each part then call it as needed? I have been trying to wrap my mind around it since it is quite different from regular programming.
Thanks ahead of time, Brian
 

Deleted member 115935

Joined Dec 31, 1969
0
Your right, HDL is very different from C type programming, HDL is a true parallel design language.

The way to write all HDL is to partition the system design into blocks, and code / test / re use each of those blocks.

When you start , the blocks might be small, say a counter in one block, as you progress , you might make the blocks larger, but never more than 1000 lines is the golden rue.

Then you code blocks to "reference" the smaller blocks, so counter, you might have encoded a 4 bit counter, then at the next level up, you references the counter block 4 times, to make a 16 bit counter.

Strong suggestion, get a decent book, and follow that .
 

Thread Starter

prophoss

Joined Feb 26, 2019
36
Strong suggestion, get a decent book, and follow that .
At some point I will be taking some classes that deal with digital design using VHDL most likely. I just haven't gotten there yet. Still what little I have messed with it I have enjoyed and has piqued my interest. I have taken an introduction to digital design so I understand all the gates and got a taste of VHDL and Verilog. My thing is just trying to figure out how to piece it all together. I can create a BCD but don't know how to add the button and then de-bounce it etc.... I do way better with videos if you know of any good ones that would be appreciated.
 
Top