SlideShare a Scribd company logo
1 of 3
Download to read offline
Prepare a Verilog HDL code for the following register: Positive Edge triggered gated latch D
Flip Flop. Bring a soft copy of your Verilog HDL code with you to the lab.
Solution
Verilog tools
Text editor:
nedit is a graphical text editor that has syntax highlighting for Verilog.
nedit &
gedit &
vi - Text based editor
vi &
Verilog simulator:
verlogXL Event-based simulation - interpreted Verilog
verilog myfile1.v myfile2.v myfile3.v ... &
Other Verilog simulators you can use in the computers in ECSS 2.103 & 2.104 (Open Access
Lab) :
· Xilinx ISE
· ModelSim
For tutorials please google.
Waveform viewer:
WaveView
CosmosScope
1. Introduction to Verilog
These are just a few basic ideas of how verilog works. I would recommend you read “Verilog
HDL A Guide Digital Design and Synthesis,” Palnitkar, Samir, SunSoft Press, A Prentice Hall
Title, 1996.
Verilog syntax and Structure
In addition, A quick tutorial on Verilog and reference card are up.
Verilog HDL - I : Combinational Logic
Verilog HDL - II : Sequential Logic
Verilog HDL quick reference card
Verilog Learning website
2. Synthesizable Verilog code
In VLSI design we are mostly concerned with synthesizable verilog. For synthesizing your finite
state machine using a tool such as Synopsys Design Compiler certain rules have to be followed.
(please read those rules carefully; if these rules are not followed it will cause big problems when
using Synopsys).
Verilog Restrictions for Synthesis
¨ Not all HDL constructs are synthesizable.
¨ Simulatable designs are not necessarily synthesizable.
¨ Synthesizable constructs are tool dependent
¨ Use only few HDL commands
case
if else
concurrent and sequential statements
¨ Keep the intended circuit architecture in mind during design description.
¨ Using C-like programming style increases the silicon area dramatically.
¨ Type conversions and test stimuli definitions cannot be synthesized.
¨ Make extensive use of comments.
¨ Use headers for all modules, functions
¨ Explain the operating modes of the modules
¨ Explain all input and output signals
¨ Compiler directives reside within comments
¨ Smallest HDL code does not imply smallest silicon.
¨ Describe the architecture clearly.
¨ Cover all possible states within a if-else or case statement.
¨ Do not use nested loops for circuit description
¨ Do not define functions when instantiating parts within one entity.
Here is an excellent link to a site which gives information about Verilog for synthesis:
Synthesis flow
Synthesizable Verilog Example with Test Bench
Traffic Light Example
NOTE: The library used in VLSI class only contains flip-flop. In order to only use flip-flop in
the design, please only use "posedge clock" in the always block. Put other signals in the block,
will cause the synthesizer pick LATCH or other sequential circuits for your design.
Example:
always @ (posedge clock)
begin
...
end
3. Behavior Verilog simulation
You can simulate your file from the VLSI sever or Sun machine at the lab after set up your
environment by entering following command.
(you have to do this every time you open a new terminal session)
. /proj/cad/startup/profile.ic-5
You insert one of these verilog commands in your test bench module
Put it right after "initial begin"
initial
begin
(monitor command or dump command)
#(clockDelay) malfunction = 1'b0;
#(clockDelay) reset = 1'b0;
#(clockDelay) reset = 1'b0;
#(clockDelay) ready = 1'b1;
end
to check result by text
$monitor ("variable1 name in output text, variable2 name in output text ", variable1,
variable2);
to get a wave file.
initial
begin
$dumpfile("your_file.dump");
$dumpvars;
$finish;
end
and now, you can simulate your file with verilog XL by entering following command:
verilog your_verilog_file.v
After you finish compiling the simulation, you'll have a directory calledyour_file.dump.

More Related Content

Similar to Prepare a Verilog HDL code for the following register Positive Edge.pdf

VLSI Experiments I
VLSI Experiments IVLSI Experiments I
VLSI Experiments IGouthaman V
 
How to design Programs using VHDL
How to design Programs using VHDLHow to design Programs using VHDL
How to design Programs using VHDLEutectics
 
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteProcessor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteDVClub
 
Vlsi design-manual
Vlsi design-manualVlsi design-manual
Vlsi design-manualAmbuj Jha
 
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tipturVLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tipturPramod Kumar S
 
Digital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptxDigital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptxMalligaarjunanN
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdRichard Lister
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Deepak Kumar
 

Similar to Prepare a Verilog HDL code for the following register Positive Edge.pdf (20)

VLSI Experiments I
VLSI Experiments IVLSI Experiments I
VLSI Experiments I
 
Verilog
VerilogVerilog
Verilog
 
S6 cad5
S6 cad5S6 cad5
S6 cad5
 
How to design Programs using VHDL
How to design Programs using VHDLHow to design Programs using VHDL
How to design Programs using VHDL
 
Report on VLSI
Report on VLSIReport on VLSI
Report on VLSI
 
Xilinx verilog tutorial
Xilinx verilog tutorialXilinx verilog tutorial
Xilinx verilog tutorial
 
Readme
ReadmeReadme
Readme
 
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteProcessor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Vhdl new
Vhdl newVhdl new
Vhdl new
 
Syntutic
SyntuticSyntutic
Syntutic
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Vlsi design-manual
Vlsi design-manualVlsi design-manual
Vlsi design-manual
 
Vhdl design flow
Vhdl design flowVhdl design flow
Vhdl design flow
 
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tipturVLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
 
Xilinx training in mohali
Xilinx training in mohaliXilinx training in mohali
Xilinx training in mohali
 
Digital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptxDigital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptx
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)
 

More from ezonesolutions

hi need help with this question, ignore the circles (f) Indicate .pdf
hi need help with this question, ignore the circles (f) Indicate .pdfhi need help with this question, ignore the circles (f) Indicate .pdf
hi need help with this question, ignore the circles (f) Indicate .pdfezonesolutions
 
Explain TWO examples of fungal interactions with other speciesSo.pdf
Explain TWO examples of fungal interactions with other speciesSo.pdfExplain TWO examples of fungal interactions with other speciesSo.pdf
Explain TWO examples of fungal interactions with other speciesSo.pdfezonesolutions
 
DNA replicationTranscriptionTranslationPurposeWhere it occur.pdf
DNA replicationTranscriptionTranslationPurposeWhere it occur.pdfDNA replicationTranscriptionTranslationPurposeWhere it occur.pdf
DNA replicationTranscriptionTranslationPurposeWhere it occur.pdfezonesolutions
 
Does Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdf
Does Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdfDoes Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdf
Does Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdfezonesolutions
 
continuous, analytic, differentiableWhat is the relationship betwe.pdf
continuous, analytic, differentiableWhat is the relationship betwe.pdfcontinuous, analytic, differentiableWhat is the relationship betwe.pdf
continuous, analytic, differentiableWhat is the relationship betwe.pdfezonesolutions
 
Define the types of ultrasound pressure wavesSolutionUltrasoun.pdf
Define the types of ultrasound pressure wavesSolutionUltrasoun.pdfDefine the types of ultrasound pressure wavesSolutionUltrasoun.pdf
Define the types of ultrasound pressure wavesSolutionUltrasoun.pdfezonesolutions
 
Consider the current national debate about the revelation that top g.pdf
Consider the current national debate about the revelation that top g.pdfConsider the current national debate about the revelation that top g.pdf
Consider the current national debate about the revelation that top g.pdfezonesolutions
 
Case Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdf
Case Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdfCase Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdf
Case Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdfezonesolutions
 
A recombinant DNA was constructed by inserting the DNA of interest i.pdf
A recombinant DNA was constructed by inserting the DNA of interest i.pdfA recombinant DNA was constructed by inserting the DNA of interest i.pdf
A recombinant DNA was constructed by inserting the DNA of interest i.pdfezonesolutions
 
A conductor of length l lies along the x axis with current I in the +.pdf
A conductor of length l lies along the x axis with current I in the +.pdfA conductor of length l lies along the x axis with current I in the +.pdf
A conductor of length l lies along the x axis with current I in the +.pdfezonesolutions
 
What are the main motives for establishing an international joint ve.pdf
What are the main motives for establishing an international joint ve.pdfWhat are the main motives for establishing an international joint ve.pdf
What are the main motives for establishing an international joint ve.pdfezonesolutions
 
9 & 10 9. The study of behavioral finance has best helped explain .pdf
9 & 10 9. The study of behavioral finance has best helped explain .pdf9 & 10 9. The study of behavioral finance has best helped explain .pdf
9 & 10 9. The study of behavioral finance has best helped explain .pdfezonesolutions
 
Will Chinas economic success continue into the foreseeable future.pdf
Will Chinas economic success continue into the foreseeable future.pdfWill Chinas economic success continue into the foreseeable future.pdf
Will Chinas economic success continue into the foreseeable future.pdfezonesolutions
 
Which of the following ions would exhibit the greatest conductivity.pdf
Which of the following ions would exhibit the greatest conductivity.pdfWhich of the following ions would exhibit the greatest conductivity.pdf
Which of the following ions would exhibit the greatest conductivity.pdfezonesolutions
 
Which fault-tolerant-like system can back up media in much the same .pdf
Which fault-tolerant-like system can back up media in much the same .pdfWhich fault-tolerant-like system can back up media in much the same .pdf
Which fault-tolerant-like system can back up media in much the same .pdfezonesolutions
 
When may a federal court hear a caseSolutionFederal Court wil.pdf
When may a federal court hear a caseSolutionFederal Court wil.pdfWhen may a federal court hear a caseSolutionFederal Court wil.pdf
When may a federal court hear a caseSolutionFederal Court wil.pdfezonesolutions
 
4) Production in the country of StockVille can be characterized by th.pdf
4) Production in the country of StockVille can be characterized by th.pdf4) Production in the country of StockVille can be characterized by th.pdf
4) Production in the country of StockVille can be characterized by th.pdfezonesolutions
 
What is the pre-order traversal sequence for the above treeSolut.pdf
What is the pre-order traversal sequence for the above treeSolut.pdfWhat is the pre-order traversal sequence for the above treeSolut.pdf
What is the pre-order traversal sequence for the above treeSolut.pdfezonesolutions
 
Show that the class P, viewed as a set of languages is closed under c.pdf
Show that the class P, viewed as a set of languages is closed under c.pdfShow that the class P, viewed as a set of languages is closed under c.pdf
Show that the class P, viewed as a set of languages is closed under c.pdfezonesolutions
 
Related to Making the Connection] In the court case over whether any.pdf
Related to Making the Connection] In the court case over whether any.pdfRelated to Making the Connection] In the court case over whether any.pdf
Related to Making the Connection] In the court case over whether any.pdfezonesolutions
 

More from ezonesolutions (20)

hi need help with this question, ignore the circles (f) Indicate .pdf
hi need help with this question, ignore the circles (f) Indicate .pdfhi need help with this question, ignore the circles (f) Indicate .pdf
hi need help with this question, ignore the circles (f) Indicate .pdf
 
Explain TWO examples of fungal interactions with other speciesSo.pdf
Explain TWO examples of fungal interactions with other speciesSo.pdfExplain TWO examples of fungal interactions with other speciesSo.pdf
Explain TWO examples of fungal interactions with other speciesSo.pdf
 
DNA replicationTranscriptionTranslationPurposeWhere it occur.pdf
DNA replicationTranscriptionTranslationPurposeWhere it occur.pdfDNA replicationTranscriptionTranslationPurposeWhere it occur.pdf
DNA replicationTranscriptionTranslationPurposeWhere it occur.pdf
 
Does Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdf
Does Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdfDoes Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdf
Does Microsoft directly disclose LinkedIn revenue for 2016 Explain .pdf
 
continuous, analytic, differentiableWhat is the relationship betwe.pdf
continuous, analytic, differentiableWhat is the relationship betwe.pdfcontinuous, analytic, differentiableWhat is the relationship betwe.pdf
continuous, analytic, differentiableWhat is the relationship betwe.pdf
 
Define the types of ultrasound pressure wavesSolutionUltrasoun.pdf
Define the types of ultrasound pressure wavesSolutionUltrasoun.pdfDefine the types of ultrasound pressure wavesSolutionUltrasoun.pdf
Define the types of ultrasound pressure wavesSolutionUltrasoun.pdf
 
Consider the current national debate about the revelation that top g.pdf
Consider the current national debate about the revelation that top g.pdfConsider the current national debate about the revelation that top g.pdf
Consider the current national debate about the revelation that top g.pdf
 
Case Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdf
Case Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdfCase Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdf
Case Study UrolithiasisCase PresentationDaniel, a thirty-two ye.pdf
 
A recombinant DNA was constructed by inserting the DNA of interest i.pdf
A recombinant DNA was constructed by inserting the DNA of interest i.pdfA recombinant DNA was constructed by inserting the DNA of interest i.pdf
A recombinant DNA was constructed by inserting the DNA of interest i.pdf
 
A conductor of length l lies along the x axis with current I in the +.pdf
A conductor of length l lies along the x axis with current I in the +.pdfA conductor of length l lies along the x axis with current I in the +.pdf
A conductor of length l lies along the x axis with current I in the +.pdf
 
What are the main motives for establishing an international joint ve.pdf
What are the main motives for establishing an international joint ve.pdfWhat are the main motives for establishing an international joint ve.pdf
What are the main motives for establishing an international joint ve.pdf
 
9 & 10 9. The study of behavioral finance has best helped explain .pdf
9 & 10 9. The study of behavioral finance has best helped explain .pdf9 & 10 9. The study of behavioral finance has best helped explain .pdf
9 & 10 9. The study of behavioral finance has best helped explain .pdf
 
Will Chinas economic success continue into the foreseeable future.pdf
Will Chinas economic success continue into the foreseeable future.pdfWill Chinas economic success continue into the foreseeable future.pdf
Will Chinas economic success continue into the foreseeable future.pdf
 
Which of the following ions would exhibit the greatest conductivity.pdf
Which of the following ions would exhibit the greatest conductivity.pdfWhich of the following ions would exhibit the greatest conductivity.pdf
Which of the following ions would exhibit the greatest conductivity.pdf
 
Which fault-tolerant-like system can back up media in much the same .pdf
Which fault-tolerant-like system can back up media in much the same .pdfWhich fault-tolerant-like system can back up media in much the same .pdf
Which fault-tolerant-like system can back up media in much the same .pdf
 
When may a federal court hear a caseSolutionFederal Court wil.pdf
When may a federal court hear a caseSolutionFederal Court wil.pdfWhen may a federal court hear a caseSolutionFederal Court wil.pdf
When may a federal court hear a caseSolutionFederal Court wil.pdf
 
4) Production in the country of StockVille can be characterized by th.pdf
4) Production in the country of StockVille can be characterized by th.pdf4) Production in the country of StockVille can be characterized by th.pdf
4) Production in the country of StockVille can be characterized by th.pdf
 
What is the pre-order traversal sequence for the above treeSolut.pdf
What is the pre-order traversal sequence for the above treeSolut.pdfWhat is the pre-order traversal sequence for the above treeSolut.pdf
What is the pre-order traversal sequence for the above treeSolut.pdf
 
Show that the class P, viewed as a set of languages is closed under c.pdf
Show that the class P, viewed as a set of languages is closed under c.pdfShow that the class P, viewed as a set of languages is closed under c.pdf
Show that the class P, viewed as a set of languages is closed under c.pdf
 
Related to Making the Connection] In the court case over whether any.pdf
Related to Making the Connection] In the court case over whether any.pdfRelated to Making the Connection] In the court case over whether any.pdf
Related to Making the Connection] In the court case over whether any.pdf
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
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 SectorsAssociation for Project Management
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
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
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

Prepare a Verilog HDL code for the following register Positive Edge.pdf

  • 1. Prepare a Verilog HDL code for the following register: Positive Edge triggered gated latch D Flip Flop. Bring a soft copy of your Verilog HDL code with you to the lab. Solution Verilog tools Text editor: nedit is a graphical text editor that has syntax highlighting for Verilog. nedit & gedit & vi - Text based editor vi & Verilog simulator: verlogXL Event-based simulation - interpreted Verilog verilog myfile1.v myfile2.v myfile3.v ... & Other Verilog simulators you can use in the computers in ECSS 2.103 & 2.104 (Open Access Lab) : · Xilinx ISE · ModelSim For tutorials please google. Waveform viewer: WaveView CosmosScope 1. Introduction to Verilog These are just a few basic ideas of how verilog works. I would recommend you read “Verilog HDL A Guide Digital Design and Synthesis,” Palnitkar, Samir, SunSoft Press, A Prentice Hall Title, 1996. Verilog syntax and Structure In addition, A quick tutorial on Verilog and reference card are up. Verilog HDL - I : Combinational Logic Verilog HDL - II : Sequential Logic Verilog HDL quick reference card Verilog Learning website 2. Synthesizable Verilog code In VLSI design we are mostly concerned with synthesizable verilog. For synthesizing your finite state machine using a tool such as Synopsys Design Compiler certain rules have to be followed.
  • 2. (please read those rules carefully; if these rules are not followed it will cause big problems when using Synopsys). Verilog Restrictions for Synthesis ¨ Not all HDL constructs are synthesizable. ¨ Simulatable designs are not necessarily synthesizable. ¨ Synthesizable constructs are tool dependent ¨ Use only few HDL commands case if else concurrent and sequential statements ¨ Keep the intended circuit architecture in mind during design description. ¨ Using C-like programming style increases the silicon area dramatically. ¨ Type conversions and test stimuli definitions cannot be synthesized. ¨ Make extensive use of comments. ¨ Use headers for all modules, functions ¨ Explain the operating modes of the modules ¨ Explain all input and output signals ¨ Compiler directives reside within comments ¨ Smallest HDL code does not imply smallest silicon. ¨ Describe the architecture clearly. ¨ Cover all possible states within a if-else or case statement. ¨ Do not use nested loops for circuit description ¨ Do not define functions when instantiating parts within one entity. Here is an excellent link to a site which gives information about Verilog for synthesis: Synthesis flow Synthesizable Verilog Example with Test Bench Traffic Light Example NOTE: The library used in VLSI class only contains flip-flop. In order to only use flip-flop in the design, please only use "posedge clock" in the always block. Put other signals in the block, will cause the synthesizer pick LATCH or other sequential circuits for your design. Example: always @ (posedge clock) begin ... end
  • 3. 3. Behavior Verilog simulation You can simulate your file from the VLSI sever or Sun machine at the lab after set up your environment by entering following command. (you have to do this every time you open a new terminal session) . /proj/cad/startup/profile.ic-5 You insert one of these verilog commands in your test bench module Put it right after "initial begin" initial begin (monitor command or dump command) #(clockDelay) malfunction = 1'b0; #(clockDelay) reset = 1'b0; #(clockDelay) reset = 1'b0; #(clockDelay) ready = 1'b1; end to check result by text $monitor ("variable1 name in output text, variable2 name in output text ", variable1, variable2); to get a wave file. initial begin $dumpfile("your_file.dump"); $dumpvars; $finish; end and now, you can simulate your file with verilog XL by entering following command: verilog your_verilog_file.v After you finish compiling the simulation, you'll have a directory calledyour_file.dump.