Shop OBEX P1 Docs P2 Docs Learn Events
Learning Verilog — Parallax Forums

Learning Verilog

mindrobotsmindrobots Posts: 6,506
edited 2014-08-13 06:28 in Propeller 1
(There really needs to be a P1 Verilog/FPGA subforum)

Ok, so now what? Soon I'll be able to build and load and play with a Verilog FPGA image of a P1.

Where do we go from here?

Does anyone have any suggestions as to good Verilog books?? (all the authors seem to be very proud of there creations judging by the price - they are all mostly college texts which is a license to steal)

Online sources?

Favorite videos?

Tips? Tricks? Hints?

Please share, there are probably going to be lots of people (hopefully) wanting to learn Verilog and play along.

*Remember, experts, not everyone has been writing verilog or working with complex tool chains for 25 years, so don't just assume it is an easy switch from one tool to another. We might need a little hand holding and patience.

Comments

  • rjo__rjo__ Posts: 2,114
    edited 2014-08-07 08:46
    Rick,

    I am with you. Absolutely no background, but also very little time. My strategy is to avoid reading as much as possible. We do know a lot about the Propeller. In my mind, the best approach, given my circumstances, is to simply browse the sources,given what I know about the Propeller and see what happens.

    It is all right there in front of us. I'm going to just start hacking away... how hard could it be?

    Rich
  • pik33pik33 Posts: 2,366
    edited 2014-08-07 09:03
    Verilog is not hard. Operators and syntax resembles c.
    The problem with verilog tutorials is they starts from simulation stuff which contains a lot of not needed and not synthesable things.

    Here:

    http://www.ece.umd.edu/class/enee359a.S2008/verilog_tutorial.pdf

    is tutorial I used to learn it

    The best thing to start is to implement simple demo added to DE2-115 ("My first FPGA"). Try to blink some leds :)


    Prop sources uses some advanced things... SystemVerilog compiler was needed to compile this... Nota thing to get started with.

    That I want now is add a RS232 and an EEPROM to the DE2-115 Propeller to get a standalone environment in DE2-115. We can then connect a sound chip (it has a serial interface) and video dac to it. We can even try to recreate HIVE :)
  • cgraceycgracey Posts: 14,155
    edited 2014-08-07 09:13
    It's not that hard.

    I never bought any Verilog book. I just looked up things on the internet. There's really not that much you need to know about it.

    Verilog was originally developed as a hardware simulation language, so much of 'Verilog' has nothing to do with writing synthesizable code - that is, code which can be compiled into digital logic. What you need to know is about 10% of the overall language.

    Consider this: All that you are doing is defining logical equations that are inputs to storage elements (like flipflops or RAM) or drive raw output pins. All inputs to these logical equations are either outputs from storage elements or raw pin inputs (only at the top-most block level do signals attach to raw I/O pins). So, almost all the Verilog code you write will be assignment statements, neglecting the interface lists which name the inputs and outputs to the blocks containing the assignment statements. Everything is organized hierarchically, with all signals being passed up and down through block connections.

    Getting a handle on the math/logic operators will get you almost all the way to understanding the P8X32A Verilog code that was posted yesterday. Here is a good place to learn the operators:

    http://www.asic-world.com/verilog/operators.html
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-08-07 09:17
    One resource is the Linkedin group with over 20,000 members.(registration required) At least there are professionals there that can answer questions and provide additional resources. I posted the Prop1 Open Source FPGA news there yesterday.

    FPGA - Field Programmable Gate Array




    20,684 members Website:


    https://www.linkedin.com/groups?home=&gid=54049&goback=.nmp_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1&trk=grp-name


    There are various Verilog Users Group's (Just do a search inside the FPGA Group) For Example:


    VERILOG Old Timers

    Members OnlyThis group is for former employees of the VERILOG company, based in Toulouse, France.

    Digital Logic Design and Verilog HDL


    Some groups are only open to professionals.
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-08-07 09:24
    Thank you!

    This is the kind of information I was looking for and hoping to collect here.

    "It's not hard." - but you forget, you guys are smarter than the average bears! :smile:
  • rjo__rjo__ Posts: 2,114
    edited 2014-08-07 09:51
    Rick
    but you forget, you guys are smarter than the average bears!

    So true. When I saw Ken's announcement, my mind somehow recalled images of the Wizard of Oz. The only difference is that here, the wizards are all real.
    And they are so damned charming... makes you want to just dig in and give it a try:)

    Rich
  • User NameUser Name Posts: 1,451
    edited 2014-08-07 10:58
    If the free online tutorials aren't as helpful/handy and you'd like, I highly recommend a small and to-the-point book called "Verilog for Digital Design" by Vahid and Lysecky.

    You know the old Blaise Pascal quote "I would have written a shorter letter but I didn't have the time." Well, these authors found the time.
  • Willy EkerslykeWilly Ekerslyke Posts: 29
    edited 2014-08-07 12:55
    Take a look at fpga4fun.com. There's some basic but useful little 'projects' on there that will help you experiment with Verilog both in and outside of the Prop domain.
  • Heater.Heater. Posts: 21,230
    edited 2014-08-07 14:14
    Chip,
    What you need to know is about 10% of the overall language.
    That also applies to VHDL. It's really annoying.

    As a beginner that does not know what is what you can read whole books and tutorials about the language without anyone ever bothering to tell you you are wasting your time if you just want to blow an FPGA or whatever real logic.

    Not only that but you can create a whole pile of VHDL that runs fine under a compiler/simulator like GHDL but is totally useless for your target.
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-07 21:56
    Someone recommended this a while ago. I have read some, and skimmed other parts.
    The Verilog Golden Reference Guide by Doulos.
    Maybe search the internet.

    So far, I find it much easier to read than C and I am neither a C nor Verilog programmer.
  • rjo__rjo__ Posts: 2,114
    edited 2014-08-10 06:18
    I found a very nice "less is more" cheat sheet styled intro/summary... http://web.mit.edu/6.111/www/f2012/handouts/L03.pdf
    "less is more"
  • cgraceycgracey Posts: 14,155
    edited 2014-08-10 06:31
    rjo__ wrote: »
    I found a very nice "less is more" cheat sheet styled intro/summary... http://web.mit.edu/6.111/www/f2012/handouts/L03.pdf
    "less is more"

    That looks good. One other big help is an operator-precedence list, which can be quickly found via Google.
  • rjo__rjo__ Posts: 2,114
    edited 2014-08-10 06:34
    Good morning:)

    Thanks
  • RamonRamon Posts: 484
    edited 2014-08-11 07:03
    User Name wrote: »
    If the free online tutorials aren't as helpful/handy and you'd like, I highly recommend a small and to-the-point book called "Verilog for Digital Design" by Vahid and Lysecky.

    You know the old Blaise Pascal quote "I would have written a shorter letter but I didn't have the time." Well, these authors found the time.

    User Name has said it all. Small (197 pages) and to-the-point (only synthetizable verilog). I had access to more than a dozen books of Verilog. This one is a keeper. Haven't heard before that quote ... cannot be more appropiate. (It reminds me the book of Kernighan and Ritchie too).
  • pik33pik33 Posts: 2,366
    edited 2014-08-11 08:56
    Ramon wrote: »
    synthetizable verilog

    This is fluent. Some not synthesable constructs are synthesable now.

    For example in Quartus 12 (maybe 11) and newer you can use initial statement and it is synthesable. Very convenient thing, you can set state of your circuit when it starts.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-08-11 14:47
    re:If the free online tutorials aren't as helpful/handy and you'd like, I highly recommend a small and to-the-point book called "Verilog for Digital Design" by Vahid and Lysecky.

    You can read a few pages here:
    http://www0.egr.uh.edu/courses/ece/ECE5440/ece5440_topic2_VerilogIntroduction.pdf
  • cgraceycgracey Posts: 14,155
    edited 2014-08-11 15:09
    pik33 wrote: »
    This is fluent. Some not synthesable constructs are synthesable now.

    For example in Quartus 12 (maybe 11) and newer you can use initial statement and it is synthesable. Very convenient thing, you can set state of your circuit when it starts.


    Wouldn't using an 'initial' statement imply the existence of a reset signal? I could see how obvious 'initial' would be in a simulation, but in silicon it would necessitate a reset signal coming from somewhere, since things don't power up in known states, reliably.
  • potatoheadpotatohead Posts: 10,261
    edited 2014-08-11 15:16
    That is a lot like implied state, which I was reading about this weekend. Sure, it will likely work, but it will also likely work in ways you didn't plan for too.

    Seems to me, that is a path for buggy chips.

    An explicit definition will take more effort, but will also be more known too, good or bad.
  • pik33pik33 Posts: 2,366
    edited 2014-08-11 23:04
    cgracey wrote: »
    Wouldn't using an 'initial' statement imply the existence of a reset signal? I could see how obvious 'initial' would be in a simulation, but in silicon it would necessitate a reset signal coming from somewhere, since things don't power up in known states, reliably.

    I don't know how it works internally. They say it is synthesable from quartus (11,12 ? don't remember now). I checked this experimentally. If you state
    initial
    begin
    port[1]<=1;
    end
    

    you will have 1 on port[1] after fpga starts. Now we have reliable "1" after the FPGA start. It is convenient :)
  • SRLMSRLM Posts: 5,045
    edited 2014-08-13 06:28
    If you're willing to shell out $250 there's an online IEEE course on Verilog here:

    http://www.ieeeboston.org/edu/on-line_crs/verilog_101_foundations.html
Sign In or Register to comment.