Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Verilog

Date:04/20/05
Author:Danny Mulligan
URL:n/a
Comments:2
Info:n/a
Score: (2.70 in 10 votes)
/***********************************************************
*    Module: 99 bottles of beer
* By Danny Mulligan
***********************************************************/
module beer;
    integer i;
    initial begin
        for (i=99; i>0; i=i-1)
        begin
            $display("%0d bottles of beer on the wall,", i);
            $display("%0d bottles of beer,", i);
            $display("Take one down and pass it around,");
            if (i==1)
                $display("No more bottles of beer on the wall.\n");
            else
                $display("%0d bottles of beer on the wall.\n", i-1);
        end
        $display("Go to the store and buy some more.");
    end
end

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
(synthesizable)T09/14/060

Comments

>>  leppa said on 09/13/05 23:00:37

leppa This is not syntetizable!!! O_o

>>  Jim English said on 03/15/06 01:33:35

Jim English It's not legal verilog. The last end statement should be an endmodule statement.

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: