EX-5.1 4 a2079842zex-5_1.htm EXHIBIT 5.1
QuickLinks -- Click here to rapidly navigate through this document


EXHIBIT 5.1

        May 13, 2002

Lattice Semiconductor Corporation
5555 N.E. Moore Court
Hillsboro, Oregon 97124-6421

    Re:
    Registration Statement on Form S-3

Ladies and Gentlemen:

        We have examined the Registration Statement on Form S-3 to be filed by you with the Securities and Exchange Commission on or about May 13, 2002 (the "Registration Statement") in connection with the registration under the Securities Act of 1933, as amended (the "Act"), of an aggregate of 95,563 shares (the "Shares") of your Common Stock which are issuable upon exercise of that certain Warrant to Purchase Shares of Common Stock issued to Bain & Company, Inc. (the "Bain Warrant"). As your counsel in connection with this transaction, we have examined the proceedings taken and are familiar with the proceedings proposed to be taken by you in connection with the issuance and sale of the Shares pursuant to the Bain Warrant.

        It is our opinion that, upon completion of the actions being taken, or contemplated by us as your counsel to be taken by you prior to the issuance of the Shares pursuant to the Registration Statement and the Bain Warrant, and upon completion of the actions being taken in order to permit such transactions to be carried out in accordance with the securities laws of the various states where required, the Shares will be legally and validly issued, fully-paid and non-assessable.

        We consent to the use of this opinion as an exhibit to the Registration Statement, and further consent to the use of our name wherever appearing in the Registration Statement and any amendments thereto.

                      Very truly yours,

                      Wilson Sonsini Goodrich & Rosati
                      Professional Corporation

                      /s/ Wilson Sonsini Goodrich & Rosati, P.C.




QuickLinks