EmbeddedRelated.com
Forums

VHDL code for 16-32 bit counter for quadrature encoder signals (A-B)

Started by Unknown September 7, 2004
Thank you Jamie.

"jamie" <jamie@noway.com> wrote in message 
news:6UC%c.17219$lP4.1220919@news20.bellglobal.com...
> Patrick Harold wrote: >> Dear George, >> >> I would like to thank you for your understanding. >> Unfortunatelly I'm not student. (I'm too old to be a student.. When I >> was student, I was working with tubes (not even with transistors) ). >> It is not so easy in my age to keep track with the all this new >> technologies. I'm trying my best to follow the technology. I recently >> started to study the VHDL. I'm almost on the "page one" of the VHDL study >> and want to learn by implementing simple little projects. >> Thank you once again for your understanding. >> Regards. > > > Sorry Patrick, I'm use to students trying to do there homework online... > > Search amazon (and also google) for VHDL resourses. I'd suggest you make > small devices and work up (make an invertor, make a flip-flop). Doing it > that way you will get use to the language and then you can focus on what > you really want to build. > > > Regards, > > Jamie
On Wed, 8 Sep 2004 20:48:14 +1000, <Patrick Harold> wrote:

>Unfortunatelly I'm not student. (I'm too old to be a student.. When I was >student, I was working with tubes (not even with transistors) ). >It is not so easy in my age to keep track with the all this new >technologies. I'm trying my best to follow the technology. I recently >started to study the VHDL. I'm almost on the "page one" of the VHDL study >and want to learn by implementing simple little projects.
I first learned on tube designs, as well. Transistors were the 'new fangled' thing for me, later on. My first impressions, back when I was first reading about transistors, were that tubes were quite superior, as transistors required quite a bit more feedback to remain faithful to their inputs over a range. Oh, well. Long time ago. I don't have a lot of books on VHDL, but one that really helped me when I knew nothing at all was a book by a British guy who moved to Alabama some years back called, "HDL Chip Design." It provides a nice introduction that assumes very little by way of understanding and gives you a little history. Elsewhere in the book you will see both VHDL and Verilog examples of the same designs and he covers a great many of the basics. ASICs and FPGAs are discussed, with their attendant differences in emphasis when designing, but not so much that you get overwhelmed. Examples are given to show you how changes in an approach can yield improvements. He discusses RTL and gate level optimizations in a way that a newbie can easily fathom, I believe. In short, regardless of possible errors in the book today, it made a very easy path for me to get my first VHDL designs up and running on a real FPGA board. I went from not even knowing a single keyword of VHDL to my first properly functioning 4-bit adder and 7-segment digit display driver circuit in less than a week. And the code wasn't borrowed or stolen, I'd written it from scratch by myself. Which books might speak better to you, I don't know. But that one got me started and gave me enough of the basics that I could then start reading the VHDL others have written with some understanding and also begin to understand other FPGA issues the book didn't cover, like floorplanning. (obviously, I don't care about ASICs as I'm unlikely to be designing any unless I come into some cash I don't otherwise need.) Jon
"Patrick Harold" wrote:
> > I would like to thank you for your understanding. > Unfortunatelly I'm not student. (I'm too old to be a student.. > When I was student, I was working with tubes (not even with > transistors) ). It is not so easy in my age to keep track with > the all this new technologies. I'm trying my best to follow the > the "page one" of the VHDL study technology. I recently started > to study the VHDL. I'm almost on and want to learn by > implementing simple little projects. Thank you once again for > your understanding.
Tubes are not all that different from transistors, especially MOSFETs. They are considerably bulkier, require much higher voltages, need heaters, and dissipate much more power. However they are all 'gain blocks'. However you should learn to post correctly. Your answer belongs AFTER (or intermixed with) the material to which you reply, AFTER snipping out portions irrelevant to your answer. This is known as bottom-posting, and is always acceptable. What you are doing is called top-posting, which makes articles virtually unreadable and allows them to grow indefinitely, like a cancer. -- "I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - Bush. "If I knew then what I know today, I would still have invaded Iraq. It was the right decision" - G.W. Bush, 2004-08-02
In article <413db1b1$0$19870$afc38c87@news.optusnet.com.au>, <Patrick 
Harold> says...
> I'm new to VHDL and I want to learn as with examples. > I want to build a 16,24 or 32 bit counter for quadrature encoder signals (ie > A,B signals). > Can someone help me how to create following functionality in VHDL ? >
<snip> First of all split up your design into modules with a more specialized task. I would suggest : - A module for doing the conversion of the input signals A,B,IDX into up and down counting pulses for the next stage. - a up-down counter 32/16 - the output stage for parallel output - a parallel/serial converter and its output stage This may be sufficient for learning purposes. In practice, if you really want a working design you have to spend some thoughts about the following : - what happens when you are reading out during a counting pulse from the encoder - what happens if the encoder signals are noisy and changing to fast or counting continuosly up and down - metastability Last of all I would add a clock signal and make it a synchronous design. Best regards -- Klaus Falser Durst Phototechnik AG kfalser@IHATESPAMdurst.it
Patrick Harold wrote:

>>>I would like to thank you for your understanding. >>>Unfortunatelly I'm not student. (I'm too old to be a student.. When I >>>was student, I was working with tubes (not even with transistors) ). >>>It is not so easy in my age to keep track with the all this new >>>technologies. I'm trying my best to follow the technology. I recently >>>started to study the VHDL. I'm almost on the "page one" of the VHDL study >>>and want to learn by implementing simple little projects.
So did you download the Opencores example?: <http://www.opencores.org/projects.cgi/web/quadraturecount/overview> Paul Burke