78 Replies Latest reply on Dec 11, 2015 11:00 AM by ndnaren

    Some FPGA Beginner Questions

    pan

      Hi element14!

       

      Some time ago I've watched a talk of the nand2tetris course/project. If you've never heard of it you can check it out here: http://www.nand2tetris.org/ Basically it is a course designed to build a computer from the very ground up. It starts with logic gates and goes all the way up to programming a small game project (hence the name nand2tetris). There is also a video available from someone who has been doing the course on FPGA hardware ( http://www.youtube.com/watch?v=UHty1KKjaZw ).

      [At one point in the above linked youtube video you can see the designation "ep2c8q208", which should mean the project is running on Altera Cyclone II hardware.]

       

      I've always been curious about doing something with FPGA hardware, but never had any idea of a feasible, yet interesting-result-yielding project. Well, as you can probably guess, up until now that is

       

      During my university days I attended an FPGA workshop and I've read some stuff about the hardware components and the available course material, so I think I kind of have an idea about the difficulty of the project. But since everything I've been reading just made me more excited, I decided I absolutely want to give this a shot. Now there's a lot of FPGA information out there, so I'm surely still missing a lot of important information, but I would like to get started and think the best way to learn is to actually experiment with a real FPGA instead of wasting too much time with HDL simulations only to become used to functions that aren't going to synthesize on the board anyway.

       

      So I now would like to ask you about some things I'm still unsure about and would like to have clarified before buying an expensive development kit. I've read several articles about Altera and Xilinx and right now my choice would be a Spartan 3E Starter Board - this one to be exact: http://shop.embedded-projects.net/index.php?module=artikel&action=artikel&id=549

       

      The main questions I'm having right now:

      - Is there a general reason that would argue against getting the Spartan E3 board?

      - I actually have no idea how powerful an FPGA really is.. but assuming it's running on Cyclone II hardware, it probably should run on a Spartan 3 as well? Or is that in itself already a stupid question, as FPGA comparison doesn't work so easily?

      - As you can see, the price for the above board is about 150 Euro, which translates to something just short of $200. Yet I continue to find offers (on ebay or other websites) where boards are being sold for under $150 but even include small screens(!)*  What am I missing here? Did I pick an especially expensive outlet, or is there something shady about these cheap deals..?

      - In general, who is more newbie-friendly, Altera or Xilinx? (I've worked with VHDL before, which I think is Xilinx, right? Altera's Quartus is probably very similar?)

      - From how I understand the FPGA toolchain, in the above linked offer there should be everything included to get me going.. right? o_O

       

      I also have this second candidate: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,836&Prod=ATLYS

      - Maybe I'm an idiot, but as I read the offer, *only* the board is sold? I.e., in contrast to the first offer, I would need additional stuff to get something running on the board?

      - It also strikes me as a mayor drawback that there is not really an output option besides a few LEDs.. which for me would be very annoying; I'm already unhappy about the board linked before *only* having a small display (which in itself, however, is awesome to have of course).

      - This might also be a stupid question: I remember from back in the FPGA workshop I mentioned that getting a number-display to run is not that hard at all. How much more effort is it to get something displayed on a screen (either an attached one or a PC screen accessed via one of the available ports)?

       

      And as a final question: I've also seen some very much smaller boards than the ones linked here, that are also much cheaper.. are the boards I'm looking it overkill for what I'd like to do with them? Or does actually the contrary hold, and such a project wouldn't even run on one of the smaller boards available?

       

      Thanks for your help!

       

      Cheers,

      pan

       

      ________________________

      * Here for example:

      http://www.sainsmart.com/evaluation-board/fpga-cpld-board/new-ep2c8q208c8n-development-board-kit-fpga-altera-cyclone-nios-ii-with-2-4-lcd.html

        • Re: Some FPGA Beginner Questions
          pjclarke

          Hi,

           

          First off - this is just my point of view.

           

          Second - Welcome to the world of FPGAs!

           

          Ok, my view as someone who spent years as a hobby FPGA engineer working on Altera is make the move to Xilinx. I love the ISE interface and simulation tools. Easy to understand and use. I know other Altera hard core engineers who also confess that Xilinx tools are better.

           

          Spartian 3 chips are very common and great devices and I have one I have done small projects on. However Xilinx consider it older tech so would recommend comthing like a Spartian 6. Here are two great kits (I have one of each) and well worth considering.

           

          http://www.xess.com/prods/prod055.php

           

          http://www.enterpoint.co.uk/drigmorn/drigmorn3.html

           

          Both are low cost and have lots for someone starting out in FPGAs.

           

          Next check out Xilinx sponcered site for FPGAs (where I write blogs for) All Programmable Planet, where we have a number of bloggers talking about FPGA tech and you can follow engineers learning how to program and understand Verilog and VHDL.

           

          http://www.programmableplanet.com/

           

          Hope this helps and would be good to see your progress!

           

          Thanks

          Paul

          ( @monpjc )

          http://www.facebook.com/pages/Monpjc/274942132518373

            • Re: Some FPGA Beginner Questions
              pan

              Hey Paul, thanks for your answer!

               

              I haven't replied in some time in the hopes of getting some more answers, but alas, no such luck apparently. Anyway, thanks for the warm welcome and the useful links you posted!

               

              Just to maybe help out someone stumbling on this post, here's the answers to the questions that I initially posted:

               

              - I found no general reason against Spartan-3 boards. On the contrary, they seem to be regarded as quite useful entry-level boards for beginners.

              - About the cheap deals: there's some reviews on amazon.com about sainsmart FPGAs and why they might be so cheap.Suffice to say that I will refrain from getting their products.

              - There's an endless discussion about what's more user-friendly, Altera or Xilinx.. however, two points that I found noteworthy:

                  o Most people who tried both tend to recommend Xilinx' software package over Altera's.. but best to do your own research!

                  o Xilinx' free software comes with a pretty nasty spyware "feature" called WebTalk. Unacceptable. Either I'll find a way to disable that or I'm going Altera.

               

              would be good to see your progress!

              That will probably take some time   However, should I actually get the whole thing running, I'll probably be so proud that I'll just post it everywhere

               

              Cheers!

            • Re: Some FPGA Beginner Questions
              John Beetem

              Hi Christian,

               

              I just saw your discussion today.  I don't check the element14 FPGA page much since activity is rare.

               

              There's some good FPGA discussion in this thread at the Raspberry Pi group, including some other development boards.

               

              I've done a lot of design with the Xilinx Spartan-3A.  It's a nice architecture.  For learning FPGAs, there's really no need to jump to the Spartan-6 unless you need the increased capacity for a specific project.  Although the Spartan-6 ICs cost about the same as Spartan-3A, the boards are still quite a bit more expensive.

               

              Lattice had eval boards for their small-FPGA iCE40 series with promotional pricing of US$19 for a short time, but I think they're back to the standard US$39, so for that price you're better off spending a little more for a 200K gate Spartan-3A, e.g., the US$55 XESS XuLA-200.  I haven't tried that board myself, but the specs are attractive.

               

              All the major FPGAs can synthesize from VHDL or Verilog.  JMO/YMMV: If you like to type and love the Ada language, go with VHDL.  If you like C and prefer more concise notations, go with Verilog.  My preference of the two is Verilog, but neither is really a good fit for FPGA design.  According to my recollection, VHDL was conceived for specifying and simulating behavior of VLSI designs.  Verilog was conceived for generating test vectors and expected behavior.  Neither was conceived as a language for synthesizing logic, so you have to be inventive to get the synthesizer to produce the logic you really want.  The best language I've used for that was Altera's AHDL, but I don't think it's an option any more.

               

              FPGAs are very powerful and a lot of fun.  You get to design digital chips with zero cost for making logic errors.  Have lots of fun and please report problems and progress.

              1 of 1 people found this helpful
                • Re: Some FPGA Beginner Questions
                  pan

                  Hi John,

                   

                  thanks for your info as well!

                  I don't check the element14 FPGA page much since activity is rare.

                  That's good to know. Might I ask which page is a good alternative with some more activity? So far I'v only seen another german site and it's sister over @ http://embdev.net .

                   

                  Right now I pretty much narrowd down my choice to two of the Digilent boards, the Nexys 3 and the Atlys. My final considerations are:

                   

                  • I'm not really interested in video processing, so the Atlys' HDMI ports don't do anything for me.
                  • The Atyls seems quite a lot beefier. Do I need that? Probably not. Do I want it? Absolutely
                  • The Nexys 3 comes with four pmod extension slots for all kinds of stuff. I don't really have a plan to use more than one but I like to have them as it seems a very nice way to add stuff to the board further down the line. The Atyls only has one pmod slot.
                  • I will probably get the display vmod for christmas, which is awesome   It also means that I don't really care about the VGA and HDMI ports for video output, I'll just use the small FPGA screen and be amazed by that

                   

                  So in short: the nand2tetris project can be seen to run on a Cyclone II, so a Spartan 6 should be able to handle it. I would very much like to own a powerful Atyls board, but when I'm honest with myself, I probably won't need its power anyway - even if I extend the project to more stuff. In a perfect world I'd like to have a small OS running on the FPGA, and the Spartan 6 board should be able to handle that (plus, there's quite a road ahead till that milestone will be reached).

                   

                  YourVerilog/VHDL perspective is very welcome! I'm just now toying around with Xilinx' ISE to get a small Hello World to run and the Verilog/VHDL question is indeed what I have to figure out next. I already started with VHDL but now I guess I'll just try a few simple logic stuff with Verilog as well.

                   

                  Cheers!

                    • Re: Some FPGA Beginner Questions
                      John Beetem

                      Christian Müller wrote:

                       

                      John Beetem wrote:

                       

                      I don't check the element14 FPGA page much since activity is rare.

                      That's good to know. Might I ask which page is a good alternative with some more activity? So far I'v only seen another german site and it's sister over @ http://embdev.net .

                      Good question.  I took a quick look at embdev.net and it seems to have a good list of topics.

                       

                      For something as amazingly useful as the FPGA, you'd think there would be a lot more use and activity, yet at the present time FPGA design seems to be a specialized art.  Perhaps this is because they've been expensive in the past, and even at present when you can buy an entire 1GHz 32-bit ARM SoC for the price of a modest FPGA it's hard to justify the cost of FPGAs, especially in high-volume consumer devices where every cent matters.  Perhaps it's because there's a steep learning curve for VHDL or Verilog, and for vendor tools.  Perhaps it's because they "don't teach Logic in these schools", to quote a famous Professor.

                       

                      I'm hopeful that the Rasberry Pi movement will help get more people -- especially students -- introduced to FPGAs.  So I eagerly read anything at element14 or raspberrypi.org that has to do with FPGAs.  You can easily find discussion threads about FPGAs at raspberrypi.org by searching for "FPGA" in the Google box on the front page: all the major threads show up on the first page of results.  If there's enough interest and therefore volumes, the price of FPGA development boards will fall enough so that FPGAs can really get some traction.

                       

                      If you read the element14 thread I mentioned above and some of the raspberrypi.org threads, you'll see me complain repeatedly about my main FPGA bugbear, which is that none of the vendors publish their bit-stream format so you can create your own design tools.  Until this happens, there is no reason to expect FPGA design to get any easier.  Xilinx has good tools when measured by the quality of the results, but it takes a lot of experience and effort to write your logic so as to get those results.

                        • Re: Some FPGA Beginner Questions
                          pan

                          Yeah, I was wondering about how relatively small the FPGA community seems to be. Or to be more precise, how thinnly spread out over various forums. On the other hand, most threads I've been reading consisted of 90% useful information.. so that's really nice, and something rarely seen on online forums. So quality over quantity it seems

                           

                          What exactly is the Rasberry PI movement you're referring to? I've read it on several occasions, but never got caught in any discussion about it yet.

                           

                          As for the vendor's and their software.. I haven't even started with FPGAs yet and I'm already annoyed by their shenanigans. Almost every thread talks about Altera vs Xilinx sooner or later, so you would expect their software to be shining examples of amazing usability in order to boot out the competition. But.. well. Not so much. Yesterday I found out about Xilinx' WebTalk "feature" and that's just an absolute show stopper for me. Who thought this was a good idea and approved it? And who thought it would then be a good idea to praise this abomination as a dandy feature the user should be thankful for?! Urgh.

                            • Re: Some FPGA Beginner Questions
                              John Beetem

                              Christian Müller wrote:

                               

                              Yeah, I was wondering about how relatively small the FPGA community seems to be. Or to be more precise, how thinnly spread out over various forums. On the other hand, most threads I've been reading consisted of 90% useful information.. so that's really nice, and something rarely seen on online forums. So quality over quantity it seems

                              You get a lot of passive-agressive illogical comments and arrogance on many non-FPGA forums.  That kind of thinking gets you absolutely nowhere when doing FPGA design.

                              What exactly is the Rasberry PI movement you're referring to? I've read it on several occasions, but never got caught in any discussion about it yet.

                              Raspberry Pi is small ARM board with 512MB RAM, USB ports, Ethernet, and HDMI output that is capable of running GNU/Linux and other operating systems for US$35 (with a non-Ethernet version coming soon for US$25).  Since it's so much cheaper than anything comparable, it's captured the imagination of a large community and they've sold approx 500K of these little boards.  The main RasPi purpose is to be a platform for learning programming so students can play without worrying about killing the family PC.  I think it has potential to be a good platform for teaching logic design.

                              As for the vendor's and their software.. I haven't even started with FPGAs yet and I'm already annoyed by their shenanigans. Almost every thread talks about Altera vs Xilinx sooner or later, so you would expect their software to be shining examples of amazing usability in order to boot out the competition. But.. well. Not so much. Yesterday I found out about Xilinx' WebTalk "feature" and that's just an absolute show stopper for me. Who thought this was a good idea and approved it? And who thought it would then be a good idea to praise this abomination as a dandy feature the user should be thankful for?! Urgh.

                              WebTalk hasn't bothered me.  But then I generate my FPGA bitstreams on a Windows machine that's not connected to the Internet, because Windows always freezes up if I do.  I understand the purpose of WebTalk: one of the hardest things in designing an FPGA architecture is deciding how much chip area to use for various functions and how much for routing.  If you don't provide enough routing resources, you can't get good utlization of logic elements.  If you put in more multipliers or block RAMs than people actually use, you're wasting area that could be used for something else or for making the chip smaller and cheaper.  WebTalk compiles statistics of how customers actually utilize chips.  Xilinx may find the results useful, but I suspect that they'll discover that designs are diverse and it's hard to get any generally-useful result.  But that would be a result as well.

                                • Re: Some FPGA Beginner Questions
                                  michaelkellett

                                  @Christian,

                                   

                                  There is a univeral law (and it really is universal) sometimes referred to as the first law of Thermodynamics but better expressed as " There is no such thing as a free lunch". Xilinx are quite upfront about it - if you pay a bit for the software you can disable WebTalk - if you use the "free" version on of their paybacks is they get to collect data.

                                   

                                  If you don't like X and A then look at the smaller players' offerings - I use Lattice parts because I find the company much easier to deal with than X or A. You could also try MicroSemi (used to be Actel). Lattice have some simple FPGAs on very cheap and simple boards.

                                   

                                  Still no free lunches but a selection of different ways to pay !

                                   

                                  Michael Kellett

                                  1 of 1 people found this helpful
                                    • Re: Some FPGA Beginner Questions
                                      scotty2541

                                      Well John and Michael...

                                       

                                      I'd be happy to "pay a bit for software" But the only thing I can find on their site is like $2500.   So forget that.

                                       

                                      Also, when John Beetem says "on a Windows machine that's not connected to the Internet, because Windows always freezes up if I do."

                                      Did it cross anyone's mind that it is actually WebTalk causing that?

                                       

                                      Also, John says they will learn that "it's hard to get any generally-useful result".  Well, two and a half years later, they are still doubling down on it.

                                       

                                      I am trying to teach myself FPGA, as my digital class skipped over it.  So I am willing to buy the components necessary to do so, and about to spend a couple hundred for a demo board.  I was thinking of Diligents Nexys 4 until I saw the ISE statement about WebTalk.  Now I am looking at Quartus from Spartan, and getting a Cyclone III.

                                       

                                      Unless some on this (rather old) thread can suggest another alternative that does install spyware.

                                       

                                      -CSW

                                        • Re: Some FPGA Beginner Questions
                                          John Beetem

                                          Christopher Weber wrote:

                                           

                                          I am trying to teach myself FPGA, as my digital class skipped over it.  So I am willing to buy the components necessary to do so, and about to spend a couple hundred for a demo board.  I was thinking of Diligents Nexys 4 until I saw the ISE statement about WebTalk.  Now I am looking at Quartus from SpartanAltera, and getting a Cyclone III.

                                          I'm glad to see interest in FPGAs.  For some more recent discussion of FPGAs -- particularly on the topic of getting started with FPGAs -- you might be interested in this more recent discussion: http://www.element14.com/community/thread/38256/l/barriers-to-designing-with-fpgas

                                           

                                          There are terrific boards out there for learning about FPGAs, many below US$100 and some below US$50.  Here's part of a comment (with a couple updates) I made in the "barriers" thread:

                                          While FPGA development boards from FPGA vendors are often multi-hundred dollars, there are plenty of independent boards under US$100, such as the LOGI-Bone and LOGI-Pi.

                                           

                                          For lots of cheap FPGA development boards, take a look at Joel Williams’ list.

                                           

                                          The cheapest FPGA boards I’d consider include the $38 Papilio One with Xilinx Spartan-3E 250K and the $30 Gameduino (or similar Olimex MOD-VGA) with Spartan-3A 200K.

                                          Regarding ISE WebPack sending information back to Xilinx, my understanding is that what they send is innocuous and is only statistical information for improving the logic versus routing tradeoff in future FPGAs.  Anyway, I'm not worried.  As I said, I never hook up Windows machines to the Internet.  I really doubt it's Xilinx software that's screwing things up.  My experience with Windows is that it has so many malware attack vectors that there's no way to tell which one is killing you.  Or maybe it's just excessive virus scanning activity that's killing me.  In any case, leaving Windows off the Internet works for me.

                                           

                                          I've had excellent results using Xilinx ISE WebPack 12.4 on Ubuntu 11.10 and 12.04.  There are a few things that don't work for me (e.g., the graphical FPGA Editor) but everything I really need works.  One of the GNU/Linux bugs is that I don't think WebPack is able to sends anything back to Xilinx.  See, not all bugs are bad -- this is a ladybug

                                           

                                          I'm still firmly in the Xilinx camp, since I've designed so much with it.  Plus, Xilinx Spartan-3E and -6 are the only FPGAs that work with my Flavia software which implements small FPGA/CPLD designs exclusively using free-as-in-freedom software: http://www.element14.com/community/groups/fpga-group/blog/2014/07/21/flavia-the-free-logic-array

                                            • Re: Some FPGA Beginner Questions
                                              scotty2541

                                              John,

                                              Thanks for your reply.  Well, I already downloaded ISE 14.7...  I can always whip up another isolated PC to work with.  Or use a virtual machine.

                                               

                                              If I do that, I will get the Nexys 4.  It's easily in my range $.

                                               

                                              I've been programming PC's professionally in C++ for decades, and am getting an EE degree.  So paying for some learning resources is not out of the question, it's just making sure I get the value out of it, and Diligent has a good academic price.  Sometimes I feel a little guilty about taking advantage of student discounts, but I'm not using anything for my employer.  It's all for my own education.

                                               

                                              I will start reading those threads.  But is there a book you can recommend to start with?  I'm used a lot of digital building blocks (the old 74xxx chips), and done digital logic and boolean equations.  Then I also bought myself a Wellon programmer to play with Atmel PLDs.  I know FPGAs have a clock, and are substantially more complex...  But that is where I am starting from.

                                               

                                              -CSW

                                                • Re: Some FPGA Beginner Questions
                                                  John Beetem

                                                  Scott Weber wrote:

                                                   

                                                  I will start reading those threads.  But is there a book you can recommend to start with?  I'm used a lot of digital building blocks (the old 74xxx chips), and done digital logic and boolean equations.  Then I also bought myself a Wellon programmer to play with Atmel PLDs.  I know FPGAs have a clock, and are substantially more complex...  But that is where I am starting from.

                                                  I don't have a recent book recommendation.  I did a Google search for "FPGA book recommendations verilog" and the results look promising.  Or substitute VHDL.

                                                   

                                                  People usually design FPGAs using VHDL or Verilog.  There's a lot of discussion as to which language is better, and more discussions about which language is worse.  I prefer Verilog, because its syntax is based on C and thus produces concise source code.  VHDL is based on Ada and produces wordy source code.  Chacun a son goût.  As a C programmer, you'll probably find Verilog more familiar.  I've heard one professional FPGA manager say that he prefers is designers use VHDL to emphasize that there's a big difference between writing FPGA source code versus CPU source code.  He found that C programmers would write Verilog as if they were writing a CPU program  and end up with bad FPGA designs.  I see his point, but disagree with him.

                                                   

                                                  That said, VHDL and Verilog were both created as simulation languages, with synthesis added as an afterthought.  This means it's really easy to write VHDL or Verilog that simulates fine, but cannot be synthesized or produces a poor result.  I find this a defect of both languages.  I talk about this in an element14 discussion, with suggestions on how to write Verilog for synthesis: http://www.element14.com/community/thread/37205/l/connecting-verilog-to-synthesis

                                                    • Re: Some FPGA Beginner Questions
                                                      scotty2541

                                                      John, Okay...  Thanks for your help so far.  I have heard more about VHDL, and since I code in C++, I don't want something too similar, that would attempt to cross over, where it really shouldn't.  So, no Verilog for me...

                                                       

                                                      Now this:

                                                       

                                                      I started looking that this tutorial:

                                                      http://hep.uchicago.edu/~tangjian/SVT_sub/FTK_ATLAS/AUX/vhdl-tutorial.pdf

                                                      I'm good with much if it up to page 9, but there is an inconsistency.

                                                      On page 5, is shows a code that starts with :

                                                           architecture behav of reg4 is

                                                      But then I page 7, it shows a code segment that has:

                                                           architecture basic of d_ff is

                                                       

                                                      So, they are defining the architecture of the component, or element, or whatever it's called...  (I guess "entity" is the correct term)

                                                      But what is the difference between architecture described as "behavior" and architecture described as "basic".  The tutorial text doesn't explain the difference, nor define why it is being used differently.

                                                      --------

                                                      Next, I set up a virtual machine, loaded XP, and installed the 6gig ISE.  How wonderful that it crashed my IE ver 6 right out of the box, preventing me from even getting a license file...  I managed to get around that.

                                                       

                                                      I created some simple entity using their template, and filled it in with 4 inputs, 7 outputs, making a simple hex to 7-seg digit decoder.  Not a problem. Nice simple intro type of project.  Errors and warnings all cleaned up.

                                                       

                                                      But then is launched some "PlanAhead" thing, I have no idea what it is, or why.  But it froze up for several minutes, grinding everything to a halt.  At some point, and had a graphic of what appeared to be a BGA pinout map, maybe for assigning pins, because they were not defined in the original template file generated by the ISE wizard.  But I couldn't figure out what was going on.  Nor have I figured out how to specify pins in the code, in the first place.  Doing it in the PLD was rather straight forward.

                                                       

                                                      I would also expect to see a menu option to "Program Device".  like I see in MicroChip IDE, or in WinCupl from Atmel.  But I can't find anything like that.  Maybe because I don't have a device yet.

                                                       

                                                      Then it is doing all kinds of things I can't understand. Like when I double clicked on "Edit Constraints" in the left side.  because I want to see what is in it.  A popup appears telling me it's "Another editor is already editing..."   Really?  Where?

                                                       

                                                      What I really want is the basics...  Like WinCupl which lets me write PLD code, and send it to the device.  To begin with, just writing an notepad, and having a "compiler" generate code, which a tool could send to the FPGA would be nice as a starter tutorial.  So I don't have to deal with half a dozen other tools that are doing things which I don't know what yet.  Like PlanAhead, IMpact, SmartXplorer...

                                                       

                                                      So that is where I am, feeling rather lost.  Any advice?

                                                       

                                                      -Scott

                                                        • Re: Some FPGA Beginner Questions
                                                          michaelkellett

                                                          I'm going to offer some advice which has worked well for me over the last 10 years.

                                                           

                                                          Forget Xilinx and Altera and download the Lattice toolset - not as capable as the full Xilinx kit but good enough to take you along way and much simpler. I use the paid for version every day (along with other tools) and it works very well for me.

                                                           

                                                          Xilinx make some wonderful big FPGAs but Lattice have a better offering (IMO) at the low end.

                                                           

                                                          There is nothing as simple as WinCupl for FPGA.

                                                           

                                                          There are cheap Lattice dev kits for the Ice, Mach and XP2 ranges - pick the part you might want to play with and download the right tools - (ask if not obvious which)  - then get the tools working and only bother to buy the kit if you're happy.

                                                           

                                                          MK

                                                          1 of 1 people found this helpful
                                                            • Re: Some FPGA Beginner Questions
                                                              scotty2541

                                                              Michael,

                                                              Quick reply....  Thanks.  Lattice was not a name I was familiar with.

                                                              Yes, before buying a board, I was looking at the toolsets first.   I don't mind paying for a good tool to support the devices.  But more than a few hundred is out of the question, primarily because I don't want to spend the money and find out that I prefer a different manufacturer.

                                                               

                                                              My next question, which I suspect the answer is no, but I'll ask anyway...

                                                              Do any of these tools cross devices?  Can a single VHDL compiler create code for Xlinix, Altera, and others?   Obviously, if one did exist, it wouldn't be a freebie because it's not supported by the manufacturer.

                                                               

                                                              More digging... More waiting...   :-)  And I was so eager to buy a board to start playing with!

                                                               

                                                              -Scott

                                                              1 of 1 people found this helpful
                                                                • Re: Some FPGA Beginner Questions
                                                                  michaelkellett

                                                                  Well actually there ARE universal tools but they are not cheap:

                                                                   

                                                                  I use Aldec HDL which is a multi language vendor agnostic simulator (costs about £12k) - so I generate VHDL which in theory is FPGA vendor independent but in practice you always need to use specific vendor libraries to access things like RAM or multipliers so your code quickly gets locked in unless you are very careful and put a lot of work into independence.

                                                                   

                                                                  You get a  cut down free version with the Lattice tools. I think Xilinx use their own simulator and Altera use ModelSim.

                                                                   

                                                                  You can buy (I think) a universal synthesizer but it will be very expensive - no point at your level of work. The free version of Synplify that comes with the Lattice tools is fine (but works only for Lattice), Xilinx have their own synthesizer (works only for Xilinx).

                                                                   

                                                                  The only limitation with the free Lattice toolset (at first) is that it doesn't support FPGAs with high speed SERDES which means you can't do PCIE (and a few other fancy things) but by the time you need to do that the cost of the paid up Diamond license is small change in the whole project.

                                                                   

                                                                  If I were you I'd look at the Lattice Brevia kit - (Farnell 2253073, £32.68)  - it's a bit old hat (using a fairly old FPGA) but it's cheap and has plenty of potential. Once you've got your toes in the water you could go for the ECP3 VERSA kit which is £177 from Farnell  but gets you dual Gbit Ethernet and DDRAM (and a whole lot of complexity which will be overwhelming at first ).

                                                                   

                                                                  MK

                                                                  1 of 1 people found this helpful
                                                                  • Re: Some FPGA Beginner Questions
                                                                    John Beetem

                                                                    Scott Weber wrote:

                                                                     

                                                                    Do any of these tools cross devices?  Can a single VHDL compiler create code for Xlinix, Altera, and others?   Obviously, if one did exist, it wouldn't be a freebie because it's not supported by the manufacturer.

                                                                    If you're going with VDHL, there are various tutorials at Gadget Factory: http://gadgetfactory.net/learn/

                                                                    and http://papilio.cc/index.php?n=Papilio.QuickStartGuide

                                                                    and an e-book: http://forum.gadgetfactory.net/index.php?/page/articles.html/_/papilio/logicstart-megawing/intro-to-spartan-fpga-ebook-r34

                                                                    I haven't tried any of these myself, but I've heard good things about the e-book.

                                                                     

                                                                    There really isn't much point to having a common VHDL compiler.  If you write generic code for one FPGA it should port easily to others.  If you optimize your design to take advantage of resources only available on one particular family, then it will be harder to port the design but that would be the case whether or not they have different VHDL compilers.  I'm used to Xilinx ISE WebPack, so I'll use its synthesizer for preliminary design even when my target is a Microsemi (formerly Actel) part since I find the Microsemi tools a PITA.

                                                                     

                                                                    I second Michael's suggestion of checking out Lattice.  They have excellent low-end parts.  I really like the iCE40 series based on reading the technical documents: it seems like a very clean architecture.  I like Xilinx Spartan-3A/3E and Spartan-6 personally since there are a number of highly capable boards available and I'm able to implement Flavia on them.  But yes, there are a lot of tools and it takes time to learn which ones to ignore.

                                                                      • Re: Some FPGA Beginner Questions
                                                                        scotty2541

                                                                        Thanks.  All makes sense.

                                                                        You guys on this forum has been really helpful.

                                                                         

                                                                        -Scott

                                                                          • Re: Some FPGA Beginner Questions
                                                                            scotty2541

                                                                            Hmmm...  That was a fiasco...

                                                                             

                                                                            Suffice to say, trying to buy from Lattice is a complete nightmare.  They simply refuse to deal with someone that uses a public email address. I can see why it would be an advantage to restrict those, but this has gone to an extreme.  And I could go on for about an hour on problems with their web site.

                                                                             

                                                                            Here in the states, the only place I can find that device from a reseller is Newark.com ( which I guess is somehow affiliated with Element 14... I don't know who owns whom).

                                                                            Newark doesn't stock it.  Nor any other Lattice device except a capacitive touch demo board.  Not what I want.

                                                                             

                                                                            So how about the Cyclone III?

                                                                            P0037 - TERASIC TECHNOLOGIES - DEV BOARD, ALTERA DE0 BOARD | Newark element14

                                                                            In my price range, has the built in switches and displays to save my wiring up headers manually, although for that amount I'd like to have ADC to play with too.

                                                                            The over view page:

                                                                            Altera: P0037 DE0 Development Board

                                                                            has the statement "...with all the essential tools for novice users to gain knowledge...".  Maybe not all, but a good start...?

                                                                             

                                                                            It even has a fancy plexiglass cover  :-)

                                                                             

                                                                            -Scott

                                                                              • Re: Some FPGA Beginner Questions
                                                                                michaelkellett

                                                                                Go Altera if you like but I don't think John or I can help you much then with specifics - I don't like third party dev boards for FPGA (or anything else) - this may be prejudice but I've always had problems with them.

                                                                                 

                                                                                Mouser sell Lattice stuff and have the Brevia kit in stock:

                                                                                 

                                                                                LFXP2-5E-B2-EVN Lattice | Mouser

                                                                                 

                                                                                This is  a link to the UK Mouser web site but the stock will be in the US.

                                                                                 

                                                                                Even cheaper is the

                                                                                 

                                                                                ICE40HX1K-STICK-EVN Lattice | Mouser

                                                                                 

                                                                                but I think this is a bit light weight for you - it only has the 1k LUT ICE40 part and limited pin access.

                                                                                 

                                                                                MK

                                                                                1 of 1 people found this helpful
                                                                                  • Re: Some FPGA Beginner Questions
                                                                                    scotty2541

                                                                                    Even better. I can drive to Mouser in about 10 minutes from where I live.  And the price is better than Newark.

                                                                                    I thought I looked there and didn't find it.

                                                                                     

                                                                                    So, I would assume I have to wire up buttons and displays myself, and invent my own tutorials?  Because those other boards have IO components already built in, which was an attraction to me. 

                                                                                    For PLDs I started with this:

                                                                                    Atmel PLD 16V8, 22V10 and 20V8 PLD Trainer and USB Programmer

                                                                                    It had the software, device, and tutorial book, which was nice.

                                                                                     

                                                                                    Not a big deal if there isn't any of that stuff, but at least I know what to expect.

                                                                                     

                                                                                    -Scott

                                                                                      • Re: Some FPGA Beginner Questions
                                                                                        michaelkellett

                                                                                        Hello Scott,

                                                                                         

                                                                                        It has some nice things on board:

                                                                                         

                                                                                        • LatticeXP2 FPGA: LFXP2-5E-6TN144C
                                                                                        • 2 Mbit SPI Flash Memory
                                                                                        • 1 Mbit SRAM
                                                                                        • On-board USB controller for JTAG programming (FTDI - FT2232H)
                                                                                        • 2x20 and 2x5 Expansion Headers
                                                                                        • Push-buttons for general purpose I/O and reset
                                                                                        • 4-bit DIP switch for user-defined inputs
                                                                                        • Eight status LEDs for user-defined outputs

                                                                                         

                                                                                        see this page:

                                                                                         

                                                                                        XP2 Brevia2 Dev Kit - Lattice Semiconductor

                                                                                         

                                                                                        MK

                                                                                        1 of 1 people found this helpful
                                                                                          • Re: Some FPGA Beginner Questions
                                                                                            scotty2541

                                                                                            Okay, I hate to beat this to a pulp,  The last thing I am looking for is where is the programming tool to download.  So far, I haven't been able to find a name, or a link to the development tools for this one. And the link in the doc is broken (on page 2).  Takes be off into some weird place....

                                                                                             

                                                                                              ISE, as scary as it is, at least I found it.

                                                                                             

                                                                                            The reason is because I was burned before...  I bought the OSR  USB-FX2 demo board to learn writing device drivers for USB.  The result was I have a board that there is no support for...  They don't tell you anything about, nor give you any clue on programming the embedded device, and they don't offer support for the Windows device driver side either, claiming they want to only support the new WDF architecture (no the demo that came with the Driver Dev Kit),   So I was stuck with an expensive board that uses a micro controller, which I could only run their silly little demo code because I couldn't reprogram it, nor see how the client side functioned.

                                                                                            I ended up taking another path the learn that material.

                                                                                            And the OSR group has a lot of arrogant people in it.  (Some helpful, some not).  So asking turned into an exercise in getting abused.

                                                                                             

                                                                                            You guys have been a lot more helpful :-)

                                                                                             

                                                                                            -Scott

                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                michaelkellett

                                                                                                Go to this page:

                                                                                                 

                                                                                                Licensing - Lattice Semiconductor

                                                                                                and request the free license. (Paid for licenses take  a day or two to arrive, a free one may be more automatic. You may need to register some personal details (this is inevitable because although Lattice are keen to sell chips they use third party software components from companies who need to keep track of where it's used because that's all they make.)

                                                                                                 

                                                                                                Then go here

                                                                                                http://www.latticesemi.com/en/Products/DesignSoftwareAndIP/FPGAandLDS/LatticeDiamond.aspx#_229A1F76B8DF4E0098F41B8CC7935…

                                                                                                and download and install Diamond.

                                                                                                 

                                                                                                It installs a complete development environment which includes the download tools.

                                                                                                 

                                                                                                MK

                                                                                                1 of 1 people found this helpful
                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                    scotty2541

                                                                                                    Hi guys...

                                                                                                    I hope I don't offend anyone, but I went ahead with the TERASIC board.  And downloaded Quartus II.

                                                                                                    Good thing, because the version on the CD crashes when installing on my Win 7 x64.

                                                                                                     

                                                                                                    Anyway, thanks for the reading recommendation.  Free Range VHDL is perfect for me as a programmer.  And I've been creating those demos, plus creating my own stuff as learn.

                                                                                                     

                                                                                                    Questions:

                                                                                                    I'm trying to understand the whole "process" statement concept.

                                                                                                    I see that a collection of statements run concurrently, and I assume the same applies for a process.  Off the top of my head:

                                                                                                    architecture....

                                                                                                    Q1 <= A and B;

                                                                                                    Q2 <= C or D;

                                                                                                    yada : process (Z,Y) is

                                                                                                          Q3 => Z and Y and W; -- (yeah, I added an extra, non sensitive input)

                                                                                                    end process yada;

                                                                                                    Q4 <= F or G or A1;

                                                                                                    end;

                                                                                                    So, every one of these runs concurrently  Q1, Q2, Q3 (only if Z and Y change, but W is ignored), and Q4

                                                                                                     

                                                                                                    But what about inside the process?   Does the process statement only mean that it uses sensitivity?

                                                                                                    What if there was a Q3 and a Q3B inside the process?  Would they be sequential, or also concurrent?

                                                                                                     

                                                                                                    Next question:

                                                                                                    What about the clock?  I created a simple DFF, and used the clock by tying a defined port named CLK to the clock input pin.  All works.  It was just treating the clock input like any other input.

                                                                                                    But is "clock" (or "CLK" or anything) actually intrinsic to the device?  Or is it just a pin...?

                                                                                                    That is, is the only way to obtain a clock to actually define the input pin (any pin) to be where the clock input is?

                                                                                                    If "yes", that would imply that you could tie the clock oscillator to just any old pin.

                                                                                                     

                                                                                                    But it seems the device is intelligent enough to load from some EEPROM or flash (I haven't gotten that far in these tutorials), and that would imply the clock is needed to execute the load, and therefore the clock would have to be tied to a known and defined pin.

                                                                                                     

                                                                                                    Thanks for any help!

                                                                                                    -Scott

                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                        John Beetem

                                                                                                        Scott Weber wrote:

                                                                                                         

                                                                                                        Next question:

                                                                                                        What about the clock?  I created a simple DFF, and used the clock by tying a defined port named CLK to the clock input pin.  All works.  It was just treating the clock input like any other input.

                                                                                                        But is "clock" (or "CLK" or anything) actually intrinsic to the device?  Or is it just a pin...?

                                                                                                        That is, is the only way to obtain a clock to actually define the input pin (any pin) to be where the clock input is?

                                                                                                        If "yes", that would imply that you could tie the clock oscillator to just any old pin.

                                                                                                        I can't help with your VHDL questions, but let me take a stab at the "clock" question.  I assume the Terasic board you mention is the DE0 board you linked to upstream.  From looking at the photo of the board, there's an oscillator Y1 that's near one of the Cyclone III pins.  So basically you assign your signal "CLK" to the FPGA pin connected to Y1.  With most FPGA design systems you can either assign pins using a textual "user constraints file" or use a GUI tool to do the assignments.  You can find pin numbers in the DE0 board's schematic.

                                                                                                         

                                                                                                        Oscillator Y1 is probably really fast so if you want to make a counter or something that changes states slowly enough to watch, you'll need to include logic that divides the high-frequency clock down to a few Hz.  There are lots of examples of such circuits out there.

                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                            michaelkellett

                                                                                                            More on the clocks:

                                                                                                             

                                                                                                            As far as VHDL is concerned a clock is a signal or input just like any other.

                                                                                                            Almost all FPGAs have special clock input pins that can drive low skew clock distribution directly  - it is likely that the clock chip on your board is connected to such a pin and as John says there will be some way in the tools to define the IO standards it uses and to lock the physical pin the the IO named in VHDL.

                                                                                                             

                                                                                                            If I get some time later today I'll post a complete LED blinker in VHDL - which will explain some of the key concepts re. processes and their most common use in synchronous FPGA design.

                                                                                                             

                                                                                                            MK..

                                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                                scotty2541

                                                                                                                Thanks, but let me level set my experiences. 

                                                                                                                I have been programming PC's in C and C++ for a few decades, and done a lot of stuff with micro controllers (Microchip PIC series).  Which has included computing baud rates from CPU clock sources. I also studied electrical engineering.  I wouldn't dream of creating a counter for visible display without a lot of clock dividing.

                                                                                                                 

                                                                                                                The PLD stuff I played with doesn't have a defined clock.  I could use any input as a clock, and make state machines with it.

                                                                                                                 

                                                                                                                So, that was where my question came from: does an FPGA have a need for a specific clock like a MCU does, or is the clock kind of nebulous, like that way I could assign any PLD pin to the clock (obviously not on my demo board, as it has the clock tied to several pins and I don't feel like trying to cut traces on it )

                                                                                                                 

                                                                                                                Obviously, I've already gotten the unit to run some basic decoder stuff, hex->7 seg display (like an TTL 7447).  That code didn't need a clock.  But would the FPGA have run that code, if I yanked the oscillator off the board    I'd rather ask around, then actually try it LOL.

                                                                                                                 

                                                                                                                -Scott

                                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                                    John Beetem

                                                                                                                    Scott Weber wrote:

                                                                                                                     

                                                                                                                    So, that was where my question came from: does an FPGA have a need for a specific clock like a MCU does, or is the clock kind of nebulous, like that way I could assign any PLD pin to the clock (obviously not on my demo board, as it has the clock tied to several pins and I don't feel like trying to cut traces on it )

                                                                                                                    FPGAs have various routing resources, such as local wire segments between nearby logic elements (LEs) and longer wire segments for logic that's not nearby.  A net may have many segments connected by transistor switches.  If an LE's output fans out to many other LE inputs, the signal arrives at different inputs at different times.  This is fine for data signals, but is a disaster for clocking because you could have race conditions where a changing data signal arrives as a clock is changing, causing unpredictable behavior.


                                                                                                                    FPGAs usually have a small number of global nets for distributing clocks.  These are designed carefully at the chip level so that the signal for a net arrives at all destinations at the same time.  In Xilinx FPGAs, only certain pins can connect to global nets directly.  An external oscillator is usually connected to one of these "global clock" pins.  ("Global clock" pins can also used as ordinary I/O pins.)  The global nets can also be driven by PLLs and other FPGA clocking resources, and special clock multiplexers for implementing gated clocks cleanly.


                                                                                                                    You can also clock a register using a regular net, but if you clock two registers with the same net you'll get more skew than a global net and the design tool will give you lots of scary warnings, or may even refuse to process your design until you confirm that you really what to do this silly thing.

                                                                                                                    • Re: Some FPGA Beginner Questions
                                                                                                                      michaelkellett

                                                                                                                      When the synthesis and fitter tools have finished they produce lots of reports which you should have a look at. You'll find that if you didn't use a clock in your design then there won't be a pin assigned to one, so to answer your question,

                                                                                                                       

                                                                                                                      An FPGA design which consists entirely of combinatorial logic will not need a clock.

                                                                                                                       

                                                                                                                      In reality such designs are very rare indeed, all FPGA's from A,L M and X are intended to implement synchronous designs so clocks (often several different ones) are needed.

                                                                                                                       

                                                                                                                      For example, if you had an 8 digit 7 seg display to drive you could do it with 8 hex -> 7 seg decoders but it would almost certainly be more efficient to use 1 and share it, which would require some clocking.

                                                                                                                       

                                                                                                                      As soon as you get on to anything serious you need state machines and they will need clocks.

                                                                                                                       

                                                                                                                      (This is because of the way FPGAs work - I think (but can't quote a proof) that any time dependent logic design can be implemented synchronously or asynchronously from a logical point of view - it's just that FPGAs don't do asynchronous stuff well.)

                                                                                                                       

                                                                                                                      I haven't forgotten the example - it may happen today.

                                                                                                                       

                                                                                                                      MK

                                                                                                                      1 of 1 people found this helpful
                                                                                                                        • Re: Some FPGA Beginner Questions
                                                                                                                          michaelkellett

                                                                                                                          A simple counter example for LED twinkles !

                                                                                                                           

                                                                                                                          vhdl_heartbeat.jpg

                                                                                                                           

                                                                                                                          There must be a way to add a text file - someone please tell how !

                                                                                                                           

                                                                                                                          MK

                                                                                                                          1 of 1 people found this helpful
                                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                                            John Beetem

                                                                                                                            Michael Kellett wrote:

                                                                                                                             

                                                                                                                            (This is because of the way FPGAs work - I think (but can't quote a proof) that any time dependent logic design can be implemented synchronously or asynchronously from a logical point of view - it's just that FPGAs don't do asynchronous stuff well.)

                                                                                                                            Asynchronous design is a nightmare.  It's all hazards and races.  It's important for all digital engineers to have studied asynchronous design, because it's the theory that backs up why it's so critical to meet setup, hold, and minimum clock pulse width requirements.

                                                                                                                             

                                                                                                                            Asynchronous theory normally requires that logic operates in "fundamental mode".  In fundamental mode, only one input changes at a time, and the effects of that change must settle before the next input change.  If two inputs change at the same time (e.g., the clock and data inputs of a flip-flop) or one changes before the effects of the other have settled, you can have unpredictable behavior including metastability.

                                                                                                                             

                                                                                                                            Asynchronous theory is tractable if you stick with fundamental mode.  If you can't assume fundamental mode, it becomes very difficult in general.

                                                                                                                             

                                                                                                                            Synchronous design is a special case of asynchronous design.  In synchronous design, data signals propagate through combinational logic (with no loops) and they can change simultaneously as long as the effects settle before the next clock edge.  When the clock edge occurs, you normally assume that all registers driven by that clock update simultaneously, i.e., the changed outputs of those registers do not propagate so fast that they change inputs to registers that haven't finished updating.  As long as you use global clock nets, this requirement is satisfied by the FPGA circuits and you don't need to worry about it.

                                                                                                                             

                                                                                                                            I've kept things simple by assuming edge-triggered registers with a single clock.  Using latches and multiple clocks gets a lot more interesting

                                                                                                                            1 of 1 people found this helpful
                                                                        • Re: Some FPGA Beginner Questions
                                                                          cbaldy

                                                                          I'm also starting out with FPGAs, and was looking into the Diligent boards when I discovered Papilio. It's a Spartan 3e board with an Arduino Bootloader. Coming from the microcontroller world myself, this is an attractive board for a decent price.

                                                                            • Re: Some FPGA Beginner Questions
                                                                              michaelkellett

                                                                              @ Curtiss,

                                                                               

                                                                              As you say the Papilio is a reasonable price but there are two things I think should make beginners think carefully about it:

                                                                               

                                                                              It comes with some very complex FPGA stuff ready to go - this won't help you get really into FPGAs very easily and it's not clear (to me) what simple tutorial stuff there is.

                                                                               

                                                                              It's based on a rather old (by Xilinx standards) chip  - nothing wrong with Spartan 3 but there are much better parts now for the same or less money.

                                                                               

                                                                              Michael Kellett

                                                                              1 of 1 people found this helpful
                                                                            • Re: Some FPGA Beginner Questions
                                                                              cbaldy

                                                                              I think your right about the Papilio Michael. I'm going to look more at more capable boards, save myself an additional purchase if I find I need more.

                                                                              • Re: Some FPGA Beginner Questions
                                                                                morgaine

                                                                                Nice to see an increase in activity in this group.

                                                                                 

                                                                                The points about how small the FPGA community seems to be and mention of Raspberry Pi brought to mind the "competitors" thread over in the Pi group, which ended up with George Ioakimedes examining the possibility of creating a Pi price-competitive board around the new Freescale i.MX6 SoCs.  A low price and far better specs could conceivably spark interest as large as in Pi or greater.

                                                                                 

                                                                                Well how about killing two birds with one stone, and combining the i.MX6 with a small and cheap programmable logic device from any of the 4 major brands?  The board would then offer everything that the Pi has for IT education, while having a whole lot more potential for whose who want to delve deeper and tackle logic programming.  What's more, for those who don't want to engage in logic design, the device could be preprogrammed with some accelerator function of general utility, so the hardware wouldn't be wasted.

                                                                                 

                                                                                Popularity of such a board could increase the audience for discussions about FPGAs significantly, as well as being very useful for engineering education.

                                                                                 

                                                                                Addendum, mainly to John:  Add a PSoC5 device alongside the i.MX6 rather than a full-blown FPGA and you kill 3 birds with one stone:  IT software programming, embedded microcontrollers, and programmable logic.

                                                                                 

                                                                                Morgaine.

                                                                                  • Re: Some FPGA Beginner Questions
                                                                                    John Beetem

                                                                                    Morgaine Dinova wrote:

                                                                                     

                                                                                    Well how about killing two birds with one stone, and combining the i.MX6 with a small and cheap programmable logic device from any of the 4 major brands?

                                                                                    At some point the Xilinx Zynq-7000 may become practical for this.  Zynq has a dual Cortex-A9 on chip with dedicated DDR3/2/LP2, two USB, and two Gigabit Ethernet ports along with various serial ports.  The on-chip programmable logic (Artix-7 or Kintex-7) connects to the CPUs via AMBA buses and includes PCI express on the larger Zynq chips.  One could probably make a pretty capable open-source graphics engine using the FPGA, sharing work already done by other FPGA-based graphics engines.

                                                                                     

                                                                                    According to Xcell Journal 2Q2011 the starting price for Zynq is "below $15".  Well, maybe someday.  You can get a Zedboard to get started (US$395 general / US$319 academic).  Digi-Key lists XC7Z020 parts for as low as US$247.50 single quantity.  According to the forum at zedboard.org, Xilinx is current shipping engineering samples and general production is not until 1Q2013 or 1H2013.  So it will be a while before we see "below $15".

                                                                                     

                                                                                    I'm hoping the Zynq-7000 is successful, but many years ago I looked at a Xilinx Virtex-II Pro with a built-in PowerPC core and it was many times the cost of a stand-alone PowerPC chip (IBM/AMCC/APM 405EP) plus Xilinx Spartan-IIE, connected via a 32-bit PCI bus.  Xilinx is being smarter about Zynq than Virtex-II Pro, but right now you're better off with a stand-alone PowerPC chip with PCIe connected to a Spartan-6T.

                                                                                     

                                                                                    [I would like to take a moment to whinge about "Artix" and "Kintex" which I find to be utterly meaningless names and I'm really annoyed at constantly having to look up which is the Spartan-like one and which is the Virtex-like one.  I can't imagine I'm the only one who can't remember which is which, and I design FPGAs professionally for crying out loud.  End of whinge.]

                                                                                    • Re: Some FPGA Beginner Questions
                                                                                      cbaldy

                                                                                      Well I think the Papilio board I mentioned previously IS geared towards a budget minded and enrty level crowd. It is a Spartan 3E board that uses the "shields" expansion method simular to Arduino and actually has an Arduino bootloader so you can program it with the Arduino IDE. For those wanting logic programming, they have a "logic" shield that integrates features resembling what you would find in a Diligent board or others. My guess is that those who gravitate toward PLDs and FPGAs have a "been there done that" attitude when it comes to standard MCU development boards. Some people are likely turned off with how simplified they have become (example: Arduino, TIs MSP430 and Stellaris Launchpads) and are looking to learn something a little more capable and challenging. Michael Kellett reminded me of when I introduced my 9 year old son to the MSP430 Launchpad. The board is so simple and easy to explain that it really excited him. You see the benefit to making a dev board "entry level" and easy enough to start out with just a basic understanding, but there is a point where you want to evolve to a seperate paradigm.

                                                                                    • Re: Some FPGA Beginner Questions
                                                                                      meister

                                                                                      Old post, I know, but I ended up here so others might as well. Digilent has since put out a nexys 4 which is quite powerful, but priced like the previous nexii. I'd call it a good choice.

                                                                                      ZYNQ is a little more available now, the cheapest options being a parallella board (not shipping as of this post) or the zed mini. I've had the nexys 2 and the ATLYS (and two parallellas that haven't come yet), and have been happy with both, though a friend has borrowed the ATLYS and has had it longer than I have at this point. He runs ubuntu and cray on it. The power of atlys is basically matched by the new nexys 4 though, so I'd start there.

                                                                                       

                                                                                      Sainsmart is… best avoided. I bought a cell phone board from them and it looks like they hand soldered it, SMA parts and all. A very important point to make is that it works exactly as advertised, but they also bridged a bunch of pins with a solder blob (apparently on purpose), so it makes me nervous. Like buying a car for $50; yes it drove me across town, and has not had a breakdown yet, there is a lot of ductape holding on the bumper though, and the ignition is two wires you twist, and it makes a noise, and a smell. Buyer beware I guess, sometimes cheap and works is all that matters to you. I WILL point out it came without documentation. I mean any. There are jumpers and buttons on this board and no doc anywhere that says what they do or where they connect. There are forum posts aplenty from others trying to puzzle it out. I've been able to use it because it came ready to connect via serial terminal straight to the 3rd party chip, which did have documentation. I just… buttons, unlabeled buttons. I feel bad since it works alright but, man is it just sketchy.

                                                                                      • Re: Some FPGA Beginner Questions
                                                                                        meister

                                                                                        Old post, I know, but I ended up here so others might as well. Digilent has since put out a nexys 4 which is quite powerful, but priced like the previous nexii. I'd call it a good choice.

                                                                                        ZYNQ is a little more available now, the cheapest options being a parallella board (not shipping as of this post) or the zed mini. I've had the nexys 2 and the ATLYS (and two parallellas that haven't come yet), and have been happy with both, though a friend has borrowed the ATLYS and has had it longer than I have at this point. He runs ubuntu and cray on it. The power of atlys is basically matched by the new nexys 4 though, so I'd start there.

                                                                                         

                                                                                        Sainsmart is… best avoided. I bought a cell phone board from them and it looks like they hand soldered it, SMA parts and all. A very important point to make is that it works exactly as advertised, but they also bridged a bunch of pins with a solder blob (apparently on purpose), so it makes me nervous. Like buying a car for $50; yes it drove me across town, and has not had a breakdown yet, there is a lot of ductape holding on the bumper though, and the ignition is two wires you twist, and it makes a noise, and a smell. Buyer beware I guess, sometimes cheap and works is all that matters to you. I WILL point out it came without documentation. I mean any. There are jumpers and buttons on this board and no doc anywhere that says what they do or where they connect. There are forum posts aplenty from others trying to puzzle it out. I've been able to use it because it came ready to connect via serial terminal straight to the 3rd party chip, which did have documentation. I just… buttons, unlabeled buttons. I feel bad since it works alright but, man is it just sketchy.

                                                                                        • Re: Some FPGA Beginner Questions
                                                                                          meister

                                                                                          Old post, I know, but I ended up here so others might as well. Digilent has since put out a nexys 4 which is quite powerful, but priced like the previous nexii. I'd call it a good choice.

                                                                                          ZYNQ is a little more available now, the cheapest options being a parallella board (not shipping as of this post) or the zed mini. I've had the nexys 2 and the ATLYS (and two parallellas that haven't come yet), and have been happy with both, though a friend has borrowed the ATLYS and has had it longer than I have at this point. He runs ubuntu and cray on it. The power of atlys is basically matched by the new nexys 4 though, so I'd start there.

                                                                                           

                                                                                          Sainsmart is… best avoided. I bought a cell phone board from them and it looks like they hand soldered it, SMA parts and all. A very important point to make is that it works exactly as advertised, but they also bridged a bunch of pins with a solder blob (apparently on purpose), so it makes me nervous. Like buying a car for $50; yes it drove me across town, and has not had a breakdown yet, there is a lot of ductape holding on the bumper though, and the ignition is two wires you twist, and it makes a noise, and a smell. Buyer beware I guess, sometimes cheap and works is all that matters to you. I WILL point out it came without documentation. I mean any. There are jumpers and buttons on this board and no doc anywhere that says what they do or where they connect. There are forum posts aplenty from others trying to puzzle it out. I've been able to use it because it came ready to connect via serial terminal straight to the 3rd party chip, which did have documentation. I just… buttons, unlabeled buttons. I feel bad since it works alright but, man is it just sketchy.

                                                                                          • Re: Some FPGA Beginner Questions
                                                                                            meister

                                                                                            Old post, I know, but I ended up here so others might as well. Digilent has since put out a nexys 4 which is quite powerful, but priced like the previous nexii. I'd call it a good choice.

                                                                                            ZYNQ is a little more available now, the cheapest options being a parallella board (not shipping as of this post) or the zed mini. I've had the nexys 2 and the ATLYS (and two parallellas that haven't come yet), and have been happy with both, though a friend has borrowed the ATLYS and has had it longer than I have at this point. He runs ubuntu and cray on it. The power of atlys is basically matched by the new nexys 4 though, so I'd start there.

                                                                                             

                                                                                            Sainsmart is… best avoided. I bought a cell phone board from them and it looks like they hand soldered it, SMA parts and all. A very important point to make is that it works exactly as advertised, but they also bridged a bunch of pins with a solder blob (apparently on purpose), so it makes me nervous. Like buying a car for $50; yes it drove me across town, and has not had a breakdown yet, there is a lot of ductape holding on the bumper though, and the ignition is two wires you twist, and it makes a noise, and a smell. Buyer beware I guess, sometimes cheap and works is all that matters to you. I WILL point out it came without documentation. I mean any. There are jumpers and buttons on this board and no doc anywhere that says what they do or where they connect. There are forum posts aplenty from others trying to puzzle it out. I've been able to use it because it came ready to connect via serial terminal straight to the 3rd party chip, which did have documentation. I just… buttons, unlabeled buttons. I feel bad since it works alright but, man is it just sketchy.

                                                                                            • Re: Some FPGA Beginner Questions
                                                                                              meister

                                                                                              Old post, I know, but I ended up here so others might as well. Digilent has since put out a nexys 4 which is quite powerful, but priced like the previous nexii. I'd call it a good choice.

                                                                                              ZYNQ is a little more available now, the cheapest options being a parallella board (not shipping as of this post) or the zed mini. I've had the nexys 2 and the ATLYS (and two parallellas that haven't come yet), and have been happy with both, though a friend has borrowed the ATLYS and has had it longer than I have at this point. He runs ubuntu and cray on it. The power of atlys is basically matched by the new nexys 4 though, so I'd start there.

                                                                                               

                                                                                              Sainsmart is… best avoided. I bought a cell phone board from them and it looks like they hand soldered it, SMA parts and all. A very important point to make is that it works exactly as advertised, but they also bridged a bunch of pins with a solder blob (apparently on purpose), so it makes me nervous. Like buying a car for $50; yes it drove me across town, and has not had a breakdown yet, there is a lot of ductape holding on the bumper though, and the ignition is two wires you twist, and it makes a noise, and a smell. Buyer beware I guess, sometimes cheap and works is all that matters to you. I WILL point out it came without documentation. I mean any. There are jumpers and buttons on this board and no doc anywhere that says what they do or where they connect. There are forum posts aplenty from others trying to puzzle it out. I've been able to use it because it came ready to connect via serial terminal straight to the 3rd party chip, which did have documentation. I just… buttons, unlabeled buttons. I feel bad since it works alright but, man is it just sketchy.

                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                ndnaren

                                                                                                hey dear...Greeting of the Day!!!!!

                                                                                                I am beginner of FPGA and VHDLl coding,I'm using spartan6(lx9,tqg144) development board i want to display text and images on monitor display by VGA connector is is possible with spartan6???!! IS, IS POSSIBLE to dispay any text ?? any image?? on monitor.

                                                                                                Small help also would be great helpful

                                                                                                thanks!!

                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                    michaelkellett

                                                                                                    It's possible and even quite easy if you are prepared to put up with limited colour resolution.

                                                                                                     

                                                                                                    The key problem is that for VGA you need three analogue signals (Red, Green and Blue) and the obvious way to make them is with three DACs. You can buy chips made for the purpose but if you only want to use the basic kit you have you can make a restricted display without.

                                                                                                     

                                                                                                    Here's a link:

                                                                                                     

                                                                                                    https://www.pantechsolutions.net/cpld-fpga-boards/vga-interfacing-with-spartan-3-primer

                                                                                                     

                                                                                                    You'll get loads of information if you Google "fpga vga". Take the time to get the VGA spec form somewhere and find out how the signals work. You can learn a lot from reading the data sheets and app notes a bout early video controllers like MC6845.

                                                                                                     

                                                                                                    MK

                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                        ndnaren

                                                                                                        hey thanks allot ,it feels good to see your response ..i am just

                                                                                                        beginner, i  just have done simple projects on xilinx ise 13.1 with

                                                                                                        xilinx spartan6(xc6slx9-tqg144) board i want to enhance and improve my

                                                                                                        knowledge in this field so how can i start honestly i take a project

                                                                                                        of displaying text "hello world" and image on vga monitor so how can i

                                                                                                        interrface keyboard and mouce in ps2 port and vga configuration how

                                                                                                        can i go ahead....thanks..!!

                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                        John Beetem

                                                                                                        Here are some VGA 'blogs at Gadget Factory, the maker of the Papilio Spartan-3E and Spartan-6 FPGA boards: http://www.gadgetfactory.net/tag/vga/

                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                            ndnaren

                                                                                                            hey john Thanks allot !

                                                                                                            Thanks for your warm welcome and support ..

                                                                                                            since 11days i have been reading different tutorials and materials but

                                                                                                            i am not satisfied how to display text and how to display image but up

                                                                                                            to now i think i will be possible...

                                                                                                            last question i am using spartan 6(XC6SLX9-TQG144) (xilinx X-SP6-X9)

                                                                                                            board (it is not micro board) and i cant find its proper

                                                                                                            configurations as well as all functions i have google it hundrads of

                                                                                                            times but i got all information about micro board so how can i get

                                                                                                            proper configuration..

                                                                                                            thank you very much for your reply..

                                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                                John Beetem

                                                                                                                narendra rathod wrote:

                                                                                                                 

                                                                                                                last question i am using spartan 6(XC6SLX9-TQG144) (xilinx X-SP6-X9)

                                                                                                                board (it is not micro board) and i cant find its proper

                                                                                                                configurations as well as all functions i have google it hundrads of

                                                                                                                times but i got all information about micro board so how can i get

                                                                                                                proper configuration..

                                                                                                                Can you tell who manufactures the board and get a part number?  I couldn't find "X-SP6-X9" either.  You might want to post an image to see if someone here recognizes it.

                                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                                    ndnaren

                                                                                                                    spartan6 xc6slx9 TQG144

                                                                                                                    This is the board i am using..and the below link contain it's sellers detail

                                                                                                                    http://artofcircuits.com/product/spartan-6-fpga-development-board-xc6slx9-tqg144

                                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                                        John Beetem

                                                                                                                        So I guess it didn't come with a user manual or a schematic?  That's pretty annoying.  You might ask the vendor if either of those is available -- maybe they forgot to include a link with the board.

                                                                                                                         

                                                                                                                        The board does seem to be "self-documenting" to a certain extent.  (I followed the artofcircuits.com link to get higher resolution photo.) There's a bunch of tables on the silkscreen showing which functions are attached to which FPGA pins.  For example, diodes D3 - D14 are connected to FPGA pins P33, P34, P35, etc.  So you can use these pin numbers in a User Contraint File (.ucf) to assign your signal names to functions on the board.  You'll need to play around a little to see whether the diodes are active-high or active-low.

                                                                                                                         

                                                                                                                        Some of the tables are misleading.  For example, the LED digits are called "Nixie Tube", I guess out of nostalgia.  The LED segments are numbered A-G, plus DP for Decimal Point.  I would guess that BIT0-BIT7 really mean Digit 0 - Digit 7.  The BIT0-BIT7 FPGA pins probably drive transistors Q50-Q57 to turn on the digits.  I have a 'blog describing using a LOGI-Bone, LOGI-Pi, and LOGI-EDU to display a BCD counter using 7-segment displays that might be a useful reference: http://www.element14.com/community/groups/fpga-group/blog/2014/10/12/seven-segment-bcd-counter-using-the-valentfx-logi-edu

                                                                                                                         

                                                                                                                        It looks like the routing is mostly on the top layer, so you can see how FPGA pins route to other components.  The Xilinx Spartan-6 data sheet shows how the FPGA pins are numbered.

                                                                                                                         

                                                                                                                        It looks like you need a separate JTAG programmer with 10-pin cable to program the FPGA.  Xilinx brand programmers are pretty expensive, but there are low-cost FTDI FT2232H or FT232H modules that can do the job.  I don't know what would be available in Pakistan.

                                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                                            ndnaren

                                                                                                                            Thank you very much john..now i can understand this board some how ...there is no user guide or manual is included with this board ...i am doing the project you suggested ..but if any help about keyboard key press and display on VGA monitor it will be very helpful for my project thanks a lot..!!

                                                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                                                John Beetem

                                                                                                                                For VGA, I'd start with Wikipedia which gives a good overview: https://en.wikipedia.org/wiki/Video_Graphics_Array

                                                                                                                                Since you only have three FPGA outputs for Red, Green, and Blue, you'll only be able to do 8 colors without modifying the board.  Start with something really simple like vertical color bands, and then expand to something more interesting like checker board.  At some point you can use Xilinx Block RAMs to make a character generator.

                                                                                                                                 

                                                                                                                                Your board should be able to interface with a PS/2 keyboard.  WIkipedia has a good overview https://en.wikipedia.org/wiki/PS/2_port and a link to a site with more details: http://www.computer-engineering.org/ps2protocol/

                                                                                                                                 

                                                                                                                                According to the detailed site, PS/2 has open-collector (or open-drain) I/Os, which is good because Spartan-6 has 3.3V maximum I/Os.  They're not 5V tolerant and need to be protected from external 5V signals.  I expect a PS/2 keyboard will work with 3.3V pull-ups instead of 5V pull-ups, but I'd try checking it off line just be be sure before risking damage to the Spartan-6.  It's probably been done before, so see if there are already successful projects out there.

                                                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                                                    ndnaren

                                                                                                                                    yes that's an important thing. i read it .. honestly i understand that keyboard ps/2 has one input(clock in) and one inout(i.e data)  and VGA has one input(clock 50mhz ) and  has  five outputs (i.e. red,green,blue,horizontal sync and vertical sync)  .i am using xilinx 13.1 ISE if i want to display keyboard on vga should i have to include files like vga_controller, vga_selector ,keyboard scancodes , keyboard interfacing program with project???? should  i attach ucf filse for individuals one(i.e for vga_controller,Vga selector,keyboard )??? i am confused..

                                                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                                                        ndnaren

                                                                                                                                        For displaying an image is it convert in .coe file and then attach with project??? i read somewhere..

                                                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                                                            John Beetem

                                                                                                                                            XIlinx ISE has a pretty steep learning curve for a new user.  I would strongly suggest you start with some simple examples, such as controlling LEDs using push-button inputs.  Then move on to more interesting examples such as a binary counter that displays its values in the LEDs.  I did this as a demo project for the LOGI-Pi and LOGI-Bone FPGA boards.  Take a look at Experiment 2 in  http://www.element14.com/community/groups/fpga-group/blog/2014/10/03/first-experiences-with-the-valentfx-logi-bone.  The 'blog includes Verilog source code and a UCF that assigns top-level module I/Os to FPGA pins.

                                                                                                                                             

                                                                                                                                            Once you're familiar with ISE using simple examples, then start playing with VGA.  If you do a binary counter as an example, you can then adapt it for VGA's horizontal and vertical counters.

                                                                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                                                                ndnaren

                                                                                                                                                Okay john as you say...but which language you suggest that i should learn verilog or vhdl up to now i read and learnt vhdl.!!

                                                                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                                                                    michaelkellett

                                                                                                                                                    You can use VHDL perfectly well with the Xilinx, Altera, Lattice or Micro-Semi free tools.

                                                                                                                                                     

                                                                                                                                                    John uses Verilog and I use VHDL so you can ask one of us if you get stuck whichever language you use.

                                                                                                                                                     

                                                                                                                                                    John's suggested approach to learning is good advice.

                                                                                                                                                     

                                                                                                                                                    It's easy to find lots of simple examples on the web but the important thing is to actually implement them on your hardware.  Don't forget to use the simulator before you try the code on an actual chip - you can learn a great deal by simulating !

                                                                                                                                                     

                                                                                                                                                    MK

                                                                                                                                                    1 of 1 people found this helpful
                                                                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                                                                        ndnaren

                                                                                                                                                        Thank you very much Micheal and John l!!

                                                                                                                                                        I  am starting to learn basic exampls with this website .      http://www.fpgacenter.com/examples/index.php.......but displaying text and image on vga is my project so it has time deadline it's my first project so please if you have any help regarding that also please tell me..thanks

                                                                                                                                                         

                                                                                                                                                         

                                                                                                                                                        naren.

                                                                                                                                                        1 of 1 people found this helpful
                                                                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                                                                            michaelkellett

                                                                                                                                                            I only had a very quick look at this site but I strongly recommend that you find another - why - because its examples use deprecated and non standard libraries which will cause you trouble in the end.

                                                                                                                                                             

                                                                                                                                                            (They use IEEE.STD_LOGIC_ARITH.ALL; which is not really a standard at all, despite the name, you should use numeric_std - see here for why http://vhdlguru.blogspot.co.uk/2010/03/why-library-numericstd-is-preferred.html

                                                                                                                                                             

                                                                                                                                                            Have a look here:

                                                                                                                                                             

                                                                                                                                                            https://www.doulos.com/knowhow/vhdl_designers_guide/

                                                                                                                                                             

                                                                                                                                                            much better.

                                                                                                                                                             

                                                                                                                                                            Lattice, Xilinx and Altera have lots of examples.

                                                                                                                                                             

                                                                                                                                                            MK

                                                                                                                                                            1 of 1 people found this helpful
                                                                                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                                                                                ndnaren

                                                                                                                                                                okay than ....how to generate block memory or BROM?? i am at half of the way but now i don't know what to do.. i am giving some snap shot below

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                library IEEE;

                                                                                                                                                                use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                 

                                                                                                                                                                -- Uncomment the following library declaration if using

                                                                                                                                                                -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                 

                                                                                                                                                                -- Uncomment the following library declaration if instantiating

                                                                                                                                                                -- any Xilinx primitives in this code.

                                                                                                                                                                library UNISIM;

                                                                                                                                                                use UNISIM.VComponents.all;

                                                                                                                                                                 

                                                                                                                                                                entity pong_textf is

                                                                                                                                                                    Port ( clk : in  STD_LOGIC;

                                                                                                                                                                           reset : in  STD_LOGIC;

                                                                                                                                                                           pixel_x : in  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                           pixel_y : in  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                           dig_0 : in  STD_LOGIC_VECTOR (3 downto 0);

                                                                                                                                                                           dig_1 : in  STD_LOGIC_VECTOR (3 downto 0);

                                                                                                                                                                           ball : in  STD_LOGIC_VECTOR (1 downto 0);

                                                                                                                                                                           text_on : out  STD_LOGIC_VECTOR (3 downto 0);

                                                                                                                                                                           text_r : out  STD_LOGIC;

                                                                                                                                                                           text_g : out  STD_LOGIC;

                                                                                                                                                                           text_b : out  STD_LOGIC);

                                                                                                                                                                end pong_textf;

                                                                                                                                                                 

                                                                                                                                                                architecture Behavioral of pong_textf is

                                                                                                                                                                signal pix_x,pix_y: unsigned(9 downto 0);

                                                                                                                                                                signal rom_addr: std_logic_vector(10 downto 0);

                                                                                                                                                                signal char_addr,char_addr_s,char_addr_l,char_addr_r,

                                                                                                                                                                        char_addr_o: std_logic_vector(6 downto 0);

                                                                                                                                                                signal row_addr,row_addr_s,row_addr_l,row_addr_r,

                                                                                                                                                                        row_addr_o: std_logic_vector(3 downto 0);

                                                                                                                                                                signal bit_addr,bit_addr_s,bit_addr_l,bit_addr_r,

                                                                                                                                                                        bit_addr_o: std_logic_vector(2 downto 0);

                                                                                                                                                                signal font_word: std_logic_vector(7 downto 0);

                                                                                                                                                                signal font_bit: std_logic;

                                                                                                                                                                signal score_on,logo_on,rule_on,over_on: std_logic;

                                                                                                                                                                signal rule_rom_addr: unsigned(5 downto 0);

                                                                                                                                                                type rule_rom_type is array(0 to 63) of std_logic_vector(6 downto 0);

                                                                                                                                                                --rule text Rom defination

                                                                                                                                                                constant RULE_ROM: rule_rom_type :=(

                                                                                                                                                                --row1

                                                                                                                                                                "1010011",--S

                                                                                                                                                                "1010000",--P

                                                                                                                                                                "1000101",--E

                                                                                                                                                                "1010010",--R

                                                                                                                                                                "1010010",--R

                                                                                                                                                                "1001111",--O

                                                                                                                                                                "1010111",--W

                                                                                                                                                                "1010011",--S

                                                                                                                                                                "1001111",--O

                                                                                                                                                                "1000110",--F

                                                                                                                                                                "1010100",--T

                                                                                                                                                                "1010100",--T

                                                                                                                                                                "1000101",--E

                                                                                                                                                                "1000011",--C

                                                                                                                                                                "1001000",--H

                                                                                                                                                                "0000000"

                                                                                                                                                                );

                                                                                                                                                                 

                                                                                                                                                                begin

                                                                                                                                                                pix_x<= unsigned(pixel_x);

                                                                                                                                                                pix_y<= unsigned(pixel_y);

                                                                                                                                                                --instantiate font ROM

                                                                                                                                                                font_unit: entity work.font_rom

                                                                                                                                                                port map(clk=>clk, addr=>rom_addr,data=>font_word);

                                                                                                                                                                ------------------------------------------------------

                                                                                                                                                                --score region

                                                                                                                                                                --display score and ball at top

                                                                                                                                                                --text: "score: dd ball:d"

                                                                                                                                                                --scale to 16-by32 font

                                                                                                                                                                --------------------------------------------------------

                                                                                                                                                                score_on<=

                                                                                                                                                                '1' when pix_y(9 downto 5)=0 and

                                                                                                                                                                pix_x(9 downto 4)<16 else

                                                                                                                                                                '0';

                                                                                                                                                                row_addr_s<=std_logic_vector(pix_y(4 downto 1));

                                                                                                                                                                bit_addr_s<=std_logic_vector(pix_x(3 downto 1));

                                                                                                                                                                with pix_x(7 downto 4) select

                                                                                                                                                                char_addr_s<=

                                                                                                                                                                "1010011" when "0000",--S

                                                                                                                                                                "1010000"when "0001",--P

                                                                                                                                                                "1010010" when "0010",--P

                                                                                                                                                                "1010111" when  others;--w

                                                                                                                                                                 

                                                                                                                                                                ----------------------------------------------------------

                                                                                                                                                                --logo region:

                                                                                                                                                                --display sprw

                                                                                                                                                                --used as a background

                                                                                                                                                                --scale to 64 by 128 font

                                                                                                                                                                ------------------------------------------------------------

                                                                                                                                                                logo_on<=

                                                                                                                                                                '1' when pix_y(9 downto 7)=2 and

                                                                                                                                                                (3<= pix_x(9 downto 6) and pix_x(9 downto 6)<=6) else

                                                                                                                                                                '0';

                                                                                                                                                                row_addr_l<= std_logic_vector(pix_y(6 downto 3));

                                                                                                                                                                bit_addr_l<=std_logic_vector(pix_x(5 downto 3));

                                                                                                                                                                with pix_x(8 downto 6) select

                                                                                                                                                                char_addr_l<=

                                                                                                                                                                "1010011" when "011",--s

                                                                                                                                                                "1010000" when "100",--p

                                                                                                                                                                "1010010" when "101",--r

                                                                                                                                                                "1001000" when others;--w

                                                                                                                                                                ----------------------------------------------------------------

                                                                                                                                                                --rule region

                                                                                                                                                                --------------------------------------------------------------

                                                                                                                                                                rule_on<= '1' when pix_x(9 downto 7)="010" and

                                                                                                                                                                                         pix_y(9 downto 6)="0010" else

                                                                                                                                                                                         '0';

                                                                                                                                                                                         row_addr_r<= std_logic_vector(pix_y(3 downto 0));

                                                                                                                                                                                         bit_addr_r<= std_logic_vector(pix_x(2 downto 0));

                                                                                                                                                                                         rule_rom_addr<=pix_y(5 downto 4) & pix_x(6 downto 3);

                                                                                                                                                                                         char_addr_r<=RULE_ROM(to_integer(rule_rom_addr));

                                                                                                                                                                ------------------------------------------------------------------------------------

                                                                                                                                                                --game region

                                                                                                                                                                                         ---------------------------------------------------------------

                                                                                                                                                                over_on<= '1' when pix_y (9 downto 6)=3 and

                                                                                                                                                                5 <= pix_x (9 downto 5) and pix_x(9 downto 5)<=13 else

                                                                                                                                                                '0';

                                                                                                                                                                row_addr_o<= std_logic_vector(pix_y(5 downto 2));

                                                                                                                                                                bit_addr_o<= std_logic_vector(pix_x(4 downto 2));

                                                                                                                                                                with pix_x(8 downto 5) select

                                                                                                                                                                char_addr_o <=

                                                                                                                                                                "1010011" when "0101",

                                                                                                                                                                "1010000" when "0110",

                                                                                                                                                                "1010010" when "0111",

                                                                                                                                                                "1010111" when others;

                                                                                                                                                                 

                                                                                                                                                                process(score_on,logo_on,rule_on,pix_x,pix_y,font_bit,char_addr_s,char_addr_l,char_addr_r,char_addr_o,

                                                                                                                                                                row_addr_s,row_addr_l,row_addr_r,row_addr_o,

                                                                                                                                                                bit_addr_s,bit_addr_l,bit_addr_r,bit_addr_o)

                                                                                                                                                                begin

                                                                                                                                                                 

                                                                                                                                                                  text_r<='0';

                                                                                                                                                                    text_g<='1';

                                                                                                                                                                    text_b<='1';

                                                                                                                                                                    if score_on ='1' then

                                                                                                                                                                char_addr <= char_addr_s;

                                                                                                                                                                row_addr<=row_addr_s;

                                                                                                                                                                bit_addr<= bit_addr_s;

                                                                                                                                                                if font_bit='1' then

                                                                                                                                                                   text_r<='0';

                                                                                                                                                                    text_g<='0';

                                                                                                                                                                    text_b<='1';

                                                                                                                                                                 

                                                                                                                                                                    end if;

                                                                                                                                                                    else if score_on ='1' then

                                                                                                                                                                char_addr <= char_addr_r;

                                                                                                                                                                row_addr<=row_addr_r;

                                                                                                                                                                bit_addr<= bit_addr_r;

                                                                                                                                                                if font_bit='1' then

                                                                                                                                                                  text_r<='0';

                                                                                                                                                                    text_g<='0';

                                                                                                                                                                    text_b<='1';

                                                                                                                                                                 

                                                                                                                                                                    end if;

                                                                                                                                                                else if logo_on ='1' then

                                                                                                                                                                char_addr <= char_addr_l;

                                                                                                                                                                row_addr<=row_addr_l;

                                                                                                                                                                bit_addr<= bit_addr_l;

                                                                                                                                                                if font_bit='1' then

                                                                                                                                                                text_r<='0';

                                                                                                                                                                    text_g<='0';

                                                                                                                                                                    text_b<='1';

                                                                                                                                                                 

                                                                                                                                                                    end if;

                                                                                                                                                                else 

                                                                                                                                                                char_addr <= char_addr_o;

                                                                                                                                                                row_addr<=row_addr_o;

                                                                                                                                                                bit_addr<= bit_addr_o;

                                                                                                                                                                if font_bit='1' then

                                                                                                                                                                  text_r<='0';

                                                                                                                                                                    text_g<='0';

                                                                                                                                                                    text_b<='1';

                                                                                                                                                                        end if;

                                                                                                                                                                 

                                                                                                                                                                    end if;

                                                                                                                                                                 

                                                                                                                                                                end process;

                                                                                                                                                                 

                                                                                                                                                                text_on <= score_on & logo_on & rule_on & over_on;

                                                                                                                                                                -- f o n t ROM i n t e r f a c e

                                                                                                                                                                rom_addr <= char_addr & row_addr;

                                                                                                                                                                font_bit <= font_word(to_integer(unsigned(not bit_addr)));

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                end Behavioral;

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                should include font_rom file?? i have it's .vhd file ??!! is it required in other formate??

                                                                                                                                                                i want to also add vga_sync.vhd file ....should it be .vhd file??

                                                                                                                                                                snap.PNG

                                                                                                                                                                 

                                                                                                                                                                 

                                                                                                                                                                i use the referance of pong game text subsystem and want to edit vga syncronisation with it,,,,

                                                                                                                                                                  • Re: Some FPGA Beginner Questions
                                                                                                                                                                    michaelkellett

                                                                                                                                                                    Sorry Narenda, your code is pretty much incomprehensible in this form.

                                                                                                                                                                    I assume that there was some indentation and that pasting it into E14 has lost that but you also should consider the following:

                                                                                                                                                                     

                                                                                                                                                                    1) comments - if you want help with code think in terms of 1 comment for EVERY SINGLE LINE OF CODE

                                                                                                                                                                    2) never declare two things at once, lines in the editor are free !

                                                                                                                                                                    so not signal score_on,logo_on,rule_on,over_on: std_logic;

                                                                                                                                                                    but

                                                                                                                                                                    signal score_on : std_logic;               -- comment explaining what it's for

                                                                                                                                                                    signal logo_on : std_logic;                 -- another comment

                                                                                                                                                                    and so on.

                                                                                                                                                                    3) Use white space it's free

                                                                                                                                                                     

                                                                                                                                                                    so not text_b<='1';

                                                                                                                                                                    but

                                                                                                                                                                    text_b <= '1';                                   -- and every line needs a comment

                                                                                                                                                                     

                                                                                                                                                                    4) Every process should have a name

                                                                                                                                                                     

                                                                                                                                                                    Now to your question: I don't use Xilinx so I have never needed to use a block memory. I suggest that you make a little project who's sole purpose is to work out how to do this. All you need is a process to write to an address and then read from it (use a state machine). Then look up some examples: I Googled "spartan6 instantiate block ram" and found AR# 46748 - Spartan-6 FPGA Design Assistant - How to infer the use of block RAM and FIFO primitives in your HDL code which leads you to a .pdf and on page 130 you find:

                                                                                                                                                                     

                                                                                                                                                                    --

                                                                                                                                                                    -- Read-First Mode

                                                                                                                                                                    --

                                                                                                                                                                    library ieee;

                                                                                                                                                                    use ieee.std_logic_1164.all;

                                                                                                                                                                    use ieee.std_logic_unsigned.all;

                                                                                                                                                                    entity rams_01 is

                                                                                                                                                                    port (clk : in std_logic;

                                                                                                                                                                    we : in std_logic;

                                                                                                                                                                    en : in std_logic;

                                                                                                                                                                    addr : in std_logic_vector(5 downto 0);

                                                                                                                                                                    di : in std_logic_vector(15 downto 0);

                                                                                                                                                                    do : out std_logic_vector(15 downto 0));

                                                                                                                                                                    end rams_01;

                                                                                                                                                                    architecture syn of rams_01 is

                                                                                                                                                                    type ram_type is array (63 downto 0) of std_logic_vector (15 downto 0);

                                                                                                                                                                    signal RAM: ram_type;

                                                                                                                                                                    begin

                                                                                                                                                                    process (clk)

                                                                                                                                                                    begin

                                                                                                                                                                    if clk’event and clk = ’1’ then

                                                                                                                                                                    if en = ’1’ then

                                                                                                                                                                    if we = ’1’ then

                                                                                                                                                                    RAM(conv_integer(addr)) <= di;

                                                                                                                                                                    end if;

                                                                                                                                                                    do <= RAM(conv_integer(addr)) ;

                                                                                                                                                                    end if;

                                                                                                                                                                    end if;

                                                                                                                                                                    end process;

                                                                                                                                                                    end syn;

                                                                                                                                                                     

                                                                                                                                                                    (Note the evil E14 cut and paste strikes again) There are lots of examples like this - read the whole chapter !!

                                                                                                                                                                    Put this in a file of its own - give it the same name as the ram entity (in this case rams_01.vhd )

                                                                                                                                                                    Then write a top level file that works as a test bench for this - (Xilinx tools may well make a test bench for you).

                                                                                                                                                                     

                                                                                                                                                                    I can't tell how your project is constructed but it should be done with a top level file which calls up all the lower level entities and links them together - I use a graphical tool (Aldec HDL Block Diagram Editor)  to make these files but it doesn't come free with Xilinx tools. There may well be a graphical tool in the Xilinx toolset.

                                                                                                                                                                     

                                                                                                                                                                    For future help you would do better to post a .zip file of the entire project  since it gets round trying to look at formatted files in E14 editor.

                                                                                                                                                                     

                                                                                                                                                                    I know the style stuff seems tedious and nitpicking - but I assure you that now is the time to get into good habits. In 40 years+ of working on this kind of thingI have NEVER had an a problem with too many comments, but on countless occasionsI have had to waste time trying to work out what code is meant to be doing due to a lack of comments.

                                                                                                                                                                     

                                                                                                                                                                    MK

                                                                                                                                                                    1 of 1 people found this helpful
                                                                                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                                                                                        ndnaren

                                                                                                                                                                        Greeting dear !!!

                                                                                                                                                                        have read tutorial on the ram interference...and now i am going to display font on the vga but in vga synchronization circuit same were wrong..the output does not supported by my lcd(1920*1200 also support 800*600 mode) lcd goes blank and go to power saving mode in short input not supported to lcd i dont know where i am wrong so please help me figur out where is misteck(or are mistechs:-)) firt of all for vga testing project i attached vga_sync_test.vhd  ,vga_sync.vhd and ucf file vga_synnaren togather but it doesn't work all files i have atteched with this post.........secondly in second project i want to display font actully four row of 128 character of 16*8 pixels on vga so i have atteched font_gen_top.vhd    ,font_test_gen.vhd,  vga_sync.vhd,   font_rom.vhd and ucf file named font_top_gen in the project sinthsize report there is successfully 4096*8 bit rom inferred but in this also same problem that it is enable to display ..may be folt in vga _sync....my fpga board use 50mhz clk and i want to use 800*600 mode with 72hz refresh rate......i am excited to display font so please help me...:-) i think  it can noy be atteched so i just copy here...

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                        vga_sync_test:

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        library IEEE;

                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                        use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                        library UNISIM;

                                                                                                                                                                        use UNISIM.VComponents.all;

                                                                                                                                                                         

                                                                                                                                                                        entity vga_test is

                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                   sw : in  STD_LOGIC_VECTOR (2 downto 0);---switches

                                                                                                                                                                                   rgb: inout std_logic_vector(2 downto 0);

                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                   vsync : out  STD_LOGIC);

                                                                                                                                                                        end vga_test;

                                                                                                                                                                         

                                                                                                                                                                        architecture Behavioral of vga_test is

                                                                                                                                                                        signal rgb_reg:std_logic_vector(2 downto 0);

                                                                                                                                                                        signal video_on:std_logic;

                                                                                                                                                                         

                                                                                                                                                                        begin

                                                                                                                                                                        --instantiate vga sync. circuit

                                                                                                                                                                        vga_sync_unit:entity work.vga_sync

                                                                                                                                                                        port map(clk=> clk,reset=> reset,hsync=> hsync,vsync=> vsync,video_on=> video_on,pixel_x=> open,pixel_y=> open);

                                                                                                                                                                        --rgb buffer

                                                                                                                                                                        process(clk,rgb_reg)

                                                                                                                                                                        begin

                                                                                                                                                                        if reset='1' then

                                                                                                                                                                        rgb_reg<=(others=>'0');

                                                                                                                                                                        elsif(clk'event and clk='1')

                                                                                                                                                                        then rgb_reg<=sw;

                                                                                                                                                                        end if;

                                                                                                                                                                        end process;

                                                                                                                                                                        process(video_on,rgb_reg)

                                                                                                                                                                        begin

                                                                                                                                                                        if video_on='1' then

                                                                                                                                                                        rgb<=rgb_reg;

                                                                                                                                                                        else

                                                                                                                                                                        rgb<="000";

                                                                                                                                                                        end if;

                                                                                                                                                                        end process;

                                                                                                                                                                        end Behavioral;

                                                                                                                                                                         

                                                                                                                                                                        -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                         

                                                                                                                                                                        vga_sync.vhd:

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        library IEEE;

                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                        use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                        library UNISIM;

                                                                                                                                                                        use UNISIM.VComponents.all;

                                                                                                                                                                         

                                                                                                                                                                        entity vga_sync is

                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                   vsync : out  STD_LOGIC;

                                                                                                                                                                                   video_on : inout  STD_LOGIC;

                                                                                                                                                                                   pixel_x : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                   pixel_y : inout  STD_LOGIC_VECTOR (9 downto 0)

                                                                                                                                                                                   

                                                                                                                                                                                       );

                                                                                                                                                                               

                                                                                                                                                                        end vga_sync;

                                                                                                                                                                         

                                                                                                                                                                        architecture Behavioral of vga_sync is

                                                                                                                                                                         

                                                                                                                                                                        constant HD :integer := 800;-- horizontal display area

                                                                                                                                                                        constant HF :integer := 64;-- horizontal fron porch

                                                                                                                                                                        constant HB :integer := 56;-- horizontal back porch

                                                                                                                                                                        constant HR :integer := 120;-- horizontal retrace

                                                                                                                                                                        constant VD :integer := 600;-- vertical display area

                                                                                                                                                                        constant VF :integer := 23;-- vertical front porch

                                                                                                                                                                        constant VB :integer := 37;-- vertical back porch

                                                                                                                                                                        constant VR :integer := 6;-- vertical retrace

                                                                                                                                                                         

                                                                                                                                                                        --sync signals counter

                                                                                                                                                                        signal v_count_reg ,v_count_next:unsigned(9 downto 0);

                                                                                                                                                                        signal h_count_reg, h_count_next:unsigned(9 downto 0);

                                                                                                                                                                        --output buffer

                                                                                                                                                                        signal v_sync_reg,h_sync_reg:std_logic;

                                                                                                                                                                        signal v_sync_next,h_sync_next:std_logic;

                                                                                                                                                                        -- status signal

                                                                                                                                                                        signal h_end,v_end,pixel_tick:std_logic;

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        begin

                                                                                                                                                                        --regigtors..

                                                                                                                                                                        process(clk,reset)

                                                                                                                                                                        begin

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        if reset='1' then

                                                                                                                                                                        v_count_reg<=(others=>'0');

                                                                                                                                                                        h_count_reg<=(others=>'0');

                                                                                                                                                                        v_sync_reg<='0';

                                                                                                                                                                        h_sync_reg<='0';

                                                                                                                                                                        elsif (clk'event and clk='1') then

                                                                                                                                                                        v_count_reg<=v_count_next;

                                                                                                                                                                        h_count_reg<=h_count_next;

                                                                                                                                                                        v_sync_reg<=v_sync_next;

                                                                                                                                                                        h_sync_reg<=h_sync_next;

                                                                                                                                                                        end if;

                                                                                                                                                                         

                                                                                                                                                                        end process;

                                                                                                                                                                         

                                                                                                                                                                        --status

                                                                                                                                                                        h_end<=  --end of horizontal counter

                                                                                                                                                                        '1' when h_count_reg =(HD+HF+HB+HR-1)

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                        v_end<=----------end of vertical counter

                                                                                                                                                                        '1' when h_count_reg=(VD+VF+VB+VR-1)

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                         

                                                                                                                                                                        process(h_count_reg,h_count_next,h_end)

                                                                                                                                                                        begin

                                                                                                                                                                         

                                                                                                                                                                        if h_end ='1' then

                                                                                                                                                                        h_count_next<=(others=>'0');

                                                                                                                                                                        else

                                                                                                                                                                        h_count_next<= h_count_reg + 1;

                                                                                                                                                                        end if;

                                                                                                                                                                         

                                                                                                                                                                        end process;

                                                                                                                                                                         

                                                                                                                                                                        process(v_count_reg,v_count_next,h_end,v_end)

                                                                                                                                                                        begin

                                                                                                                                                                        if h_end='1' then

                                                                                                                                                                        if(v_end='1') then

                                                                                                                                                                        v_count_next<=(others=>'0');

                                                                                                                                                                        else

                                                                                                                                                                        v_count_next<=v_count_reg +1;

                                                                                                                                                                        end if;

                                                                                                                                                                        else

                                                                                                                                                                        v_count_next<=v_count_reg;

                                                                                                                                                                        end if;

                                                                                                                                                                        end process;

                                                                                                                                                                        --test

                                                                                                                                                                        --horizontal and vertical buffer to avoid the glitch

                                                                                                                                                                        h_sync_next<=

                                                                                                                                                                        '1' when (h_count_reg>=(HD+HF)) and (h_count_reg<=(HD+HF+HR-1))

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                        v_sync_next<=

                                                                                                                                                                        '1' when (v_count_reg>=(VD+VF)) and (v_count_reg<=(VD+VF+VR-1))

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                        --video on/off

                                                                                                                                                                        video_on<=

                                                                                                                                                                        '1' when (h_count_reg<HD) and (v_count_reg<VD)

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                         

                                                                                                                                                                        --output signal

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        hsync<= h_sync_reg;

                                                                                                                                                                        vsync<=v_sync_reg;

                                                                                                                                                                        pixel_x<=std_logic_vector(h_count_reg);

                                                                                                                                                                        pixel_y<=std_logic_vector(v_count_reg);

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        end Behavioral;

                                                                                                                                                                         

                                                                                                                                                                        ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        vga_synaren----ucf file

                                                                                                                                                                         

                                                                                                                                                                        NET "clk" LOC = "P126";

                                                                                                                                                                        NET "hsync" LOC = "P95";

                                                                                                                                                                        NET "vsync" LOC = "P97";

                                                                                                                                                                        NET "rgb<0>" LOC = "P100";

                                                                                                                                                                        NET "rgb<1>" LOC = "P99";

                                                                                                                                                                        NET "rgb<2>" LOC = "P98";

                                                                                                                                                                        NET "reset" LOC = "P111";

                                                                                                                                                                        NET "sw<0>" LOC ="P112";

                                                                                                                                                                        NET "sw<1>" LOC ="P15";

                                                                                                                                                                        NET "sw<2>" LOC ="P114";

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        font_test_top.vhd:

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        library IEEE;

                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                        --use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                        --library UNISIM;

                                                                                                                                                                        --use UNISIM.VComponents.all;

                                                                                                                                                                         

                                                                                                                                                                        entity font_test_top is

                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                   vsync : out  STD_LOGIC;

                                                                                                                                                                                   rgb : out  STD_LOGIC_VECTOR (2 downto 0));

                                                                                                                                                                        end font_test_top;

                                                                                                                                                                         

                                                                                                                                                                        architecture Behavioral of font_test_top is

                                                                                                                                                                         

                                                                                                                                                                        signal pixel_x: std_logic_vector(9 downto 0);

                                                                                                                                                                        signal pixel_y: std_logic_vector(9 downto 0);

                                                                                                                                                                        signal video_on:std_logic;

                                                                                                                                                                        signal rgb_reg: std_logic_vector(2 downto 0);

                                                                                                                                                                        signal rgb_next: std_logic_vector(2 downto 0);

                                                                                                                                                                         

                                                                                                                                                                        begin

                                                                                                                                                                        --------instantate vga sync ckt

                                                                                                                                                                         

                                                                                                                                                                        vga_sync_unit:entity work.vga_sync

                                                                                                                                                                        port map( clk=>clk,reset=>reset,hsync=>hsync,vsync=>vsync,video_on=>video_on,pixel_x=>

                                                                                                                                                                        pixel_x,pixel_y=>pixel_y);

                                                                                                                                                                         

                                                                                                                                                                        -----instantate fontrom--------------------

                                                                                                                                                                         

                                                                                                                                                                        font_gen_unit:entity work.font_test_gen

                                                                                                                                                                        port map(clk=>clk,video_on=>video_on,pixel_x=>pixel_x,pixel_y=>pixel_y,rgb_text=>rgb_next);

                                                                                                                                                                         

                                                                                                                                                                        -------rgb_buffer-----------------

                                                                                                                                                                         

                                                                                                                                                                        process(clk)

                                                                                                                                                                        begin

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        if (clk'event and clk='1') then

                                                                                                                                                                         

                                                                                                                                                                                

                                                                                                                                                                            rgb_reg<=rgb_next;

                                                                                                                                                                           

                                                                                                                                                                        end if;

                                                                                                                                                                         

                                                                                                                                                                        end process;

                                                                                                                                                                        rgb<=rgb_reg;

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        end Behavioral;

                                                                                                                                                                         

                                                                                                                                                                        -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        font_test_gen.vhd:

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        library IEEE;

                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                        use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                         

                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                        library UNISIM;

                                                                                                                                                                        use UNISIM.VComponents.all;

                                                                                                                                                                         

                                                                                                                                                                        entity vga_sync is

                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                   vsync : out  STD_LOGIC;

                                                                                                                                                                                   video_on : inout  STD_LOGIC;

                                                                                                                                                                                   pixel_x : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                   pixel_y : inout  STD_LOGIC_VECTOR (9 downto 0)

                                                                                                                                                                                   

                                                                                                                                                                                       );

                                                                                                                                                                               

                                                                                                                                                                        end vga_sync;

                                                                                                                                                                         

                                                                                                                                                                        architecture Behavioral of vga_sync is

                                                                                                                                                                         

                                                                                                                                                                        constant HD :integer := 800;-- horizontal display area

                                                                                                                                                                        constant HF :integer := 64;-- horizontal fron porch

                                                                                                                                                                        constant HB :integer := 56;-- horizontal back porch

                                                                                                                                                                        constant HR :integer := 120;-- horizontal retrace

                                                                                                                                                                        constant VD :integer := 600;-- vertical display area

                                                                                                                                                                        constant VF :integer := 23;-- vertical front porch

                                                                                                                                                                        constant VB :integer := 37;-- vertical back porch

                                                                                                                                                                        constant VR :integer := 6;-- vertical retrace

                                                                                                                                                                         

                                                                                                                                                                        --sync signals counter

                                                                                                                                                                        signal v_count_reg ,v_count_next:unsigned(9 downto 0);

                                                                                                                                                                        signal h_count_reg, h_count_next:unsigned(9 downto 0);

                                                                                                                                                                        --output buffer

                                                                                                                                                                        signal v_sync_reg,h_sync_reg:std_logic;

                                                                                                                                                                        signal v_sync_next,h_sync_next:std_logic;

                                                                                                                                                                        -- status signal

                                                                                                                                                                        signal h_end,v_end,pixel_tick:std_logic;

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        begin

                                                                                                                                                                        --regigtors..

                                                                                                                                                                        process(clk,reset)

                                                                                                                                                                        begin

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        if reset='1' then

                                                                                                                                                                        v_count_reg<=(others=>'0');

                                                                                                                                                                        h_count_reg<=(others=>'0');

                                                                                                                                                                        v_sync_reg<='0';

                                                                                                                                                                        h_sync_reg<='0';

                                                                                                                                                                        elsif (clk'event and clk='1') then

                                                                                                                                                                        v_count_reg<=v_count_next;

                                                                                                                                                                        h_count_reg<=h_count_next;

                                                                                                                                                                        v_sync_reg<=v_sync_next;

                                                                                                                                                                        h_sync_reg<=h_sync_next;

                                                                                                                                                                        end if;

                                                                                                                                                                         

                                                                                                                                                                        end process;

                                                                                                                                                                         

                                                                                                                                                                        --status

                                                                                                                                                                        h_end<=  --end of horizontal counter

                                                                                                                                                                        '1' when h_count_reg =(HD+HF+HB+HR-1)

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                        v_end<=----------end of vertical counter

                                                                                                                                                                        '1' when h_count_reg=(VD+VF+VB+VR-1)

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                         

                                                                                                                                                                        process(h_count_reg,h_count_next,h_end)

                                                                                                                                                                        begin

                                                                                                                                                                         

                                                                                                                                                                        if h_end ='1' then

                                                                                                                                                                        h_count_next<=(others=>'0');

                                                                                                                                                                        else

                                                                                                                                                                        h_count_next<= h_count_reg + 1;

                                                                                                                                                                        end if;

                                                                                                                                                                         

                                                                                                                                                                        end process;

                                                                                                                                                                         

                                                                                                                                                                        process(v_count_reg,v_count_next,h_end,v_end)

                                                                                                                                                                        begin

                                                                                                                                                                        if h_end='1' then

                                                                                                                                                                        if(v_end='1') then

                                                                                                                                                                        v_count_next<=(others=>'0');

                                                                                                                                                                        else

                                                                                                                                                                        v_count_next<=v_count_reg +1;

                                                                                                                                                                        end if;

                                                                                                                                                                        else

                                                                                                                                                                        v_count_next<=v_count_reg;

                                                                                                                                                                        end if;

                                                                                                                                                                        end process;

                                                                                                                                                                        --test

                                                                                                                                                                        --horizontal and vertical buffer to avoid the glitch

                                                                                                                                                                        h_sync_next<=

                                                                                                                                                                        '1' when (h_count_reg>=(HD+HF)) and (h_count_reg<=(HD+HF+HR-1))

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                        v_sync_next<=

                                                                                                                                                                        '1' when (v_count_reg>=(VD+VF)) and (v_count_reg<=(VD+VF+VR-1))

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                        --video on/off

                                                                                                                                                                        video_on<=

                                                                                                                                                                        '1' when (h_count_reg<HD) and (v_count_reg<VD)

                                                                                                                                                                        else

                                                                                                                                                                        '0';

                                                                                                                                                                         

                                                                                                                                                                        --output signal

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        hsync<= h_sync_reg;

                                                                                                                                                                        vsync<=v_sync_reg;

                                                                                                                                                                        pixel_x<=std_logic_vector(h_count_reg);

                                                                                                                                                                        pixel_y<=std_logic_vector(v_count_reg);

                                                                                                                                                                         

                                                                                                                                                                         

                                                                                                                                                                        end Behavioral;

                                                                                                                                                                          • Re: Some FPGA Beginner Questions
                                                                                                                                                                            ndnaren

                                                                                                                                                                            font_test_gen.vhd

                                                                                                                                                                             

                                                                                                                                                                            library IEEE;

                                                                                                                                                                            use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                             

                                                                                                                                                                            -- Uncomment the following library declaration if using

                                                                                                                                                                            -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                            use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                             

                                                                                                                                                                            -- Uncomment the following library declaration if instantiating

                                                                                                                                                                            -- any Xilinx primitives in this code.

                                                                                                                                                                            library UNISIM;

                                                                                                                                                                            use UNISIM.VComponents.all;

                                                                                                                                                                             

                                                                                                                                                                            entity font_test_gen is

                                                                                                                                                                                Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                       video_on : inout  STD_LOGIC;

                                                                                                                                                                                       pixel_x  : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                       pixel_y  : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                       rgb_text : out    std_logic_vector ( 2 downto 0)

                                                                                                                                                                                          );

                                                                                                                                                                            end font_test_gen;

                                                                                                                                                                             

                                                                                                                                                                            architecture Behavioral of font_test_gen is

                                                                                                                                                                             

                                                                                                                                                                            signal rom_addr:std_logic_vector(10 downto 0);

                                                                                                                                                                            signal char_addr:std_logic_vector(6 downto 0);

                                                                                                                                                                            signal row_addr:std_logic_vector(3 downto 0);

                                                                                                                                                                            signal bit_addr:std_logic_vector(2 downto 0);

                                                                                                                                                                            signal font_word:std_logic_vector(7 downto 0);

                                                                                                                                                                            signal font_bit,text_bit_on:std_logic;

                                                                                                                                                                            begin

                                                                                                                                                                            -----instantiatiate font ROM

                                                                                                                                                                            font_unit:entity work.font_rom

                                                                                                                                                                            port map( clka=>clk,addra=>rom_addr,douta=>font_word);

                                                                                                                                                                             

                                                                                                                                                                            -----fontRAM interface

                                                                                                                                                                            char_addr<=pixel_y(5 downto 4 ) & pixel_x(7 downto 3);

                                                                                                                                                                            row_addr<=pixel_y(3 downto 0);

                                                                                                                                                                            rom_addr<= char_addr & row_addr;

                                                                                                                                                                            bit_addr<=pixel_x(2 downto 0);

                                                                                                                                                                            font_bit<= font_word(to_integer(unsigned(not bit_addr)));

                                                                                                                                                                            --"on" region limited to top left corner

                                                                                                                                                                             

                                                                                                                                                                            text_bit_on<=

                                                                                                                                                                                            font_bit when pixel_x(9 downto 8)="00" and

                                                                                                                                                                                                                pixel_y(9 downto 6)="0000" else

                                                                                                                                                                                                                '0';

                                                                                                                                                                                                               

                                                                                                                                                                            ----------rgb multiplexing circuit

                                                                                                                                                                             

                                                                                                                                                                            process(video_on,font_bit,text_bit_on)

                                                                                                                                                                            begin

                                                                                                                                                                             

                                                                                                                                                                            if video_on='0' then

                                                                                                                                                                                    rgb_text<="000";--blank

                                                                                                                                                                            else

                                                                                                                                                                              if text_bit_on='1' then

                                                                                                                                                                                    rgb_text<="010";----green

                                                                                                                                                                              else

                                                                                                                                                                                    rgb_text<="000";----black

                                                                                                                                                                              end if;

                                                                                                                                                                            end if;

                                                                                                                                                                            end process; 

                                                                                                                                                                            end Behavioral;

                                                                                                                                                                            • Re: Some FPGA Beginner Questions
                                                                                                                                                                              ndnaren

                                                                                                                                                                              font_test_gen.vhd

                                                                                                                                                                               

                                                                                                                                                                              library IEEE;

                                                                                                                                                                              use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                               

                                                                                                                                                                              -- Uncomment the following library declaration if using

                                                                                                                                                                              -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                              use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                               

                                                                                                                                                                              -- Uncomment the following library declaration if instantiating

                                                                                                                                                                              -- any Xilinx primitives in this code.

                                                                                                                                                                              library UNISIM;

                                                                                                                                                                              use UNISIM.VComponents.all;

                                                                                                                                                                               

                                                                                                                                                                              entity font_test_gen is

                                                                                                                                                                                  Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                         video_on : inout  STD_LOGIC;

                                                                                                                                                                                         pixel_x  : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                         pixel_y  : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                         rgb_text : out    std_logic_vector ( 2 downto 0)

                                                                                                                                                                                            );

                                                                                                                                                                              end font_test_gen;

                                                                                                                                                                               

                                                                                                                                                                              architecture Behavioral of font_test_gen is

                                                                                                                                                                               

                                                                                                                                                                              signal rom_addr:std_logic_vector(10 downto 0);

                                                                                                                                                                              signal char_addr:std_logic_vector(6 downto 0);

                                                                                                                                                                              signal row_addr:std_logic_vector(3 downto 0);

                                                                                                                                                                              signal bit_addr:std_logic_vector(2 downto 0);

                                                                                                                                                                              signal font_word:std_logic_vector(7 downto 0);

                                                                                                                                                                              signal font_bit,text_bit_on:std_logic;

                                                                                                                                                                              begin

                                                                                                                                                                              -----instantiatiate font ROM

                                                                                                                                                                              font_unit:entity work.font_rom

                                                                                                                                                                              port map( clka=>clk,addra=>rom_addr,douta=>font_word);

                                                                                                                                                                               

                                                                                                                                                                              -----fontRAM interface

                                                                                                                                                                              char_addr<=pixel_y(5 downto 4 ) & pixel_x(7 downto 3);

                                                                                                                                                                              row_addr<=pixel_y(3 downto 0);

                                                                                                                                                                              rom_addr<= char_addr & row_addr;

                                                                                                                                                                              bit_addr<=pixel_x(2 downto 0);

                                                                                                                                                                              font_bit<= font_word(to_integer(unsigned(not bit_addr)));

                                                                                                                                                                              --"on" region limited to top left corner

                                                                                                                                                                               

                                                                                                                                                                              text_bit_on<=

                                                                                                                                                                                              font_bit when pixel_x(9 downto 8)="00" and

                                                                                                                                                                                                                  pixel_y(9 downto 6)="0000" else

                                                                                                                                                                                                                  '0';

                                                                                                                                                                                                                 

                                                                                                                                                                              ----------rgb multiplexing circuit

                                                                                                                                                                               

                                                                                                                                                                              process(video_on,font_bit,text_bit_on)

                                                                                                                                                                              begin

                                                                                                                                                                               

                                                                                                                                                                              if video_on='0' then

                                                                                                                                                                                      rgb_text<="000";--blank

                                                                                                                                                                              else

                                                                                                                                                                                if text_bit_on='1' then

                                                                                                                                                                                      rgb_text<="010";----green

                                                                                                                                                                                else

                                                                                                                                                                                      rgb_text<="000";----black

                                                                                                                                                                                end if;

                                                                                                                                                                              end if;

                                                                                                                                                                              end process; 

                                                                                                                                                                              end Behavioral;

                                                                                                                                                                                • Re: Some FPGA Beginner Questions
                                                                                                                                                                                  ndnaren

                                                                                                                                                                                  fot_rom.vhd

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                  library IEEE;

                                                                                                                                                                                  use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                                   

                                                                                                                                                                                  -- Uncomment the following library declaration if using

                                                                                                                                                                                  -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                                  use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                                   

                                                                                                                                                                                  -- Uncomment the following library declaration if instantiating

                                                                                                                                                                                  -- any Xilinx primitives in this code.

                                                                                                                                                                                  library UNISIM;

                                                                                                                                                                                  use UNISIM.VComponents.all;

                                                                                                                                                                                   

                                                                                                                                                                                  entity font_rom is

                                                                                                                                                                                      Port ( addra : in  STD_LOGIC_VECTOR (10 downto 0);

                                                                                                                                                                                             douta : inout  STD_LOGIC_VECTOR (7 downto 0);

                                                                                                                                                                                             clka : in  STD_LOGIC);

                                                                                                                                                                                  end font_rom;

                                                                                                                                                                                   

                                                                                                                                                                                  architecture Behavioral of font_rom is

                                                                                                                                                                                   

                                                                                                                                                                                     constant ADDR_WIDTH: integer:=11;

                                                                                                                                                                                     constant DATA_WIDTH: integer:=8;

                                                                                                                                                                                     signal addr_reg: std_logic_vector(ADDR_WIDTH-1 downto 0);

                                                                                                                                                                                     type rom_type is array (0 to 2**ADDR_WIDTH-1)

                                                                                                                                                                                          of std_logic_vector(DATA_WIDTH-1 downto 0);

                                                                                                                                                                                     -- ROM definition

                                                                                                                                                                                  constant ROM: rom_type:=(   -- 2^11-by-8

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x01

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111110", -- 2  ******

                                                                                                                                                                                     "10000001", -- 3 *      *

                                                                                                                                                                                     "10100101", -- 4 * *  * *

                                                                                                                                                                                     "10000001", -- 5 *      *

                                                                                                                                                                                     "10000001", -- 6 *      *

                                                                                                                                                                                     "10111101", -- 7 * **** *

                                                                                                                                                                                     "10011001", -- 8 *  **  *

                                                                                                                                                                                     "10000001", -- 9 *      *

                                                                                                                                                                                     "10000001", -- a *      *

                                                                                                                                                                                     "01111110", -- b  ******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x02

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111110", -- 2  ******

                                                                                                                                                                                     "11111111", -- 3 ********

                                                                                                                                                                                     "11011011", -- 4 ** ** **

                                                                                                                                                                                     "11111111", -- 5 ********

                                                                                                                                                                                     "11111111", -- 6 ********

                                                                                                                                                                                     "11000011", -- 7 **    **

                                                                                                                                                                                     "11100111", -- 8 ***  ***

                                                                                                                                                                                     "11111111", -- 9 ********

                                                                                                                                                                                     "11111111", -- a ********

                                                                                                                                                                                     "01111110", -- b  ******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x03

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "01101100", -- 4  ** **

                                                                                                                                                                                     "11111110", -- 5 *******

                                                                                                                                                                                     "11111110", -- 6 *******

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "11111110", -- 8 *******

                                                                                                                                                                                     "01111100", -- 9  *****

                                                                                                                                                                                     "00111000", -- a   ***

                                                                                                                                                                                     "00010000", -- b    *

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x04

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00010000", -- 4    *

                                                                                                                                                                                     "00111000", -- 5   ***

                                                                                                                                                                                     "01111100", -- 6  *****

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "01111100", -- 8  *****

                                                                                                                                                                                     "00111000", -- 9   ***

                                                                                                                                                                                     "00010000", -- a    *

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x05

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00111100", -- 4   ****

                                                                                                                                                                                     "00111100", -- 5   ****

                                                                                                                                                                                     "11100111", -- 6 ***  ***

                                                                                                                                                                                     "11100111", -- 7 ***  ***

                                                                                                                                                                                     "11100111", -- 8 ***  ***

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x06

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00111100", -- 4   ****

                                                                                                                                                                                     "01111110", -- 5  ******

                                                                                                                                                                                     "11111111", -- 6 ********

                                                                                                                                                                                     "11111111", -- 7 ********

                                                                                                                                                                                     "01111110", -- 8  ******

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x07

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00111100", -- 7   ****

                                                                                                                                                                                     "00111100", -- 8   ****

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x08

                                                                                                                                                                                     "11111111", -- 0 ********

                                                                                                                                                                                     "11111111", -- 1 ********

                                                                                                                                                                                     "11111111", -- 2 ********

                                                                                                                                                                                     "11111111", -- 3 ********

                                                                                                                                                                                     "11111111", -- 4 ********

                                                                                                                                                                                     "11111111", -- 5 ********

                                                                                                                                                                                     "11100111", -- 6 ***  ***

                                                                                                                                                                                     "11000011", -- 7 **    **

                                                                                                                                                                                     "11000011", -- 8 **    **

                                                                                                                                                                                     "11100111", -- 9 ***  ***

                                                                                                                                                                                     "11111111", -- a ********

                                                                                                                                                                                     "11111111", -- b ********

                                                                                                                                                                                     "11111111", -- c ********

                                                                                                                                                                                     "11111111", -- d ********

                                                                                                                                                                                     "11111111", -- e ********

                                                                                                                                                                                     "11111111", -- f ********

                                                                                                                                                                                     -- code x09

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00111100", -- 5   ****

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "01000010", -- 7  *    *

                                                                                                                                                                                     "01000010", -- 8  *    *

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "00111100", -- a   ****

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x0a

                                                                                                                                                                                     "11111111", -- 0 ********

                                                                                                                                                                                     "11111111", -- 1 ********

                                                                                                                                                                                     "11111111", -- 2 ********

                                                                                                                                                                                     "11111111", -- 3 ********

                                                                                                                                                                                     "11111111", -- 4 ********

                                                                                                                                                                                     "11000011", -- 5 **    **

                                                                                                                                                                                     "10011001", -- 6 *  **  *

                                                                                                                                                                                     "10111101", -- 7 * **** *

                                                                                                                                                                                     "10111101", -- 8 * **** *

                                                                                                                                                                                     "10011001", -- 9 *  **  *

                                                                                                                                                                                     "11000011", -- a **    **

                                                                                                                                                                                     "11111111", -- b ********

                                                                                                                                                                                     "11111111", -- c ********

                                                                                                                                                                                     "11111111", -- d ********

                                                                                                                                                                                     "11111111", -- e ********

                                                                                                                                                                                     "11111111", -- f ********

                                                                                                                                                                                     -- code x0b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011110", -- 2    ****

                                                                                                                                                                                     "00001110", -- 3     ***

                                                                                                                                                                                     "00011010", -- 4    ** *

                                                                                                                                                                                     "00110010", -- 5   **  *

                                                                                                                                                                                     "01111000", -- 6  ****

                                                                                                                                                                                     "11001100", -- 7 **  **

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01111000", -- b  ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x0c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111100", -- 2   ****

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "00111100", -- 7   ****

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "01111110", -- 9  ******

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x0d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111111", -- 2   ******

                                                                                                                                                                                     "00110011", -- 3   **  **

                                                                                                                                                                                     "00111111", -- 4   ******

                                                                                                                                                                                     "00110000", -- 5   **

                                                                                                                                                                                     "00110000", -- 6   **

                                                                                                                                                                                     "00110000", -- 7   **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "01110000", -- 9  ***

                                                                                                                                                                                     "11110000", -- a ****

                                                                                                                                                                                     "11100000", -- b ***

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x0e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111111", -- 2  *******

                                                                                                                                                                                     "01100011", -- 3  **   **

                                                                                                                                                                                     "01111111", -- 4  *******

                                                                                                                                                                                     "01100011", -- 5  **   **

                                                                                                                                                                                     "01100011", -- 6  **   **

                                                                                                                                                                                     "01100011", -- 7  **   **

                                                                                                                                                                                     "01100011", -- 8  **   **

                                                                                                                                                                                     "01100111", -- 9  **  ***

                                                                                                                                                                                     "11100111", -- a ***  ***

                                                                                                                                                                                     "11100110", -- b ***  **

                                                                                                                                                                                     "11000000", -- c **

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x0f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "11011011", -- 5 ** ** **

                                                                                                                                                                                     "00111100", -- 6   ****

                                                                                                                                                                                     "11100111", -- 7 ***  ***

                                                                                                                                                                                     "00111100", -- 8   ****

                                                                                                                                                                                     "11011011", -- 9 ** ** **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x10

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "10000000", -- 1 *

                                                                                                                                                                                     "11000000", -- 2 **

                                                                                                                                                                                     "11100000", -- 3 ***

                                                                                                                                                                                     "11110000", -- 4 ****

                                                                                                                                                                                     "11111000", -- 5 *****

                                                                                                                                                                                     "11111110", -- 6 *******

                                                                                                                                                                                     "11111000", -- 7 *****

                                                                                                                                                                                     "11110000", -- 8 ****

                                                                                                                                                                                     "11100000", -- 9 ***

                                                                                                                                                                                     "11000000", -- a **

                                                                                                                                                                                     "10000000", -- b *

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x11

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000010", -- 1       *

                                                                                                                                                                                     "00000110", -- 2      **

                                                                                                                                                                                     "00001110", -- 3     ***

                                                                                                                                                                                     "00011110", -- 4    ****

                                                                                                                                                                                     "00111110", -- 5   *****

                                                                                                                                                                                     "11111110", -- 6 *******

                                                                                                                                                                                     "00111110", -- 7   *****

                                                                                                                                                                                     "00011110", -- 8    ****

                                                                                                                                                                                     "00001110", -- 9     ***

                                                                                                                                                                                     "00000110", -- a      **

                                                                                                                                                                                     "00000010", -- b       *

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x12

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00111100", -- 3   ****

                                                                                                                                                                                     "01111110", -- 4  ******

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "01111110", -- 8  ******

                                                                                                                                                                                     "00111100", -- 9   ****

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x13

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01100110", -- 2  **  **

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "01100110", -- b  **  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x14

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111111", -- 2  *******

                                                                                                                                                                                     "11011011", -- 3 ** ** **

                                                                                                                                                                                     "11011011", -- 4 ** ** **

                                                                                                                                                                                     "11011011", -- 5 ** ** **

                                                                                                                                                                                     "01111011", -- 6  **** **

                                                                                                                                                                                     "00011011", -- 7    ** **

                                                                                                                                                                                     "00011011", -- 8    ** **

                                                                                                                                                                                     "00011011", -- 9    ** **

                                                                                                                                                                                     "00011011", -- a    ** **

                                                                                                                                                                                     "00011011", -- b    ** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x15

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "01111100", -- 1  *****

                                                                                                                                                                                     "11000110", -- 2 **   **

                                                                                                                                                                                     "01100000", -- 3  **

                                                                                                                                                                                     "00111000", -- 4   ***

                                                                                                                                                                                     "01101100", -- 5  ** **

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "01101100", -- 8  ** **

                                                                                                                                                                                     "00111000", -- 9   ***

                                                                                                                                                                                     "00001100", -- a     **

                                                                                                                                                                                     "11000110", -- b **   **

                                                                                                                                                                                     "01111100", -- c  *****

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x16

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "11111110", -- 8 *******

                                                                                                                                                                                     "11111110", -- 9 *******

                                                                                                                                                                                     "11111110", -- a *******

                                                                                                                                                                                     "11111110", -- b *******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x17

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00111100", -- 3   ****

                                                                                                                                                                                     "01111110", -- 4  ******

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "01111110", -- 8  ******

                                                                                                                                                                                     "00111100", -- 9   ****

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "01111110", -- b  ******

                                                                                                                                                                                     "00110000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x18

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00111100", -- 3   ****

                                                                                                                                                                                     "01111110", -- 4  ******

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x19

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "01111110", -- 9  ******

                                                                                                                                                                                     "00111100", -- a   ****

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x1a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "00001100", -- 8     **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x1b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00110000", -- 5   **

                                                                                                                                                                                     "01100000", -- 6  **

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "00110000", -- 9   **

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x1c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "11000000", -- 6 **

                                                                                                                                                                                     "11000000", -- 7 **

                                                                                                                                                                                     "11000000", -- 8 **

                                                                                                                                                                                     "11111110", -- 9 *******

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x1d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00100100", -- 5   *  *

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "11111111", -- 7 ********

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "00100100", -- 9   *  *

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x1e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00010000", -- 4    *

                                                                                                                                                                                     "00111000", -- 5   ***

                                                                                                                                                                                     "00111000", -- 6   ***

                                                                                                                                                                                     "01111100", -- 7  *****

                                                                                                                                                                                     "01111100", -- 8  *****

                                                                                                                                                                                     "11111110", -- 9 *******

                                                                                                                                                                                     "11111110", -- a *******

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x1f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "11111110", -- 4 *******

                                                                                                                                                                                     "11111110", -- 5 *******

                                                                                                                                                                                     "01111100", -- 6  *****

                                                                                                                                                                                     "01111100", -- 7  *****

                                                                                                                                                                                     "00111000", -- 8   ***

                                                                                                                                                                                     "00111000", -- 9   ***

                                                                                                                                                                                     "00010000", -- a    *

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x20

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x21

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00111100", -- 3   ****

                                                                                                                                                                                     "00111100", -- 4   ****

                                                                                                                                                                                     "00111100", -- 5   ****

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x22

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "01100110", -- 1  **  **

                                                                                                                                                                                     "01100110", -- 2  **  **

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "00100100", -- 4   *  *

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x23

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "01101100", -- 3  ** **

                                                                                                                                                                                     "01101100", -- 4  ** **

                                                                                                                                                                                     "11111110", -- 5 *******

                                                                                                                                                                                     "01101100", -- 6  ** **

                                                                                                                                                                                     "01101100", -- 7  ** **

                                                                                                                                                                                     "01101100", -- 8  ** **

                                                                                                                                                                                     "11111110", -- 9 *******

                                                                                                                                                                                     "01101100", -- a  ** **

                                                                                                                                                                                     "01101100", -- b  ** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x24

                                                                                                                                                                                     "00011000", -- 0     **

                                                                                                                                                                                     "00011000", -- 1     **

                                                                                                                                                                                     "01111100", -- 2   *****

                                                                                                                                                                                     "11000110", -- 3  **   **

                                                                                                                                                                                     "11000010", -- 4  **    *

                                                                                                                                                                                     "11000000", -- 5  **

                                                                                                                                                                                     "01111100", -- 6   *****

                                                                                                                                                                                     "00000110", -- 7       **

                                                                                                                                                                                     "00000110", -- 8       **

                                                                                                                                                                                     "10000110", -- 9  *    **

                                                                                                                                                                                     "11000110", -- a  **   **

                                                                                                                                                                                     "01111100", -- b   *****

                                                                                                                                                                                     "00011000", -- c     **

                                                                                                                                                                                     "00011000", -- d     **

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x25

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "11000010", -- 4 **    *

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "10000110", -- b *    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x26

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111000", -- 2   ***

                                                                                                                                                                                     "01101100", -- 3  ** **

                                                                                                                                                                                     "01101100", -- 4  ** **

                                                                                                                                                                                     "00111000", -- 5   ***

                                                                                                                                                                                     "01110110", -- 6  *** **

                                                                                                                                                                                     "11011100", -- 7 ** ***

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01110110", -- b  *** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x27

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00110000", -- 1   **

                                                                                                                                                                                     "00110000", -- 2   **

                                                                                                                                                                                     "00110000", -- 3   **

                                                                                                                                                                                     "01100000", -- 4  **

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x28

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00001100", -- 2     **

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00110000", -- 4   **

                                                                                                                                                                                     "00110000", -- 5   **

                                                                                                                                                                                     "00110000", -- 6   **

                                                                                                                                                                                     "00110000", -- 7   **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "00110000", -- 9   **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00001100", -- b     **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x29

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00110000", -- 2   **

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00001100", -- 4     **

                                                                                                                                                                                     "00001100", -- 5     **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00001100", -- 7     **

                                                                                                                                                                                     "00001100", -- 8     **

                                                                                                                                                                                     "00001100", -- 9     **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00110000", -- b   **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x2a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "00111100", -- 6   ****

                                                                                                                                                                                     "11111111", -- 7 ********

                                                                                                                                                                                     "00111100", -- 8   ****

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x2b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "01111110", -- 7  ******

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x2c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00110000", -- c   **

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x2d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "01111110", -- 7  ******

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x2e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x2f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000010", -- 4       *

                                                                                                                                                                                     "00000110", -- 5      **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "11000000", -- a **

                                                                                                                                                                                     "10000000", -- b *

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x30

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11001110", -- 5 **  ***

                                                                                                                                                                                     "11011110", -- 6 ** ****

                                                                                                                                                                                     "11110110", -- 7 **** **

                                                                                                                                                                                     "11100110", -- 8 ***  **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x31

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2

                                                                                                                                                                                     "00111000", -- 3

                                                                                                                                                                                     "01111000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5   ***

                                                                                                                                                                                     "00011000", -- 6  ****

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "01111110", -- b    **

                                                                                                                                                                                     "00000000", -- c    **

                                                                                                                                                                                     "00000000", -- d  ******

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x32

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "00000110", -- 4      **

                                                                                                                                                                                     "00001100", -- 5     **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00110000", -- 7   **

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "11000000", -- 9 **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "11111110", -- b *******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x33

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "00000110", -- 4      **

                                                                                                                                                                                     "00000110", -- 5      **

                                                                                                                                                                                     "00111100", -- 6   ****

                                                                                                                                                                                     "00000110", -- 7      **

                                                                                                                                                                                     "00000110", -- 8      **

                                                                                                                                                                                     "00000110", -- 9      **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x34

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00001100", -- 2     **

                                                                                                                                                                                     "00011100", -- 3    ***

                                                                                                                                                                                     "00111100", -- 4   ****

                                                                                                                                                                                     "01101100", -- 5  ** **

                                                                                                                                                                                     "11001100", -- 6 **  **

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "00001100", -- 8     **

                                                                                                                                                                                     "00001100", -- 9     **

                                                                                                                                                                                     "00001100", -- a     **

                                                                                                                                                                                     "00011110", -- b    ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x35

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111110", -- 2 *******

                                                                                                                                                                                     "11000000", -- 3 **

                                                                                                                                                                                     "11000000", -- 4 **

                                                                                                                                                                                     "11000000", -- 5 **

                                                                                                                                                                                     "11111100", -- 6 ******

                                                                                                                                                                                     "00000110", -- 7      **

                                                                                                                                                                                     "00000110", -- 8      **

                                                                                                                                                                                     "00000110", -- 9      **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x36

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111000", -- 2   ***

                                                                                                                                                                                     "01100000", -- 3  **

                                                                                                                                                                                     "11000000", -- 4 **

                                                                                                                                                                                     "11000000", -- 5 **

                                                                                                                                                                                     "11111100", -- 6 ******

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x37

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111110", -- 2 *******

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "00000110", -- 4      **

                                                                                                                                                                                     "00000110", -- 5      **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "00110000", -- 9   **

                                                                                                                                                                                     "00110000", -- a   **

                                                                                                                                                                                     "00110000", -- b   **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x38

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "01111100", -- 6  *****

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x39

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "01111110", -- 6  ******

                                                                                                                                                                                     "00000110", -- 7      **

                                                                                                                                                                                     "00000110", -- 8      **

                                                                                                                                                                                     "00000110", -- 9      **

                                                                                                                                                                                     "00001100", -- a     **

                                                                                                                                                                                     "01111000", -- b  ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x3a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x3b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00110000", -- b   **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x3c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000110", -- 3      **

                                                                                                                                                                                     "00001100", -- 4     **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00110000", -- 6   **

                                                                                                                                                                                     "01100000", -- 7  **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00001100", -- a     **

                                                                                                                                                                                     "00000110", -- b      **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x3d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01111110", -- 5  ******

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "01111110", -- 8  ******

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x3e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "01100000", -- 3  **

                                                                                                                                                                                     "00110000", -- 4   **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00000110", -- 7      **

                                                                                                                                                                                     "00001100", -- 8     **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00110000", -- a   **

                                                                                                                                                                                     "01100000", -- b  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x3f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "00001100", -- 5     **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x40

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11011110", -- 6 ** ****

                                                                                                                                                                                     "11011110", -- 7 ** ****

                                                                                                                                                                                     "11011110", -- 8 ** ****

                                                                                                                                                                                     "11011100", -- 9 ** ***

                                                                                                                                                                                     "11000000", -- a **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x41

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00010000", -- 2    *

                                                                                                                                                                                     "00111000", -- 3   ***

                                                                                                                                                                                     "01101100", -- 4  ** **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "11000110", -- b **   **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x42

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111100", -- 2 ******

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01111100", -- 6  *****

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11111100", -- b ******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x43

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111100", -- 2   ****

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "11000010", -- 4 **    *

                                                                                                                                                                                     "11000000", -- 5 **

                                                                                                                                                                                     "11000000", -- 6 **

                                                                                                                                                                                     "11000000", -- 7 **

                                                                                                                                                                                     "11000000", -- 8 **

                                                                                                                                                                                     "11000010", -- 9 **    *

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x44

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111000", -- 2 *****

                                                                                                                                                                                     "01101100", -- 3  ** **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01101100", -- a  ** **

                                                                                                                                                                                     "11111000", -- b *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x45

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111110", -- 2 *******

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100010", -- 4  **   *

                                                                                                                                                                                     "01101000", -- 5  ** *

                                                                                                                                                                                     "01111000", -- 6  ****

                                                                                                                                                                                     "01101000", -- 7  ** *

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "01100010", -- 9  **   *

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11111110", -- b *******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x46

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111110", -- 2 *******

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100010", -- 4  **   *

                                                                                                                                                                                     "01101000", -- 5  ** *

                                                                                                                                                                                     "01111000", -- 6  ****

                                                                                                                                                                                     "01101000", -- 7  ** *

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "01100000", -- a  **

                                                                                                                                                                                     "11110000", -- b ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x47

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111100", -- 2   ****

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "11000010", -- 4 **    *

                                                                                                                                                                                     "11000000", -- 5 **

                                                                                                                                                                                     "11000000", -- 6 **

                                                                                                                                                                                     "11011110", -- 7 ** ****

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "00111010", -- b   *** *

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x48

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000110", -- 2 **   **

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11111110", -- 6 *******

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "11000110", -- b **   **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x49

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111100", -- 2   ****

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x4a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011110", -- 2    ****

                                                                                                                                                                                     "00001100", -- 3     **

                                                                                                                                                                                     "00001100", -- 4     **

                                                                                                                                                                                     "00001100", -- 5     **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00001100", -- 7     **

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01111000", -- b  ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x4b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11100110", -- 2 ***  **

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01101100", -- 5  ** **

                                                                                                                                                                                     "01111000", -- 6  ****

                                                                                                                                                                                     "01111000", -- 7  ****

                                                                                                                                                                                     "01101100", -- 8  ** **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11100110", -- b ***  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x4c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11110000", -- 2 ****

                                                                                                                                                                                     "01100000", -- 3  **

                                                                                                                                                                                     "01100000", -- 4  **

                                                                                                                                                                                     "01100000", -- 5  **

                                                                                                                                                                                     "01100000", -- 6  **

                                                                                                                                                                                     "01100000", -- 7  **

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "01100010", -- 9  **   *

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11111110", -- b *******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x4d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000011", -- 2 **    **

                                                                                                                                                                                     "11100111", -- 3 ***  ***

                                                                                                                                                                                     "11111111", -- 4 ********

                                                                                                                                                                                     "11111111", -- 5 ********

                                                                                                                                                                                     "11011011", -- 6 ** ** **

                                                                                                                                                                                     "11000011", -- 7 **    **

                                                                                                                                                                                     "11000011", -- 8 **    **

                                                                                                                                                                                     "11000011", -- 9 **    **

                                                                                                                                                                                     "11000011", -- a **    **

                                                                                                                                                                                     "11000011", -- b **    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x4e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000110", -- 2 **   **

                                                                                                                                                                                     "11100110", -- 3 ***  **

                                                                                                                                                                                     "11110110", -- 4 **** **

                                                                                                                                                                                     "11111110", -- 5 *******

                                                                                                                                                                                     "11011110", -- 6 ** ****

                                                                                                                                                                                     "11001110", -- 7 **  ***

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "11000110", -- b **   **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x4f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x50

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111100", -- 2 ******

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01111100", -- 6  *****

                                                                                                                                                                                     "01100000", -- 7  **

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "01100000", -- a  **

                                                                                                                                                                                     "11110000", -- b ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x510

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11010110", -- 9 ** * **

                                                                                                                                                                                     "11011110", -- a ** ****

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00001100", -- c     **

                                                                                                                                                                                     "00001110", -- d     ***

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x52

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111100", -- 2 ******

                                                                                                                                                                                     "01100110", -- 3  **  **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01111100", -- 6  *****

                                                                                                                                                                                     "01101100", -- 7  ** **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11100110", -- b ***  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x53

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01111100", -- 2  *****

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "01100000", -- 5  **

                                                                                                                                                                                     "00111000", -- 6   ***

                                                                                                                                                                                     "00001100", -- 7     **

                                                                                                                                                                                     "00000110", -- 8      **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x54

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111111", -- 2 ********

                                                                                                                                                                                     "11011011", -- 3 ** ** **

                                                                                                                                                                                     "10011001", -- 4 *  **  *

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x55

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000110", -- 2 **   **

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "11000110", -- 4 **   **

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x56

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000011", -- 2 **    **

                                                                                                                                                                                     "11000011", -- 3 **    **

                                                                                                                                                                                     "11000011", -- 4 **    **

                                                                                                                                                                                     "11000011", -- 5 **    **

                                                                                                                                                                                     "11000011", -- 6 **    **

                                                                                                                                                                                     "11000011", -- 7 **    **

                                                                                                                                                                                     "11000011", -- 8 **    **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "00111100", -- a   ****

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x57

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000011", -- 2 **    **

                                                                                                                                                                                     "11000011", -- 3 **    **

                                                                                                                                                                                     "11000011", -- 4 **    **

                                                                                                                                                                                     "11000011", -- 5 **    **

                                                                                                                                                                                     "11000011", -- 6 **    **

                                                                                                                                                                                     "11011011", -- 7 ** ** **

                                                                                                                                                                                     "11011011", -- 8 ** ** **

                                                                                                                                                                                     "11111111", -- 9 ********

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "01100110", -- b  **  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                   

                                                                                                                                                                                     -- code x58

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000011", -- 2 **    **

                                                                                                                                                                                     "11000011", -- 3 **    **

                                                                                                                                                                                     "01100110", -- 4  **  **

                                                                                                                                                                                     "00111100", -- 5   ****

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00111100", -- 8   ****

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "11000011", -- a **    **

                                                                                                                                                                                     "11000011", -- b **    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x59

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11000011", -- 2 **    **

                                                                                                                                                                                     "11000011", -- 3 **    **

                                                                                                                                                                                     "11000011", -- 4 **    **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "00111100", -- 6   ****

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x5a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11111111", -- 2 ********

                                                                                                                                                                                     "11000011", -- 3 **    **

                                                                                                                                                                                     "10000110", -- 4 *    **

                                                                                                                                                                                     "00001100", -- 5     **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00110000", -- 7   **

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "11000001", -- 9 **     *

                                                                                                                                                                                     "11000011", -- a **    **

                                                                                                                                                                                     "11111111", -- b ********

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x5b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111100", -- 2   ****

                                                                                                                                                                                     "00110000", -- 3   **

                                                                                                                                                                                     "00110000", -- 4   **

                                                                                                                                                                                     "00110000", -- 5   **

                                                                                                                                                                                     "00110000", -- 6   **

                                                                                                                                                                                     "00110000", -- 7   **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "00110000", -- 9   **

                                                                                                                                                                                     "00110000", -- a   **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x5c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "10000000", -- 3 *

                                                                                                                                                                                     "11000000", -- 4 **

                                                                                                                                                                                     "11100000", -- 5 ***

                                                                                                                                                                                     "01110000", -- 6  ***

                                                                                                                                                                                     "00111000", -- 7   ***

                                                                                                                                                                                     "00011100", -- 8    ***

                                                                                                                                                                                     "00001110", -- 9     ***

                                                                                                                                                                                     "00000110", -- a      **

                                                                                                                                                                                     "00000010", -- b       *

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x5d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111100", -- 2   ****

                                                                                                                                                                                     "00001100", -- 3     **

                                                                                                                                                                                     "00001100", -- 4     **

                                                                                                                                                                                     "00001100", -- 5     **

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "00001100", -- 7     **

                                                                                                                                                                                     "00001100", -- 8     **

                                                                                                                                                                                     "00001100", -- 9     **

                                                                                                                                                                                     "00001100", -- a     **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x5e

                                                                                                                                                                                     "00010000", -- 0    *

                                                                                                                                                                                     "00111000", -- 1   ***

                                                                                                                                                                                     "01101100", -- 2  ** **

                                                                                                                                                                                     "11000110", -- 3 **   **

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x5f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "11111111", -- d ********

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x60

                                                                                                                                                                                     "00110000", -- 0   **

                                                                                                                                                                                     "00110000", -- 1   **

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x61

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01111000", -- 5  ****

                                                                                                                                                                                     "00001100", -- 6     **

                                                                                                                                                                                     "01111100", -- 7  *****

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01110110", -- b  *** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x62

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11100000", -- 2  ***

                                                                                                                                                                                     "01100000", -- 3   **

                                                                                                                                                                                     "01100000", -- 4   **

                                                                                                                                                                                     "01111000", -- 5   ****

                                                                                                                                                                                     "01101100", -- 6   ** **

                                                                                                                                                                                     "01100110", -- 7   **  **

                                                                                                                                                                                     "01100110", -- 8   **  **

                                                                                                                                                                                     "01100110", -- 9   **  **

                                                                                                                                                                                     "01100110", -- a   **  **

                                                                                                                                                                                     "01111100", -- b   *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x63

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01111100", -- 5  *****

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000000", -- 7 **

                                                                                                                                                                                     "11000000", -- 8 **

                                                                                                                                                                                     "11000000", -- 9 **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x64

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011100", -- 2    ***

                                                                                                                                                                                     "00001100", -- 3     **

                                                                                                                                                                                     "00001100", -- 4     **

                                                                                                                                                                                     "00111100", -- 5   ****

                                                                                                                                                                                     "01101100", -- 6  ** **

                                                                                                                                                                                     "11001100", -- 7 **  **

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01110110", -- b  *** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x65

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01111100", -- 5  *****

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11111110", -- 7 *******

                                                                                                                                                                                     "11000000", -- 8 **

                                                                                                                                                                                     "11000000", -- 9 **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x66

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111000", -- 2   ***

                                                                                                                                                                                     "01101100", -- 3  ** **

                                                                                                                                                                                     "01100100", -- 4  **  *

                                                                                                                                                                                     "01100000", -- 5  **

                                                                                                                                                                                     "11110000", -- 6 ****

                                                                                                                                                                                     "01100000", -- 7  **

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "01100000", -- a  **

                                                                                                                                                                                     "11110000", -- b ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x67

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01110110", -- 5  *** **

                                                                                                                                                                                     "11001100", -- 6 **  **

                                                                                                                                                                                     "11001100", -- 7 **  **

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00001100", -- c     **

                                                                                                                                                                                     "11001100", -- d **  **

                                                                                                                                                                                     "01111000", -- e  ****

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x68

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11100000", -- 2 ***

                                                                                                                                                                                     "01100000", -- 3  **

                                                                                                                                                                                     "01100000", -- 4  **

                                                                                                                                                                                     "01101100", -- 5  ** **

                                                                                                                                                                                     "01110110", -- 6  *** **

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11100110", -- b ***  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x69

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00111000", -- 5   ***

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x6a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000110", -- 2      **

                                                                                                                                                                                     "00000110", -- 3      **

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00001110", -- 5     ***

                                                                                                                                                                                     "00000110", -- 6      **

                                                                                                                                                                                     "00000110", -- 7      **

                                                                                                                                                                                     "00000110", -- 8      **

                                                                                                                                                                                     "00000110", -- 9      **

                                                                                                                                                                                     "00000110", -- a      **

                                                                                                                                                                                     "00000110", -- b      **

                                                                                                                                                                                     "01100110", -- c  **  **

                                                                                                                                                                                     "01100110", -- d  **  **

                                                                                                                                                                                     "00111100", -- e   ****

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x6b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "11100000", -- 2 ***

                                                                                                                                                                                     "01100000", -- 3  **

                                                                                                                                                                                     "01100000", -- 4  **

                                                                                                                                                                                     "01100110", -- 5  **  **

                                                                                                                                                                                     "01101100", -- 6  ** **

                                                                                                                                                                                     "01111000", -- 7  ****

                                                                                                                                                                                     "01111000", -- 8  ****

                                                                                                                                                                                     "01101100", -- 9  ** **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11100110", -- b ***  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x6c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00111000", -- 2   ***

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00011000", -- 6    **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00111100", -- b   ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x6d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11100110", -- 5 ***  **

                                                                                                                                                                                     "11111111", -- 6 ********

                                                                                                                                                                                     "11011011", -- 7 ** ** **

                                                                                                                                                                                     "11011011", -- 8 ** ** **

                                                                                                                                                                                     "11011011", -- 9 ** ** **

                                                                                                                                                                                     "11011011", -- a ** ** **

                                                                                                                                                                                     "11011011", -- b ** ** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x6e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11011100", -- 5 ** ***

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "01100110", -- b  **  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x6f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01111100", -- 5  *****

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x70

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11011100", -- 5 ** ***

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100110", -- 8  **  **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "01100000", -- c  **

                                                                                                                                                                                     "01100000", -- d  **

                                                                                                                                                                                     "11110000", -- e ****

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x71

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01110110", -- 5  *** **

                                                                                                                                                                                     "11001100", -- 6 **  **

                                                                                                                                                                                     "11001100", -- 7 **  **

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00001100", -- c     **

                                                                                                                                                                                     "00001100", -- d     **

                                                                                                                                                                                     "00011110", -- e    ****

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x72

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11011100", -- 5 ** ***

                                                                                                                                                                                     "01110110", -- 6  *** **

                                                                                                                                                                                     "01100110", -- 7  **  **

                                                                                                                                                                                     "01100000", -- 8  **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "01100000", -- a  **

                                                                                                                                                                                     "11110000", -- b ****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x73

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "01111100", -- 5  *****

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "01100000", -- 7  **

                                                                                                                                                                                     "00111000", -- 8   ***

                                                                                                                                                                                     "00001100", -- 9     **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111100", -- b  *****

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x74

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00010000", -- 2    *

                                                                                                                                                                                     "00110000", -- 3   **

                                                                                                                                                                                     "00110000", -- 4   **

                                                                                                                                                                                     "11111100", -- 5 ******

                                                                                                                                                                                     "00110000", -- 6   **

                                                                                                                                                                                     "00110000", -- 7   **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "00110000", -- 9   **

                                                                                                                                                                                     "00110110", -- a   ** **

                                                                                                                                                                                     "00011100", -- b    ***

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x75

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11001100", -- 5 **  **

                                                                                                                                                                                     "11001100", -- 6 **  **

                                                                                                                                                                                     "11001100", -- 7 **  **

                                                                                                                                                                                     "11001100", -- 8 **  **

                                                                                                                                                                                     "11001100", -- 9 **  **

                                                                                                                                                                                     "11001100", -- a **  **

                                                                                                                                                                                     "01110110", -- b  *** **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x76

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11000011", -- 5 **    **

                                                                                                                                                                                     "11000011", -- 6 **    **

                                                                                                                                                                                     "11000011", -- 7 **    **

                                                                                                                                                                                     "11000011", -- 8 **    **

                                                                                                                                                                                     "01100110", -- 9  **  **

                                                                                                                                                                                     "00111100", -- a   ****

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x77

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11000011", -- 5 **    **

                                                                                                                                                                                     "11000011", -- 6 **    **

                                                                                                                                                                                     "11000011", -- 7 **    **

                                                                                                                                                                                     "11011011", -- 8 ** ** **

                                                                                                                                                                                     "11011011", -- 9 ** ** **

                                                                                                                                                                                     "11111111", -- a ********

                                                                                                                                                                                     "01100110", -- b  **  **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x78

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11000011", -- 5 **    **

                                                                                                                                                                                     "01100110", -- 6  **  **

                                                                                                                                                                                     "00111100", -- 7   ****

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00111100", -- 9   ****

                                                                                                                                                                                     "01100110", -- a  **  **

                                                                                                                                                                                     "11000011", -- b **    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x79

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11000110", -- 5 **   **

                                                                                                                                                                                     "11000110", -- 6 **   **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "01111110", -- b  ******

                                                                                                                                                                                     "00000110", -- c      **

                                                                                                                                                                                     "00001100", -- d     **

                                                                                                                                                                                     "11111000", -- e *****

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x7a

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "11111110", -- 5 *******

                                                                                                                                                                                     "11001100", -- 6 **  **

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00110000", -- 8   **

                                                                                                                                                                                     "01100000", -- 9  **

                                                                                                                                                                                     "11000110", -- a **   **

                                                                                                                                                                                     "11111110", -- b *******

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x7b

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00001110", -- 2     ***

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "01110000", -- 6  ***

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00001110", -- b     ***

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x7c

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00011000", -- 2    **

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "00011000", -- b    **

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x7d

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01110000", -- 2  ***

                                                                                                                                                                                     "00011000", -- 3    **

                                                                                                                                                                                     "00011000", -- 4    **

                                                                                                                                                                                     "00011000", -- 5    **

                                                                                                                                                                                     "00001110", -- 6     ***

                                                                                                                                                                                     "00011000", -- 7    **

                                                                                                                                                                                     "00011000", -- 8    **

                                                                                                                                                                                     "00011000", -- 9    **

                                                                                                                                                                                     "00011000", -- a    **

                                                                                                                                                                                     "01110000", -- b  ***

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x7e

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "01110110", -- 2  *** **

                                                                                                                                                                                     "11011100", -- 3 ** ***

                                                                                                                                                                                     "00000000", -- 4

                                                                                                                                                                                     "00000000", -- 5

                                                                                                                                                                                     "00000000", -- 6

                                                                                                                                                                                     "00000000", -- 7

                                                                                                                                                                                     "00000000", -- 8

                                                                                                                                                                                     "00000000", -- 9

                                                                                                                                                                                     "00000000", -- a

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000", -- f

                                                                                                                                                                                     -- code x7f

                                                                                                                                                                                     "00000000", -- 0

                                                                                                                                                                                     "00000000", -- 1

                                                                                                                                                                                     "00000000", -- 2

                                                                                                                                                                                     "00000000", -- 3

                                                                                                                                                                                     "00010000", -- 4    *

                                                                                                                                                                                     "00111000", -- 5   ***

                                                                                                                                                                                     "01101100", -- 6  ** **

                                                                                                                                                                                     "11000110", -- 7 **   **

                                                                                                                                                                                     "11000110", -- 8 **   **

                                                                                                                                                                                     "11000110", -- 9 **   **

                                                                                                                                                                                     "11111110", -- a *******

                                                                                                                                                                                     "00000000", -- b

                                                                                                                                                                                     "00000000", -- c

                                                                                                                                                                                     "00000000", -- d

                                                                                                                                                                                     "00000000", -- e

                                                                                                                                                                                     "00000000"  -- f

                                                                                                                                                                                     );

                                                                                                                                                                                  begin

                                                                                                                                                                                     -- addr register to infer block RAM

                                                                                                                                                                                     process (clka)

                                                                                                                                                                                     begin

                                                                                                                                                                                        if (clka'event and clka = '1') then

                                                                                                                                                                                          addr_reg <= addra;

                                                                                                                                                                                        end if;

                                                                                                                                                                                     end process;

                                                                                                                                                                                     douta <= ROM(to_integer(unsigned(addr_reg)));

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                  end Behavioral;

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                                  font_test_top.ucf file

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                  NET "clk"LOC ="P126";

                                                                                                                                                                                  NET "hsync"  LOC ="P95";

                                                                                                                                                                                  NET "vsync"  LOC ="P97";

                                                                                                                                                                                  NET "rgb<0>" LOC ="P100";

                                                                                                                                                                                  NET "rgb<1>" LOC ="P99";

                                                                                                                                                                                  NET "rgb<2>" LOC ="P98";

                                                                                                                                                                                  NET "reset"  LOC ="P111";

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                   

                                                                                                                                                                                  sorry i dont know how to attech zip file so i just copied it out.

                                                                                                                                                                                    • Re: Some FPGA Beginner Questions
                                                                                                                                                                                      John Beetem

                                                                                                                                                                                      narendra rathod wrote:

                                                                                                                                                                                       

                                                                                                                                                                                      sorry i dont know how to attach zip file so i just copied it out.

                                                                                                                                                                                       

                                                                                                                                                                                      It's fairly easy to upload a .zip file to element14.  First, become a member of the FPGA group so you can upload a file to this group.  Go to the FPGA Group page and click the Join this group button.  Then click on the Content tab.  When the Content tab comes up, click Upload a file and fill in the blanks.  Once you've uploaded the file, you can link to its page from elsewhere.

                                                                                                                                                                                       

                                                                                                                                                                                      I'll let michaelkellett look at the VHDL.  However, I will say that when I get around to playing with VGA myself, my first project will be to display color bars rather than try to display something complex like characters.  It's usually a good idea to start simple whenever you can.

                                                                                                                                                                                        • Re: Some FPGA Beginner Questions
                                                                                                                                                                                          ndnaren

                                                                                                                                                                                          thanks john....

                                                                                                                                                                                           

                                                                                                                                                                                          "However, I will say that when I get around to playing with VGA myself, my first project will be to display color bars rather than try to display something complex like characters.  It's usually a good idea to start simple whenever you can."----john

                                                                                                                                                                                           

                                                                                                                                                                                           

                                                                                                                                                                                          yes john i had aslo started with simple colorbox,colorbar and color pattern project but in those example the vga _sync is slightly different than above ,they all are worked well but now i am going with p.changs book "VHDL PROTOTYPING WITH EXAPLES" in in that is provide how to vga text displaying as a chapter of book...i have modify code as per my need     ,but that is not work on my case i have atteched the book.pdf and plz take a look on chap12 and chap13.. so you will understan well whwt i really want to do....thanks

                                                                                                                                                                                            • Re: Some FPGA Beginner Questions
                                                                                                                                                                                              michaelkellett

                                                                                                                                                                                              I can't see where you posted a link to the book but I think you mean "FPGA Prototyping by VHDL Examples" by Pong P Chu which is widely pirated on the web and available as a .pdf.

                                                                                                                                                                                              As a guide this book is sadly lacking since it has only a very brief discussion of simulation.

                                                                                                                                                                                               

                                                                                                                                                                                              Simulation is the KEY to getting any design (other than the most trivial)  to work on an FPGA in a reasonable time.

                                                                                                                                                                                               

                                                                                                                                                                                              I can't possibly go though your VHDL and find bugs in it - there is far too much and it would take far too long.

                                                                                                                                                                                               

                                                                                                                                                                                              So the solution is for you to simulate it - I'm sure the Xilinx tools include  a usable simulator and test bench generator. Run  a simulation that generates and displays graphically the VGA outputs - actually it is usually better to test the design in small pieces before you put it all together but since you think it's complete you may as well test the whole thing.

                                                                                                                                                                                               

                                                                                                                                                                                              If the VGA outputs are correct (and if you don't know what correct VGA looks like you can't test the design) then run the design on a chip and check that you have the same results in hardware as in simulation.

                                                                                                                                                                                               

                                                                                                                                                                                              If the simulation shows bad VGA data then work back in the simulation until you find the problem.

                                                                                                                                                                                               

                                                                                                                                                                                              If the hardware isn't doing what the simulation does then add hardware check points and use a scope (Xilinx may offer a virtual scope thing but I haven't ever used it so I can't comment on how good it is - I don't find the Lattice equivalent to be much use.)

                                                                                                                                                                                               

                                                                                                                                                                                              In most FPGA designs producing the verification/testing code and running it to completion takes longer than writing the original code.

                                                                                                                                                                                               

                                                                                                                                                                                              Time spent carefully planning and designing the job will reduce the coding and verification/testing time.

                                                                                                                                                                                               

                                                                                                                                                                                              Once you start simulating please feel free to come back and ask about things that don't do what you want.

                                                                                                                                                                                               

                                                                                                                                                                                              (BTW - one quick check worth doing is to compare the actual use of FPGA resources with what you expect - it is very common with a new design to find that where you expected to use 10k logic blocks, 24 block rams and 78 DSP (example numbers only !!) blocks the synthesizer/fitter reports only a small fraction of these as being used - this will be because somewhere you don't actually use an output or miss out  a clock and the synthesizer optimizes away most of your design (for the very good reason that it can't read your mind and most of the design isn't actually doing anything).

                                                                                                                                                                                               

                                                                                                                                                                                              MK

                                                                                                                                                                                              1 of 1 people found this helpful
                                                                                                                                                                                              • Re: Some FPGA Beginner Questions
                                                                                                                                                                                                John Beetem

                                                                                                                                                                                                narendra rathod wrote:

                                                                                                                                                                                                 

                                                                                                                                                                                                yes john i had also started with simple colorbox,colorbar and color pattern project but in those example the vga _sync is slightly different than above ,they all are worked well but now i am going with p.changs book...

                                                                                                                                                                                                OK, if you have examples that work and another that doesn't there's a couple of things you can do:

                                                                                                                                                                                                 

                                                                                                                                                                                                1.  Compare a working example to the non-working example to see what's different.  It might be something as simple as having different master clock frequencies.  Analyzing other people's source code is a good way to improve your understanding of VHDL and you can see what VHDL style works best for you.

                                                                                                                                                                                                 

                                                                                                                                                                                                2.  Start with a working example (so you can generate a good VGA display) and add your own VHDL code to display characters.  Start with something simple like displaying the same character over and over (using a constant look-up table) indexed by VGA row and column.  Once that's working use a Block RAM containing a single character.  Then fill the Block RAM with the full character set and index it by VGA row and column to display the whole character set.

                                                                                                                                                                                                 

                                                                                                                                                                                                IMO it's useful to learn from examples, and useful to parts of source code from examples with permission, but trying to get examples to work together "as is" can be a lot of work and frustration.

                                                                                                                                                                                                 

                                                                                                                                                                                                JMO/YMMV

                                                                                                                                                                                                1 of 1 people found this helpful
                                                                                                                                                                                      • Re: Some FPGA Beginner Questions
                                                                                                                                                                                        ndnaren

                                                                                                                                                                                        Greeting dear !!!

                                                                                                                                                                                        have read tutorial on the ram interference...and now i am going to display font on the vga but in vga synchronization circuit same were wrong..the output does not supported by my lcd(1920*1200 also support 800*600 mode) lcd goes blank and go to power saving mode in short input not supported to lcd i dont know where i am wrong so please help me figur out where is misteck(or are mistechs:-)) firt of all for vga testing project i attached vga_sync_test.vhd  ,vga_sync.vhd and ucf file vga_synnaren togather but it doesn't work all files i have atteched with this post.........secondly in second project i want to display font actully four row of 128 character of 16*8 pixels on vga so i have atteched font_gen_top.vhd    ,font_test_gen.vhd,  vga_sync.vhd,   font_rom.vhd and ucf file named font_top_gen in the project sinthsize report there is successfully 4096*8 bit rom inferred but in this also same problem that it is enable to display ..may be folt in vga _sync....my fpga board use 50mhz clk and i want to use 800*600 mode with 72hz refresh rate......i am excited to display font so please help me...:-) i think  it can noy be atteched so i just copy here...

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                                        vga_sync_test:

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        library IEEE;

                                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                                        use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                                        library UNISIM;

                                                                                                                                                                                        use UNISIM.VComponents.all;

                                                                                                                                                                                         

                                                                                                                                                                                        entity vga_test is

                                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                                   sw : in  STD_LOGIC_VECTOR (2 downto 0);---switches

                                                                                                                                                                                                   rgb: inout std_logic_vector(2 downto 0);

                                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                                   vsync : out  STD_LOGIC);

                                                                                                                                                                                        end vga_test;

                                                                                                                                                                                         

                                                                                                                                                                                        architecture Behavioral of vga_test is

                                                                                                                                                                                        signal rgb_reg:std_logic_vector(2 downto 0);

                                                                                                                                                                                        signal video_on:std_logic;

                                                                                                                                                                                         

                                                                                                                                                                                        begin

                                                                                                                                                                                        --instantiate vga sync. circuit

                                                                                                                                                                                        vga_sync_unit:entity work.vga_sync

                                                                                                                                                                                        port map(clk=> clk,reset=> reset,hsync=> hsync,vsync=> vsync,video_on=> video_on,pixel_x=> open,pixel_y=> open);

                                                                                                                                                                                        --rgb buffer

                                                                                                                                                                                        process(clk,rgb_reg)

                                                                                                                                                                                        begin

                                                                                                                                                                                        if reset='1' then

                                                                                                                                                                                        rgb_reg<=(others=>'0');

                                                                                                                                                                                        elsif(clk'event and clk='1')

                                                                                                                                                                                        then rgb_reg<=sw;

                                                                                                                                                                                        end if;

                                                                                                                                                                                        end process;

                                                                                                                                                                                        process(video_on,rgb_reg)

                                                                                                                                                                                        begin

                                                                                                                                                                                        if video_on='1' then

                                                                                                                                                                                        rgb<=rgb_reg;

                                                                                                                                                                                        else

                                                                                                                                                                                        rgb<="000";

                                                                                                                                                                                        end if;

                                                                                                                                                                                        end process;

                                                                                                                                                                                        end Behavioral;

                                                                                                                                                                                         

                                                                                                                                                                                        -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                                         

                                                                                                                                                                                        vga_sync.vhd:

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        library IEEE;

                                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                                        use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                                        library UNISIM;

                                                                                                                                                                                        use UNISIM.VComponents.all;

                                                                                                                                                                                         

                                                                                                                                                                                        entity vga_sync is

                                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                                   vsync : out  STD_LOGIC;

                                                                                                                                                                                                   video_on : inout  STD_LOGIC;

                                                                                                                                                                                                   pixel_x : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                                   pixel_y : inout  STD_LOGIC_VECTOR (9 downto 0)

                                                                                                                                                                                                   

                                                                                                                                                                                                       );

                                                                                                                                                                                               

                                                                                                                                                                                        end vga_sync;

                                                                                                                                                                                         

                                                                                                                                                                                        architecture Behavioral of vga_sync is

                                                                                                                                                                                         

                                                                                                                                                                                        constant HD :integer := 800;-- horizontal display area

                                                                                                                                                                                        constant HF :integer := 64;-- horizontal fron porch

                                                                                                                                                                                        constant HB :integer := 56;-- horizontal back porch

                                                                                                                                                                                        constant HR :integer := 120;-- horizontal retrace

                                                                                                                                                                                        constant VD :integer := 600;-- vertical display area

                                                                                                                                                                                        constant VF :integer := 23;-- vertical front porch

                                                                                                                                                                                        constant VB :integer := 37;-- vertical back porch

                                                                                                                                                                                        constant VR :integer := 6;-- vertical retrace

                                                                                                                                                                                         

                                                                                                                                                                                        --sync signals counter

                                                                                                                                                                                        signal v_count_reg ,v_count_next:unsigned(9 downto 0);

                                                                                                                                                                                        signal h_count_reg, h_count_next:unsigned(9 downto 0);

                                                                                                                                                                                        --output buffer

                                                                                                                                                                                        signal v_sync_reg,h_sync_reg:std_logic;

                                                                                                                                                                                        signal v_sync_next,h_sync_next:std_logic;

                                                                                                                                                                                        -- status signal

                                                                                                                                                                                        signal h_end,v_end,pixel_tick:std_logic;

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        begin

                                                                                                                                                                                        --regigtors..

                                                                                                                                                                                        process(clk,reset)

                                                                                                                                                                                        begin

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        if reset='1' then

                                                                                                                                                                                        v_count_reg<=(others=>'0');

                                                                                                                                                                                        h_count_reg<=(others=>'0');

                                                                                                                                                                                        v_sync_reg<='0';

                                                                                                                                                                                        h_sync_reg<='0';

                                                                                                                                                                                        elsif (clk'event and clk='1') then

                                                                                                                                                                                        v_count_reg<=v_count_next;

                                                                                                                                                                                        h_count_reg<=h_count_next;

                                                                                                                                                                                        v_sync_reg<=v_sync_next;

                                                                                                                                                                                        h_sync_reg<=h_sync_next;

                                                                                                                                                                                        end if;

                                                                                                                                                                                         

                                                                                                                                                                                        end process;

                                                                                                                                                                                         

                                                                                                                                                                                        --status

                                                                                                                                                                                        h_end<=  --end of horizontal counter

                                                                                                                                                                                        '1' when h_count_reg =(HD+HF+HB+HR-1)

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                        v_end<=----------end of vertical counter

                                                                                                                                                                                        '1' when h_count_reg=(VD+VF+VB+VR-1)

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                         

                                                                                                                                                                                        process(h_count_reg,h_count_next,h_end)

                                                                                                                                                                                        begin

                                                                                                                                                                                         

                                                                                                                                                                                        if h_end ='1' then

                                                                                                                                                                                        h_count_next<=(others=>'0');

                                                                                                                                                                                        else

                                                                                                                                                                                        h_count_next<= h_count_reg + 1;

                                                                                                                                                                                        end if;

                                                                                                                                                                                         

                                                                                                                                                                                        end process;

                                                                                                                                                                                         

                                                                                                                                                                                        process(v_count_reg,v_count_next,h_end,v_end)

                                                                                                                                                                                        begin

                                                                                                                                                                                        if h_end='1' then

                                                                                                                                                                                        if(v_end='1') then

                                                                                                                                                                                        v_count_next<=(others=>'0');

                                                                                                                                                                                        else

                                                                                                                                                                                        v_count_next<=v_count_reg +1;

                                                                                                                                                                                        end if;

                                                                                                                                                                                        else

                                                                                                                                                                                        v_count_next<=v_count_reg;

                                                                                                                                                                                        end if;

                                                                                                                                                                                        end process;

                                                                                                                                                                                        --test

                                                                                                                                                                                        --horizontal and vertical buffer to avoid the glitch

                                                                                                                                                                                        h_sync_next<=

                                                                                                                                                                                        '1' when (h_count_reg>=(HD+HF)) and (h_count_reg<=(HD+HF+HR-1))

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                        v_sync_next<=

                                                                                                                                                                                        '1' when (v_count_reg>=(VD+VF)) and (v_count_reg<=(VD+VF+VR-1))

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                        --video on/off

                                                                                                                                                                                        video_on<=

                                                                                                                                                                                        '1' when (h_count_reg<HD) and (v_count_reg<VD)

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                         

                                                                                                                                                                                        --output signal

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        hsync<= h_sync_reg;

                                                                                                                                                                                        vsync<=v_sync_reg;

                                                                                                                                                                                        pixel_x<=std_logic_vector(h_count_reg);

                                                                                                                                                                                        pixel_y<=std_logic_vector(v_count_reg);

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        end Behavioral;

                                                                                                                                                                                         

                                                                                                                                                                                        ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        vga_synaren----ucf file

                                                                                                                                                                                         

                                                                                                                                                                                        NET "clk" LOC = "P126";

                                                                                                                                                                                        NET "hsync" LOC = "P95";

                                                                                                                                                                                        NET "vsync" LOC = "P97";

                                                                                                                                                                                        NET "rgb<0>" LOC = "P100";

                                                                                                                                                                                        NET "rgb<1>" LOC = "P99";

                                                                                                                                                                                        NET "rgb<2>" LOC = "P98";

                                                                                                                                                                                        NET "reset" LOC = "P111";

                                                                                                                                                                                        NET "sw<0>" LOC ="P112";

                                                                                                                                                                                        NET "sw<1>" LOC ="P15";

                                                                                                                                                                                        NET "sw<2>" LOC ="P114";

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        font_test_top.vhd:

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        library IEEE;

                                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                                        --use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                                        --library UNISIM;

                                                                                                                                                                                        --use UNISIM.VComponents.all;

                                                                                                                                                                                         

                                                                                                                                                                                        entity font_test_top is

                                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                                   vsync : out  STD_LOGIC;

                                                                                                                                                                                                   rgb : out  STD_LOGIC_VECTOR (2 downto 0));

                                                                                                                                                                                        end font_test_top;

                                                                                                                                                                                         

                                                                                                                                                                                        architecture Behavioral of font_test_top is

                                                                                                                                                                                         

                                                                                                                                                                                        signal pixel_x: std_logic_vector(9 downto 0);

                                                                                                                                                                                        signal pixel_y: std_logic_vector(9 downto 0);

                                                                                                                                                                                        signal video_on:std_logic;

                                                                                                                                                                                        signal rgb_reg: std_logic_vector(2 downto 0);

                                                                                                                                                                                        signal rgb_next: std_logic_vector(2 downto 0);

                                                                                                                                                                                         

                                                                                                                                                                                        begin

                                                                                                                                                                                        --------instantate vga sync ckt

                                                                                                                                                                                         

                                                                                                                                                                                        vga_sync_unit:entity work.vga_sync

                                                                                                                                                                                        port map( clk=>clk,reset=>reset,hsync=>hsync,vsync=>vsync,video_on=>video_on,pixel_x=>

                                                                                                                                                                                        pixel_x,pixel_y=>pixel_y);

                                                                                                                                                                                         

                                                                                                                                                                                        -----instantate fontrom--------------------

                                                                                                                                                                                         

                                                                                                                                                                                        font_gen_unit:entity work.font_test_gen

                                                                                                                                                                                        port map(clk=>clk,video_on=>video_on,pixel_x=>pixel_x,pixel_y=>pixel_y,rgb_text=>rgb_next);

                                                                                                                                                                                         

                                                                                                                                                                                        -------rgb_buffer-----------------

                                                                                                                                                                                         

                                                                                                                                                                                        process(clk)

                                                                                                                                                                                        begin

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        if (clk'event and clk='1') then

                                                                                                                                                                                         

                                                                                                                                                                                                

                                                                                                                                                                                            rgb_reg<=rgb_next;

                                                                                                                                                                                           

                                                                                                                                                                                        end if;

                                                                                                                                                                                         

                                                                                                                                                                                        end process;

                                                                                                                                                                                        rgb<=rgb_reg;

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        end Behavioral;

                                                                                                                                                                                         

                                                                                                                                                                                        -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        font_test_gen.vhd:

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        library IEEE;

                                                                                                                                                                                        use IEEE.STD_LOGIC_1164.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if using

                                                                                                                                                                                        -- arithmetic functions with Signed or Unsigned values

                                                                                                                                                                                        use IEEE.NUMERIC_STD.ALL;

                                                                                                                                                                                         

                                                                                                                                                                                        -- Uncomment the following library declaration if instantiating

                                                                                                                                                                                        -- any Xilinx primitives in this code.

                                                                                                                                                                                        library UNISIM;

                                                                                                                                                                                        use UNISIM.VComponents.all;

                                                                                                                                                                                         

                                                                                                                                                                                        entity vga_sync is

                                                                                                                                                                                            Port ( clk : in  STD_LOGIC;

                                                                                                                                                                                                   reset : in  STD_LOGIC;

                                                                                                                                                                                                   hsync : out  STD_LOGIC;

                                                                                                                                                                                                   vsync : out  STD_LOGIC;

                                                                                                                                                                                                   video_on : inout  STD_LOGIC;

                                                                                                                                                                                                   pixel_x : inout  STD_LOGIC_VECTOR (9 downto 0);

                                                                                                                                                                                                   pixel_y : inout  STD_LOGIC_VECTOR (9 downto 0)

                                                                                                                                                                                                   

                                                                                                                                                                                                       );

                                                                                                                                                                                               

                                                                                                                                                                                        end vga_sync;

                                                                                                                                                                                         

                                                                                                                                                                                        architecture Behavioral of vga_sync is

                                                                                                                                                                                         

                                                                                                                                                                                        constant HD :integer := 800;-- horizontal display area

                                                                                                                                                                                        constant HF :integer := 64;-- horizontal fron porch

                                                                                                                                                                                        constant HB :integer := 56;-- horizontal back porch

                                                                                                                                                                                        constant HR :integer := 120;-- horizontal retrace

                                                                                                                                                                                        constant VD :integer := 600;-- vertical display area

                                                                                                                                                                                        constant VF :integer := 23;-- vertical front porch

                                                                                                                                                                                        constant VB :integer := 37;-- vertical back porch

                                                                                                                                                                                        constant VR :integer := 6;-- vertical retrace

                                                                                                                                                                                         

                                                                                                                                                                                        --sync signals counter

                                                                                                                                                                                        signal v_count_reg ,v_count_next:unsigned(9 downto 0);

                                                                                                                                                                                        signal h_count_reg, h_count_next:unsigned(9 downto 0);

                                                                                                                                                                                        --output buffer

                                                                                                                                                                                        signal v_sync_reg,h_sync_reg:std_logic;

                                                                                                                                                                                        signal v_sync_next,h_sync_next:std_logic;

                                                                                                                                                                                        -- status signal

                                                                                                                                                                                        signal h_end,v_end,pixel_tick:std_logic;

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        begin

                                                                                                                                                                                        --regigtors..

                                                                                                                                                                                        process(clk,reset)

                                                                                                                                                                                        begin

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        if reset='1' then

                                                                                                                                                                                        v_count_reg<=(others=>'0');

                                                                                                                                                                                        h_count_reg<=(others=>'0');

                                                                                                                                                                                        v_sync_reg<='0';

                                                                                                                                                                                        h_sync_reg<='0';

                                                                                                                                                                                        elsif (clk'event and clk='1') then

                                                                                                                                                                                        v_count_reg<=v_count_next;

                                                                                                                                                                                        h_count_reg<=h_count_next;

                                                                                                                                                                                        v_sync_reg<=v_sync_next;

                                                                                                                                                                                        h_sync_reg<=h_sync_next;

                                                                                                                                                                                        end if;

                                                                                                                                                                                         

                                                                                                                                                                                        end process;

                                                                                                                                                                                         

                                                                                                                                                                                        --status

                                                                                                                                                                                        h_end<=  --end of horizontal counter

                                                                                                                                                                                        '1' when h_count_reg =(HD+HF+HB+HR-1)

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                        v_end<=----------end of vertical counter

                                                                                                                                                                                        '1' when h_count_reg=(VD+VF+VB+VR-1)

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                         

                                                                                                                                                                                        process(h_count_reg,h_count_next,h_end)

                                                                                                                                                                                        begin

                                                                                                                                                                                         

                                                                                                                                                                                        if h_end ='1' then

                                                                                                                                                                                        h_count_next<=(others=>'0');

                                                                                                                                                                                        else

                                                                                                                                                                                        h_count_next<= h_count_reg + 1;

                                                                                                                                                                                        end if;

                                                                                                                                                                                         

                                                                                                                                                                                        end process;

                                                                                                                                                                                         

                                                                                                                                                                                        process(v_count_reg,v_count_next,h_end,v_end)

                                                                                                                                                                                        begin

                                                                                                                                                                                        if h_end='1' then

                                                                                                                                                                                        if(v_end='1') then

                                                                                                                                                                                        v_count_next<=(others=>'0');

                                                                                                                                                                                        else

                                                                                                                                                                                        v_count_next<=v_count_reg +1;

                                                                                                                                                                                        end if;

                                                                                                                                                                                        else

                                                                                                                                                                                        v_count_next<=v_count_reg;

                                                                                                                                                                                        end if;

                                                                                                                                                                                        end process;

                                                                                                                                                                                        --test

                                                                                                                                                                                        --horizontal and vertical buffer to avoid the glitch

                                                                                                                                                                                        h_sync_next<=

                                                                                                                                                                                        '1' when (h_count_reg>=(HD+HF)) and (h_count_reg<=(HD+HF+HR-1))

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                        v_sync_next<=

                                                                                                                                                                                        '1' when (v_count_reg>=(VD+VF)) and (v_count_reg<=(VD+VF+VR-1))

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                        --video on/off

                                                                                                                                                                                        video_on<=

                                                                                                                                                                                        '1' when (h_count_reg<HD) and (v_count_reg<VD)

                                                                                                                                                                                        else

                                                                                                                                                                                        '0';

                                                                                                                                                                                         

                                                                                                                                                                                        --output signal

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        hsync<= h_sync_reg;

                                                                                                                                                                                        vsync<=v_sync_reg;

                                                                                                                                                                                        pixel_x<=std_logic_vector(h_count_reg);

                                                                                                                                                                                        pixel_y<=std_logic_vector(v_count_reg);

                                                                                                                                                                                         

                                                                                                                                                                                         

                                                                                                                                                                                        end Behavioral;