SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
CENG3430 Rapid Prototyping of Digital Systems
Lecture 06:
Use of Clock Sources and
Peripheral Modules on ZedBoard
Ming-Chang YANG
mcyang@cse.cuhk.edu.hk
Outline
• Clock Sources of ZedBoard
• Digilent Pmod™ Peripheral Modules
– Example: Seven Segment Display (Pmod SSD)
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 2
Recall: What we have done in Lab04
• Serial-in-parallel-out Shift Register
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 3
SW0: din
BTNC: clk
BTNR: rst
LD0~LD7: dout
How to use “real” clock resource(s) on ZedBoard?
Clock Sources on ZedBoard (1/2)
• Processing System
– PS subsystem uses a dedicated
33.3333 MHz clock source with
series termination.
• IC18, Fox 767-33.333333-12
– PS subsystem can generate up to
four phase-locked loop (PLL)
based clocks for the PL system.
• Programmable Logic
– An on-board 100 MHz oscillator
supplies the PL subsystem clock
input on bank 13, pin Y9.
• IC17, Fox 767-100-136
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 4
http://zedboard.org/sites/default/files/documentations/ZedBoard_HW_UG_v2_2.pdf
https://www.electronics-tutorials.ws/oscillator/oscillators.html
Clock Sources on ZedBoard (2/2)
• To use the on-board 100 MHz clock input on bank 13,
pin Y9, you need to include the following in your XDC
constraint file:
set_property IOSTANDARD LVCMOS33 [get_ports clk]
set_property PACKAGE_PIN Y9 [get_ports clk]
create_clock -period 10 [get_ports clk]
Note:
• The constraint -period 10 is only used to inform the tool that clock
period is 10 ns (i.e., 100 MHz).
• The constraint -period 10 is NOT used specify or generate a
different clock period from a given clock source.
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 5
http://zedboard.org/content/changing-frequency-clock-using-createclock
Clocks of Different Frequencies (1/2)
• In practice, we often need clocks of different rates.
• Example: How to create a 1 KHz clock from the on-
board 100 MHz oscillator (clk)?
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 6
… … …
…
100 MHz
Clock
1 second
100 M x
100 M / 1 K = 100,000 x
1 ms
…
1 KHz
Clock
1 K x
Clocks of Different Frequencies (2/2)
• Trick: If we make a counter (count) that counts n
cycles, then we can generate a pulse (ms_pulse)
when the counter is at any particular value n.
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 7
signal ms_pulse: STD_LOGIC:='0';
signal count: integer:=0;
process(clk)
begin
if rising_edge(clk) then
if (count = (50000-1)) then
ms_pulse <= not ms_pulse;
count <= 0; -- reset count
else
count <= count + 1;
end if;
end if;
end process;
…
100 MHz
Clock
1 ms
1 KHz
Clock
100 M / 1 K = 100,000 x
ms_pulse
Class Exercise 6.1
• Write the code to create a 50 Hz clock from the on-
board 100 MHz oscillator (clk).
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 8
Student ID:
Name:
Date:
Clock Divider: Generate Your Clock!
-- generate 1ms and 1s clocks
process(clk)
begin
if rising_edge(clk) then
if (s_count = 49999999) then
s_pulse <= not s_pulse;
s_count <= 0;
else
s_count <= s_count + 1;
end if;
if (ms_count = 49999) then
ms_pulse <= not ms_pulse;
ms_count <= 0;
else
ms_count <= ms_count + 1;
end if;
end if;
end process;
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 10
-- 1s synchronous process
process(s_pulse)
begin
if rising_edge(s_pulse) then
...
end if;
end process;
-- 1ms synchronous process
process(ms_pulse)
begin
if rising_edge(ms_pulse) then
...
end if;
end process;
Outline
• Clock Sources of ZedBoard
• Digilent Pmod™ Peripheral Modules
– Example: Seven Segment Display (Pmod SSD)
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 11
Digilent Pmod™ Peripheral Modules
• Pmod™ devices are Digilent’s line of small I/O
interface boards.
– That offer an ideal way to extend the capabilities of
programmable logic and embedded control boards.
• Pmod modules communicate with system boards
using 6, 8, or 12-pin connectors.
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 12
https://store.digilentinc.com/pmod-modules-connectors/
Pmod Ports on ZedBoard (1/3)
• ZedBoard has five Pmod™ compatible headers (2x6).
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 13
JA1
JB1
JC1
JD1
JE1
Eight user I/O
Two 3.3V signals
Two ground signals
Pmod Ports on ZedBoard (2/3)
• Four Pmod connectors (JA1, JB1, JC1
and JD1) interface to the PL-side of
the Zynq-7000 AP SoC.
– JA1~JD1 connect to Bank 13 (3.3V).
– JA1~JD1 are placed in adjacent pairs on
the board edge.
• The clearance between JA1 and JB1 and
between JC1 and JD1 are both 10mm.
– JC1 and JD1 are aligned in a dual
configuration and routed differentially.
• To support LVDS running at 525Mbs.
• Pmod (JE1) connects to the PS-side
on MIO pins [0,9-15] in MIO Bank
0/500 (3.3V).
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 14
JA1
JB1
JC1
JD1
JE1
10mm
10mm
Pmod Ports on ZedBoard (3/3)
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 15
http://zedboard.org/sites/default/files/docu
mentations/ZedBoard_HW_UG_v2_2.pdf
Example: Pmod Seven Segment Display
• Product Description
– The Pmod SSD is a two-digit seven-segment display.
– Users can toggle through GPIO signals which digit is
currently on at a rate of 50 Hz or greater.
• To achieve persistence-of-vision to give the effect of both digits
being lit up simultaneously.
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 16
https://store.digilentinc.com/pmod-ssd-seven-segment-display/
Pmod SSD: Connect to ZedBoard
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 17
Pmod SSD: Time Multiplexing
• The two-digit displays share the same seven pins to
control the seven segments of each display
– One pin (e.g., sel) is to select which display to drive.
1: left digit
0: right digit
• To display both digits, we need to alternate between
the two digits faster than the eye can perceive.
– It look like both digits are displayed at the same time.
– For example, activate the 7-segment on the right then left at
a rate of 50 Hz and so on. (how to?)
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 18
Pmod SSD: Pinout Description Table
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 19
https://store.digilentinc.com/pmod-ssd-seven-segment-display/
ssd
ssd
sel
Pmod SSD: LED Mapping and Activation
• Each digit has seven LEDs, labeled A through G.
• To make the digits? Activating LED values as below:
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 20
Digit Segments Value (ssd)
0 A B C D E F “1111110”
1 B C “0110000”
2 A B D E G “1101101”
3 A B C D G “1111001”
4 B C F G “0110011”
5 A C D F G “1011011”
6 A C D E F G “1011111”
7 A B C “1110000”
8 A B C D E F G “1111111”
9 A B C F G “1110011”
Pmod SSD: XDC Constraint File
• To drive the Pmod SSD, you also need the following:
set_property IOSTANDARD LVCMOS33 [get_ports ssd]
set_property PACKAGE_PIN Y11 [get_ports {ssd[6]}]
set_property PACKAGE_PIN AA11 [get_ports {ssd[5]}]
set_property PACKAGE_PIN Y10 [get_ports {ssd[4]}]
set_property PACKAGE_PIN AA9 [get_ports {ssd[3]}]
set_property PACKAGE_PIN W12 [get_ports {ssd[2]}]
set_property PACKAGE_PIN W11 [get_ports {ssd[1]}]
set_property PACKAGE_PIN V10 [get_ports {ssd[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports sel]
set_property PACKAGE_PIN W8 [get_ports sel]
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 21
Digit
Selection
(sel)
Seven
Segments
(ssd)
Class Exercise 6.2
• Show how to activate the
LED values (ssd) for
hexadecimal digits:
A, b, C, d, E, F.
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 22
Student ID:
Name:
Date:
Digit Segments Value (ssd)
0 A B C D E F “1111110”
1 B C “0110000”
2 A B D E G “1101101”
3 A B C D G “1111001”
4 B C F G “0110011”
5 A C D F G “1011011”
6 A C D E F G “1011111”
7 A B C “1110000”
8 A B C D E F G “1111111”
9 A B C F G “1110011”
A
b
C
d
E
F
Summary
• Clock Sources of ZedBoard
• Digilent Pmod™ Peripheral Modules
– Example: Seven Segment Display (Pmod SSD)
CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 24

Mais conteúdo relacionado

Mais procurados

Programmable logic device (PLD)
Programmable logic device (PLD)Programmable logic device (PLD)
Programmable logic device (PLD)Sɐɐp ɐɥɯǝp
 
Fir filter design using Frequency sampling method
Fir filter design using Frequency sampling methodFir filter design using Frequency sampling method
Fir filter design using Frequency sampling methodSarang Joshi
 
Seminar on field programmable gate array
Seminar on field programmable gate arraySeminar on field programmable gate array
Seminar on field programmable gate arraySaransh Choudhary
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems VijayKumar5738
 
Trends and challenges in vlsi
Trends and challenges in vlsiTrends and challenges in vlsi
Trends and challenges in vlsilabishettybhanu
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.Omkar Rane
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts NishmaNJ
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilogJITU MISTRY
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architectureDominicHendry
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded SystemZakaria Gomaa
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filtersop205
 
Simulating communication systems with MATLAB: An introduction
Simulating communication systems with MATLAB: An introductionSimulating communication systems with MATLAB: An introduction
Simulating communication systems with MATLAB: An introductionAniruddha Chandra
 

Mais procurados (20)

Programmable logic device (PLD)
Programmable logic device (PLD)Programmable logic device (PLD)
Programmable logic device (PLD)
 
Multipliers in VLSI
Multipliers in VLSIMultipliers in VLSI
Multipliers in VLSI
 
ASk,FSK,PSK
ASk,FSK,PSKASk,FSK,PSK
ASk,FSK,PSK
 
Fir filter design using Frequency sampling method
Fir filter design using Frequency sampling methodFir filter design using Frequency sampling method
Fir filter design using Frequency sampling method
 
Switch level modeling
Switch level modelingSwitch level modeling
Switch level modeling
 
Seminar on field programmable gate array
Seminar on field programmable gate arraySeminar on field programmable gate array
Seminar on field programmable gate array
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems
 
Trends and challenges in vlsi
Trends and challenges in vlsiTrends and challenges in vlsi
Trends and challenges in vlsi
 
quantization
quantizationquantization
quantization
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
 
Pn sequence
Pn sequencePn sequence
Pn sequence
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
FPGA
FPGAFPGA
FPGA
 
Counters
CountersCounters
Counters
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
Fpga
FpgaFpga
Fpga
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 
Simulating communication systems with MATLAB: An introduction
Simulating communication systems with MATLAB: An introductionSimulating communication systems with MATLAB: An introduction
Simulating communication systems with MATLAB: An introduction
 

Semelhante a Clock Sources on ZedBoard.pdf

Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportAkash Mhankale
 
student_pres120202final
student_pres120202finalstudent_pres120202final
student_pres120202finalJohn Marquis
 
**Understanding_CTS_Log_Messages.pdf
**Understanding_CTS_Log_Messages.pdf**Understanding_CTS_Log_Messages.pdf
**Understanding_CTS_Log_Messages.pdfagnathavasi
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturersKeatonParker2
 
summer training report (2)
summer training report (2)summer training report (2)
summer training report (2)Kavya Gupta
 
Lalit Singh FPGA resume
Lalit Singh FPGA resumeLalit Singh FPGA resume
Lalit Singh FPGA resumeLalit singh
 
POLYTEDA PowerDRC/LVS overview
POLYTEDA PowerDRC/LVS overviewPOLYTEDA PowerDRC/LVS overview
POLYTEDA PowerDRC/LVS overviewAlexander Grudanov
 
PSC9131UG_C4_FD
PSC9131UG_C4_FDPSC9131UG_C4_FD
PSC9131UG_C4_FDHaim Amir
 
Real Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGAReal Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGAMafaz Ahmed
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingAnne Nicolas
 
Snake Game on FPGA in Verilog
Snake Game on FPGA in VerilogSnake Game on FPGA in Verilog
Snake Game on FPGA in VerilogKrishnajith S S
 
Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,Technogroovy
 

Semelhante a Clock Sources on ZedBoard.pdf (20)

Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project report
 
chapter 4
chapter 4chapter 4
chapter 4
 
pandu-vivek (1)
pandu-vivek (1)pandu-vivek (1)
pandu-vivek (1)
 
report cs
report csreport cs
report cs
 
student_pres120202final
student_pres120202finalstudent_pres120202final
student_pres120202final
 
**Understanding_CTS_Log_Messages.pdf
**Understanding_CTS_Log_Messages.pdf**Understanding_CTS_Log_Messages.pdf
**Understanding_CTS_Log_Messages.pdf
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
 
summer training report (2)
summer training report (2)summer training report (2)
summer training report (2)
 
Micro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application DevelopmentMicro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application Development
 
Lalit Singh FPGA resume
Lalit Singh FPGA resumeLalit Singh FPGA resume
Lalit Singh FPGA resume
 
POLYTEDA PowerDRC/LVS overview
POLYTEDA PowerDRC/LVS overviewPOLYTEDA PowerDRC/LVS overview
POLYTEDA PowerDRC/LVS overview
 
PSC9131UG_C4_FD
PSC9131UG_C4_FDPSC9131UG_C4_FD
PSC9131UG_C4_FD
 
Analog to Digital Converter
Analog to Digital ConverterAnalog to Digital Converter
Analog to Digital Converter
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
Real Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGAReal Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGA
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Snake Game on FPGA in Verilog
Snake Game on FPGA in VerilogSnake Game on FPGA in Verilog
Snake Game on FPGA in Verilog
 
Esd module2
Esd module2Esd module2
Esd module2
 
Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,
 

Último

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
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 Delhikauryashika82
 
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 writingTeacherCyreneCayanan
 

Último (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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
 
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
 

Clock Sources on ZedBoard.pdf

  • 1. CENG3430 Rapid Prototyping of Digital Systems Lecture 06: Use of Clock Sources and Peripheral Modules on ZedBoard Ming-Chang YANG mcyang@cse.cuhk.edu.hk
  • 2. Outline • Clock Sources of ZedBoard • Digilent Pmod™ Peripheral Modules – Example: Seven Segment Display (Pmod SSD) CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 2
  • 3. Recall: What we have done in Lab04 • Serial-in-parallel-out Shift Register CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 3 SW0: din BTNC: clk BTNR: rst LD0~LD7: dout How to use “real” clock resource(s) on ZedBoard?
  • 4. Clock Sources on ZedBoard (1/2) • Processing System – PS subsystem uses a dedicated 33.3333 MHz clock source with series termination. • IC18, Fox 767-33.333333-12 – PS subsystem can generate up to four phase-locked loop (PLL) based clocks for the PL system. • Programmable Logic – An on-board 100 MHz oscillator supplies the PL subsystem clock input on bank 13, pin Y9. • IC17, Fox 767-100-136 CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 4 http://zedboard.org/sites/default/files/documentations/ZedBoard_HW_UG_v2_2.pdf https://www.electronics-tutorials.ws/oscillator/oscillators.html
  • 5. Clock Sources on ZedBoard (2/2) • To use the on-board 100 MHz clock input on bank 13, pin Y9, you need to include the following in your XDC constraint file: set_property IOSTANDARD LVCMOS33 [get_ports clk] set_property PACKAGE_PIN Y9 [get_ports clk] create_clock -period 10 [get_ports clk] Note: • The constraint -period 10 is only used to inform the tool that clock period is 10 ns (i.e., 100 MHz). • The constraint -period 10 is NOT used specify or generate a different clock period from a given clock source. CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 5 http://zedboard.org/content/changing-frequency-clock-using-createclock
  • 6. Clocks of Different Frequencies (1/2) • In practice, we often need clocks of different rates. • Example: How to create a 1 KHz clock from the on- board 100 MHz oscillator (clk)? CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 6 … … … … 100 MHz Clock 1 second 100 M x 100 M / 1 K = 100,000 x 1 ms … 1 KHz Clock 1 K x
  • 7. Clocks of Different Frequencies (2/2) • Trick: If we make a counter (count) that counts n cycles, then we can generate a pulse (ms_pulse) when the counter is at any particular value n. CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 7 signal ms_pulse: STD_LOGIC:='0'; signal count: integer:=0; process(clk) begin if rising_edge(clk) then if (count = (50000-1)) then ms_pulse <= not ms_pulse; count <= 0; -- reset count else count <= count + 1; end if; end if; end process; … 100 MHz Clock 1 ms 1 KHz Clock 100 M / 1 K = 100,000 x ms_pulse
  • 8. Class Exercise 6.1 • Write the code to create a 50 Hz clock from the on- board 100 MHz oscillator (clk). CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 8 Student ID: Name: Date:
  • 9. Clock Divider: Generate Your Clock! -- generate 1ms and 1s clocks process(clk) begin if rising_edge(clk) then if (s_count = 49999999) then s_pulse <= not s_pulse; s_count <= 0; else s_count <= s_count + 1; end if; if (ms_count = 49999) then ms_pulse <= not ms_pulse; ms_count <= 0; else ms_count <= ms_count + 1; end if; end if; end process; CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 10 -- 1s synchronous process process(s_pulse) begin if rising_edge(s_pulse) then ... end if; end process; -- 1ms synchronous process process(ms_pulse) begin if rising_edge(ms_pulse) then ... end if; end process;
  • 10. Outline • Clock Sources of ZedBoard • Digilent Pmod™ Peripheral Modules – Example: Seven Segment Display (Pmod SSD) CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 11
  • 11. Digilent Pmod™ Peripheral Modules • Pmod™ devices are Digilent’s line of small I/O interface boards. – That offer an ideal way to extend the capabilities of programmable logic and embedded control boards. • Pmod modules communicate with system boards using 6, 8, or 12-pin connectors. CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 12 https://store.digilentinc.com/pmod-modules-connectors/
  • 12. Pmod Ports on ZedBoard (1/3) • ZedBoard has five Pmod™ compatible headers (2x6). CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 13 JA1 JB1 JC1 JD1 JE1 Eight user I/O Two 3.3V signals Two ground signals
  • 13. Pmod Ports on ZedBoard (2/3) • Four Pmod connectors (JA1, JB1, JC1 and JD1) interface to the PL-side of the Zynq-7000 AP SoC. – JA1~JD1 connect to Bank 13 (3.3V). – JA1~JD1 are placed in adjacent pairs on the board edge. • The clearance between JA1 and JB1 and between JC1 and JD1 are both 10mm. – JC1 and JD1 are aligned in a dual configuration and routed differentially. • To support LVDS running at 525Mbs. • Pmod (JE1) connects to the PS-side on MIO pins [0,9-15] in MIO Bank 0/500 (3.3V). CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 14 JA1 JB1 JC1 JD1 JE1 10mm 10mm
  • 14. Pmod Ports on ZedBoard (3/3) CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 15 http://zedboard.org/sites/default/files/docu mentations/ZedBoard_HW_UG_v2_2.pdf
  • 15. Example: Pmod Seven Segment Display • Product Description – The Pmod SSD is a two-digit seven-segment display. – Users can toggle through GPIO signals which digit is currently on at a rate of 50 Hz or greater. • To achieve persistence-of-vision to give the effect of both digits being lit up simultaneously. CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 16 https://store.digilentinc.com/pmod-ssd-seven-segment-display/
  • 16. Pmod SSD: Connect to ZedBoard CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 17
  • 17. Pmod SSD: Time Multiplexing • The two-digit displays share the same seven pins to control the seven segments of each display – One pin (e.g., sel) is to select which display to drive. 1: left digit 0: right digit • To display both digits, we need to alternate between the two digits faster than the eye can perceive. – It look like both digits are displayed at the same time. – For example, activate the 7-segment on the right then left at a rate of 50 Hz and so on. (how to?) CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 18
  • 18. Pmod SSD: Pinout Description Table CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 19 https://store.digilentinc.com/pmod-ssd-seven-segment-display/ ssd ssd sel
  • 19. Pmod SSD: LED Mapping and Activation • Each digit has seven LEDs, labeled A through G. • To make the digits? Activating LED values as below: CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 20 Digit Segments Value (ssd) 0 A B C D E F “1111110” 1 B C “0110000” 2 A B D E G “1101101” 3 A B C D G “1111001” 4 B C F G “0110011” 5 A C D F G “1011011” 6 A C D E F G “1011111” 7 A B C “1110000” 8 A B C D E F G “1111111” 9 A B C F G “1110011”
  • 20. Pmod SSD: XDC Constraint File • To drive the Pmod SSD, you also need the following: set_property IOSTANDARD LVCMOS33 [get_ports ssd] set_property PACKAGE_PIN Y11 [get_ports {ssd[6]}] set_property PACKAGE_PIN AA11 [get_ports {ssd[5]}] set_property PACKAGE_PIN Y10 [get_ports {ssd[4]}] set_property PACKAGE_PIN AA9 [get_ports {ssd[3]}] set_property PACKAGE_PIN W12 [get_ports {ssd[2]}] set_property PACKAGE_PIN W11 [get_ports {ssd[1]}] set_property PACKAGE_PIN V10 [get_ports {ssd[0]}] set_property IOSTANDARD LVCMOS33 [get_ports sel] set_property PACKAGE_PIN W8 [get_ports sel] CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 21 Digit Selection (sel) Seven Segments (ssd)
  • 21. Class Exercise 6.2 • Show how to activate the LED values (ssd) for hexadecimal digits: A, b, C, d, E, F. CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 22 Student ID: Name: Date: Digit Segments Value (ssd) 0 A B C D E F “1111110” 1 B C “0110000” 2 A B D E G “1101101” 3 A B C D G “1111001” 4 B C F G “0110011” 5 A C D F G “1011011” 6 A C D E F G “1011111” 7 A B C “1110000” 8 A B C D E F G “1111111” 9 A B C F G “1110011” A b C d E F
  • 22. Summary • Clock Sources of ZedBoard • Digilent Pmod™ Peripheral Modules – Example: Seven Segment Display (Pmod SSD) CENG3430 Lec06: Use of Clock Sources and Pmod on ZedBoard 24