<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2024-12-17</periodOfReport>

    <issuer>
        <issuerCik>0000855658</issuerCik>
        <issuerName>LATTICE SEMICONDUCTOR CORP</issuerName>
        <issuerTradingSymbol>LSCC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001891117</rptOwnerCik>
            <rptOwnerName>Feanny Tracy Ann</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>5555 NE MOORE COURT</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>HILLSBORO</rptOwnerCity>
            <rptOwnerState>OR</rptOwnerState>
            <rptOwnerZipCode>97124</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>SVP, General Counsel</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-12-17</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>34741</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>73004</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The grant of Restricted Stock Units (RSUs) vest as follows: 50% of the RSUs will vest on the first anniversary of the grant date, and the remaining 50% of the RSUs shall vest on the second anniversary of the grant date.</footnote>
        <footnote id="F2">The reported transaction involved the reporting person's receipt of a grant of 34,741 RSUs under the Company's 2023 Equity Incentive Plan. The reporting person has reported prior awards of RSUs in Table II of Form 4. The total reported in Column 5 includes the 34,741 newly awarded RSUs, 24,354 RSUs previously reported in Table II, and 13,909 shares of common stock.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Tracy Feanny</signatureName>
        <signatureDate>2024-12-19</signatureDate>
    </ownerSignature>
</ownershipDocument>
