SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
The following Verilog always block implements a behavioral model of a D flip-flop:
reg Q;
always @(posedge clock)
begin
Q = D;
end
Recall the characteristic equation for a J-K flip-flop is Q+ = JQ' + K'Q.
Modify the Verilog code in this always block to model a J-K flip-flop.
Solution
reg Q;
always @(posedge clock)
begin
Q = ((~J)&Q)|(K&(~Q));
end

Contenu connexe

Plus de amolmobileshop

The Fraud of the Century The Case of Bernard Madoff update facts in.pdf
The Fraud of the Century The Case of Bernard Madoff update facts in.pdfThe Fraud of the Century The Case of Bernard Madoff update facts in.pdf
The Fraud of the Century The Case of Bernard Madoff update facts in.pdf
amolmobileshop
 
The following transactions relate to Penelope Inc. Prepare journal e.pdf
The following transactions relate to Penelope Inc. Prepare journal e.pdfThe following transactions relate to Penelope Inc. Prepare journal e.pdf
The following transactions relate to Penelope Inc. Prepare journal e.pdf
amolmobileshop
 
The following topics should be included in your key understandings a.pdf
The following topics should be included in your key understandings a.pdfThe following topics should be included in your key understandings a.pdf
The following topics should be included in your key understandings a.pdf
amolmobileshop
 
The following statements are about Free Cash Flow (FCF). Select all .pdf
The following statements are about Free Cash Flow (FCF). Select all .pdfThe following statements are about Free Cash Flow (FCF). Select all .pdf
The following statements are about Free Cash Flow (FCF). Select all .pdf
amolmobileshop
 

Plus de amolmobileshop (9)

The function y1 = x^2 is a solution of (x)^2 Solutionx2 - 3xy.pdf
The function y1 = x^2 is a solution of (x)^2 Solutionx2 - 3xy.pdfThe function y1 = x^2 is a solution of (x)^2 Solutionx2 - 3xy.pdf
The function y1 = x^2 is a solution of (x)^2 Solutionx2 - 3xy.pdf
 
The function below does not have an inverse. Restrict the domain of .pdf
The function below does not have an inverse. Restrict the domain of .pdfThe function below does not have an inverse. Restrict the domain of .pdf
The function below does not have an inverse. Restrict the domain of .pdf
 
The free rider problem refers to people who A. Will only consume a p.pdf
The free rider problem refers to people who A. Will only consume a p.pdfThe free rider problem refers to people who A. Will only consume a p.pdf
The free rider problem refers to people who A. Will only consume a p.pdf
 
The Fraud of the Century The Case of Bernard Madoff update facts in.pdf
The Fraud of the Century The Case of Bernard Madoff update facts in.pdfThe Fraud of the Century The Case of Bernard Madoff update facts in.pdf
The Fraud of the Century The Case of Bernard Madoff update facts in.pdf
 
The formula shown is a very common formula. It is the formula for .pdf
The formula shown is a very common formula. It is the formula for .pdfThe formula shown is a very common formula. It is the formula for .pdf
The formula shown is a very common formula. It is the formula for .pdf
 
The following transactions relate to Penelope Inc. Prepare journal e.pdf
The following transactions relate to Penelope Inc. Prepare journal e.pdfThe following transactions relate to Penelope Inc. Prepare journal e.pdf
The following transactions relate to Penelope Inc. Prepare journal e.pdf
 
The following topics should be included in your key understandings a.pdf
The following topics should be included in your key understandings a.pdfThe following topics should be included in your key understandings a.pdf
The following topics should be included in your key understandings a.pdf
 
the following table contains a breakdown by sex of the faculty membe.pdf
the following table contains a breakdown by sex of the faculty membe.pdfthe following table contains a breakdown by sex of the faculty membe.pdf
the following table contains a breakdown by sex of the faculty membe.pdf
 
The following statements are about Free Cash Flow (FCF). Select all .pdf
The following statements are about Free Cash Flow (FCF). Select all .pdfThe following statements are about Free Cash Flow (FCF). Select all .pdf
The following statements are about Free Cash Flow (FCF). Select all .pdf
 

Dernier

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Dernier (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

The following Verilog always block implements a behavioral model of .pdf

  • 1. The following Verilog always block implements a behavioral model of a D flip-flop: reg Q; always @(posedge clock) begin Q = D; end Recall the characteristic equation for a J-K flip-flop is Q+ = JQ' + K'Q. Modify the Verilog code in this always block to model a J-K flip-flop. Solution reg Q; always @(posedge clock) begin Q = ((~J)&Q)|(K&(~Q)); end