{"id":372691,"date":"2024-05-21T05:18:28","date_gmt":"2024-05-21T05:18:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=372691"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=372691","title":{"rendered":"<span>Stopwatch implementation on FPGA board<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>Authors<\/strong><\/p>\n<p>Vladislav Grigorev, Efim Puzhalov, Egor Meganov<\/p>\n<ol>\n<li>\n<p><strong>Abstract<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>In this report we describe our implementation experience of a stopwatch system executing on an FPGA board. We programmed this device in the Quartus Prime II software environment by using Verilog hardware description language. The program is tailored to the Altera MAX 10 FPGA board, as well as uses a set of other peripheral devices for progress visualization purposes. During the implementation process, we encountered and resolved several hardware-related problems, including button bounce. The solutions to these issues are detailed within this document. This stopwatch has been implemented as an optional FPGA project on the Computer Architecture course at the Innopolis University.<\/p>\n<ol start=\"2\">\n<li>\n<p><strong>Introduction<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>A stopwatch is a timepiece designed to measure the amount of time that elapses between its activation and deactivation. It&#8217;s often used in sports, cooking, or other timed events. Clock is a non-portable timepiece used to keep track of time. The key difference lies in their functionality: a clock continuously measures the time, while a stopwatch can be started and stopped to measure the duration of specific events.<\/p>\n<p>A stopwatch is a widely used device for measuring time intervals. It&#8217;s often used in sports, cooking, or other timed events. Clock is a non-portable timepiece used to keep track of time. The key difference lies in their functionality: a clock continuously measures the time, while a stopwatch can be started and stopped to measure the duration of specific events.<\/p>\n<p>There are mainly two types of stopwatches implementations available, which are mechanical and digital. Mechanical stopwatches are powered by a mainspring, which must be wound up by turning the knurled knob. Digital stopwatches, due to their crystal oscillator timing element, are much more accurate than mechanical timepieces. Each type has its own unique features, making them suitable for different applications.<\/p>\n<p>In our project we study the implementation aspects of a digital stopwatch system based on the FPGA board. The key advantage of FPGAs is their high response speed and reliability, thus resulting in a more precise stopwatch system. We are not the first ones addressing such an FPGA-based stopwatch implementation ([1], [2]). However, the key advantage of our approach is that our stopwatch is able to count up to one hour without any delays, providing an accurate timekeeping experience. The use of a peripheral LED scheme enhances the visibility of the counting process, making it easy for users to monitor time progression. Furthermore, the ability to pause, continue, and stop the stopwatch offers flexibility and control to the user. This makes our implementation suitable for a wide range of applications where precise time measurement and control are required.<\/p>\n<p>During the implementation process, we faced a problem known as button bounce. This phenomenon caused random interference when attempting to record saved loops.<\/p>\n<ol start=\"3\">\n<li>\n<p><strong>Hardware and software used<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>Our project is implemented by using the following devices and technologies (see Appendix Figure 2).<\/p>\n<ul>\n<li>\n<p>Altera MAX 10 FPGA device<\/p>\n<\/li>\n<\/ul>\n<p>Buttons and switches (input devices)<\/p>\n<p>LEDs and 7-Segment display (output device)<\/p>\n<p>5V Power USB-Blaster (power supply for FPGA and upload firmware)<\/p>\n<ul>\n<li>\n<p>Peripheral devices\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>RGB LED (state indicator)<\/p>\n<p>Set of LEDs (time flow representation)<\/p>\n<p>Transistors (burnout protection)<\/p>\n<ul>\n<li>\n<p>Quartus Prime Light Edition 21.1.1<\/p>\n<\/li>\n<\/ul>\n<p>Verilog HDL (hardware description language)<\/p>\n<ol start=\"4\">\n<li>\n<p><strong>Technical implementation<\/strong><\/p>\n<\/li>\n<\/ol>\n<p><strong>4.1<\/strong> Finite state machine representation (FSM) of the program execution.<\/p>\n<p>The diagram (Figure 1) shows the flow of the program. The circles are states, arrows are transition conditions.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6c9\/49f\/9a2\/6c949f9a29068b8c34d45af6acaf5f8f.jpeg\" width=\"596\" height=\"681\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c9\/49f\/9a2\/6c949f9a29068b8c34d45af6acaf5f8f.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>Figure 1: Program flow states.<\/p>\n<p><strong>4.2<\/strong>Displaying the state of the program<\/p>\n<p>LED indicates whether the stopwatch is active or paused. MAX 10 has a row of the named LEDs. In our case \u201cLEDR0\u201d is responsible for the indication of active state of countdown, flashing every second (see Appendix Figure 3).<\/p>\n<p>In addition the RGB LED (see Appendix Figure 4) was connected via Arduino connector to indicate all the states of the stopwatch (Default\/Pause &#8212;\u00a0 red, Active &#8212; green, Loops check &#8212; blue).<\/p>\n<p>For the better interpretation of the time flow, we decided to add a circuit with a row of additional LEDs of different colors (see Appendix Figure 5), which sequentially change their flashing state. To prevent the burnout of the LEDs, the circuit was supported by resistors.<\/p>\n<p><strong>4.3<\/strong>Time display<\/p>\n<p>The main time counting is tracked via a 7-segment digit display. Each segment is represented as a unique output pin (see Appendix Figure 6). To simplify the process of the numbers output, we decided to create an array of 10 elements, which contained a binary representation of each digit from 0 to 9. The problem was that the values of each segment were inverted. Proper values have been handpicked by ourselves manually.<\/p>\n<p><strong>4.4<\/strong>Clock\u00a0<\/p>\n<p>The frequency of the clock update is 50 MHz, which means it makes 50 * 106<\/p>\n<p>cycles per second. Taking this into consideration we update our display each 1 centisecond i.e. each 500.000 ticks.\u00a0<\/p>\n<p><strong>4.5<\/strong>Schmitt trigger<\/p>\n<p>To move between stages we use buttons. Generally every button has a bounce effect (see Appendix Figure 7), some electrical noise generated as the button rapidly oscillates between states immediately after a button is pressed but before it settles. To overcome this problem we use a special schmitt trigger integrated into the FPGA board.<\/p>\n<ol start=\"5\">\n<li>\n<p><strong>Demonstration<\/strong><\/p>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/photos.app.goo.gl\/CcPgUqBN3E1H9iYP6\" rel=\"noopener noreferrer nofollow\"><strong><u>Video<\/u><\/strong><\/a><\/p>\n<p><u>Step-by-step instruction<\/u>\u00a0<\/p>\n<ol>\n<li>\n<p>Install Quartus Prime 21.1.1<\/p>\n<\/li>\n<li>\n<p>Open Quartus Prime 21.1.1<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a0c\/ff3\/f21\/a0cff3f2173bb3cebf1c9438f25baf1e.png\" width=\"1600\" height=\"883\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a0c\/ff3\/f21\/a0cff3f2173bb3cebf1c9438f25baf1e.png\"\/><\/figure>\n<p>Quartus Prime 21.1.1<\/p>\n<ol start=\"3\">\n<li>\n<p>New project wizard<\/p>\n<\/li>\n<li>\n<p>Press &#171;Next&#187; (This section may not be displayed if you disabled it earlier).<\/p>\n<\/li>\n<li>\n<p>Choose the directory for your project, set some name for the project, set &#171;top&#187; as<\/p>\n<\/li>\n<\/ol>\n<p>top-level entity. Press &#171;Next&#187; (Directory, Name, Top-Level Entity).<\/p>\n<ol start=\"6\">\n<li>\n<p>Select &#171;Empty project&#187;. Press &#171;Next&#187; (Project type).<\/p>\n<\/li>\n<li>\n<p>Press &#171;Next&#187; (Add Files).<\/p>\n<\/li>\n<li>\n<p>First, choose your device family in the &#171;Family&#187; list. Second, select your device in the &#171;Available devices&#187; list (Usually the device name is written on an FPGA, in other words, on a big black square). Finally, press &#171;Next&#187; (Family, Device &amp; Board Settings).<\/p>\n<\/li>\n<li>\n<p>Press &#171;Next&#187; (EDA Tool Settings).<\/p>\n<\/li>\n<li>\n<p>Press &#171;Finish&#187; (Summary).<\/p>\n<\/li>\n<li>\n<p>Create all files and copy paste corresponding code from <a href=\"https:\/\/github.com\/RwKaLs\/StopWatch-FPGA\/blob\/main\/stopwatch00.v\" rel=\"noopener noreferrer nofollow\"><u>GitHub<\/u><\/a> using following approach: File >> New >> Verilog HDL >> OK >> copy paste the code >> File >> Save as&#8230; >> set corresponding to code name >> Save\u00a0<\/p>\n<\/li>\n<li>\n<p>Project Navigator >> Files >> Choose your file >> Set as Top-Level Entity.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/380\/0c5\/1ae\/3800c51ae694bbeeb5d42636c3ca4b73.png\" width=\"651\" height=\"283\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/380\/0c5\/1ae\/3800c51ae694bbeeb5d42636c3ca4b73.png\"\/><\/figure>\n<p>Project Navigator.<\/p>\n<ol start=\"13\">\n<li>\n<p>Processing >> Start Compilation.<\/p>\n<\/li>\n<li>\n<p>Assignments >> Pin planner.<\/p>\n<\/li>\n<li>\n<p>Close Pin planner.<\/p>\n<\/li>\n<li>\n<p>Tools >> Programmer >> Hardware setup >> Select your device.<\/p>\n<\/li>\n<li>\n<p>Close Hardware setup.<\/p>\n<\/li>\n<li>\n<p>Press Start.<\/p>\n<\/li>\n<li>\n<p>Done, stopwatch installed on your device.<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<ol start=\"5\">\n<li>\n<p><strong>Conclusion<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>The project has reached completion and fully meets the declared functionality. Future development could focus on addressing the button bounce issue. In conclusion, we have detailed the basic implementation of a stopwatch using an FPGA board, Quartus Prime software, and Verilog HDL. This project was undertaken as part of the \u201cComputer Architecture\u201d course at Innopolis University. The primary goal of this project was to create a functional stopwatch, and to foster teamwork and enhance our skills in FPGA programming.<\/p>\n<h3>Acknowledgments<\/h3>\n<p>The authors would like to express gratitude to our professors<a href=\"https:\/\/www.researchgate.net\/profile\/Artem_Burmyakov\" rel=\"noopener noreferrer nofollow\"><u> Artem Burmyakov<\/u><\/a> and <a href=\"https:\/\/www.researchgate.net\/profile\/Alexander-Tormasov\" rel=\"noopener noreferrer nofollow\"><u>Alexander Tormasov<\/u><\/a> for giving us deep knowledge and possibility to use it in practice.\u00a0<\/p>\n<h3>References<\/h3>\n<p>\u00a0[1] <a href=\"https:\/\/ieeexplore.ieee.org\/abstract\/document\/8250622\" rel=\"noopener noreferrer nofollow\"><u>Design and implementation of digital clock with stopwatch on FPGA<\/u><\/a><\/p>\n<p><strong>\u00a0<\/strong>[2] <a href=\"https:\/\/www.ijsdr.org\/papers\/IJSDR2306229.pdf\" rel=\"noopener noreferrer nofollow\"><u>Implementation of DIgital Clock Stopwatch on FPGA<\/u><\/a><\/p>\n<p>\u00a0[3] <a href=\"https:\/\/moodle.innopolis.university\/pluginfile.php\/158471\/mod_resource\/content\/1\/DE10-Lite_User_Manual.pdf\" rel=\"noopener noreferrer nofollow\"><u>Max-10 manual<\/u><\/a><\/p>\n<p>\u00a0[4] <a href=\"https:\/\/www.intel.com\/content\/dam\/support\/us\/en\/programmable\/support-resources\/bulk-container\/pdfs\/literature\/misc\/fpgas-for-dummies-ebook.pdf\" rel=\"noopener noreferrer nofollow\"><u>FPGAs For Dummies<\/u><\/a><\/p>\n<p>\u00a0[5] <a href=\"https:\/\/www.youtube.com\/watch?v=pH9WQXhZEbw\" rel=\"noopener noreferrer nofollow\"><u>Display MAX-10 pins<\/u><\/a><\/p>\n<p><strong>Appendix<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/364\/75e\/007\/36475e007bc083dbda525cc009c69ba6.jpeg\" width=\"996\" height=\"516\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/364\/75e\/007\/36475e007bc083dbda525cc009c69ba6.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u00a0\u00a0Figure 2: The schematic representation of an FPGA board.<\/p>\n<p><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/81e\/0ef\/a48\/81e0efa481197da3e49131ee0d847696.jpeg\" width=\"1600\" height=\"363\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/81e\/0ef\/a48\/81e0efa481197da3e49131ee0d847696.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>Figure 3: LEDs arrangement.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6e1\/952\/ea3\/6e1952ea3fc0cd2dd5c8147cb88cc205.png\" width=\"1118\" height=\"779\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e1\/952\/ea3\/6e1952ea3fc0cd2dd5c8147cb88cc205.png\"\/><\/figure>\n<p>Figure 4: RGB LED during state 5.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ef2\/45f\/ebc\/ef245febc2fe80727d164cd35769e420.jpeg\" width=\"1084\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef2\/45f\/ebc\/ef245febc2fe80727d164cd35769e420.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>Figure 5: Additional circuit of LEDs.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eeb\/3e0\/920\/eeb3e092057c8ee8dd2e42868742a152.png\" width=\"746\" height=\"328\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eeb\/3e0\/920\/eeb3e092057c8ee8dd2e42868742a152.png\"\/><\/figure>\n<p>Figure 6: 7-segment display.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/365\/2c7\/f5f\/3652c7f5f2f279e4a5e094890474280d.png\" width=\"479\" height=\"296\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/365\/2c7\/f5f\/3652c7f5f2f279e4a5e094890474280d.png\"\/><\/figure>\n<p>Figure 7: Button \u201cBounce\u201d<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/805215\/\"> https:\/\/habr.com\/ru\/articles\/805215\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>Authors<\/strong><\/p>\n<p>Vladislav Grigorev, Efim Puzhalov, Egor Meganov<\/p>\n<ol>\n<li>\n<p><strong>Abstract<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>In this report we describe our implementation experience of a stopwatch system executing on an FPGA board. We programmed this device in the Quartus Prime II software environment by using Verilog hardware description language. The program is tailored to the Altera MAX 10 FPGA board, as well as uses a set of other peripheral devices for progress visualization purposes. During the implementation process, we encountered and resolved several hardware-related problems, including button bounce. The solutions to these issues are detailed within this document. This stopwatch has been implemented as an optional FPGA project on the Computer Architecture course at the Innopolis University.<\/p>\n<ol start=\"2\">\n<li>\n<p><strong>Introduction<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>A stopwatch is a timepiece designed to measure the amount of time that elapses between its activation and deactivation. It&#8217;s often used in sports, cooking, or other timed events. Clock is a non-portable timepiece used to keep track of time. The key difference lies in their functionality: a clock continuously measures the time, while a stopwatch can be started and stopped to measure the duration of specific events.<\/p>\n<p>A stopwatch is a widely used device for measuring time intervals. It&#8217;s often used in sports, cooking, or other timed events. Clock is a non-portable timepiece used to keep track of time. The key difference lies in their functionality: a clock continuously measures the time, while a stopwatch can be started and stopped to measure the duration of specific events.<\/p>\n<p>There are mainly two types of stopwatches implementations available, which are mechanical and digital. Mechanical stopwatches are powered by a mainspring, which must be wound up by turning the knurled knob. Digital stopwatches, due to their crystal oscillator timing element, are much more accurate than mechanical timepieces. Each type has its own unique features, making them suitable for different applications.<\/p>\n<p>In our project we study the implementation aspects of a digital stopwatch system based on the FPGA board. The key advantage of FPGAs is their high response speed and reliability, thus resulting in a more precise stopwatch system. We are not the first ones addressing such an FPGA-based stopwatch implementation ([1], [2]). However, the key advantage of our approach is that our stopwatch is able to count up to one hour without any delays, providing an accurate timekeeping experience. The use of a peripheral LED scheme enhances the visibility of the counting process, making it easy for users to monitor time progression. Furthermore, the ability to pause, continue, and stop the stopwatch offers flexibility and control to the user. This makes our implementation suitable for a wide range of applications where precise time measurement and control are required.<\/p>\n<p>During the implementation process, we faced a problem known as button bounce. This phenomenon caused random interference when attempting to record saved loops.<\/p>\n<ol start=\"3\">\n<li>\n<p><strong>Hardware and software used<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>Our project is implemented by using the following devices and technologies (see Appendix Figure 2).<\/p>\n<ul>\n<li>\n<p>Altera MAX 10 FPGA device<\/p>\n<\/li>\n<\/ul>\n<p>Buttons and switches (input devices)<\/p>\n<p>LEDs and 7-Segment display (output device)<\/p>\n<p>5V Power USB-Blaster (power supply for FPGA and upload firmware)<\/p>\n<ul>\n<li>\n<p>Peripheral devices\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>RGB LED (state indicator)<\/p>\n<p>Set of LEDs (time flow representation)<\/p>\n<p>Transistors (burnout protection)<\/p>\n<ul>\n<li>\n<p>Quartus Prime Light Edition 21.1.1<\/p>\n<\/li>\n<\/ul>\n<p>Verilog HDL (hardware description language)<\/p>\n<ol start=\"4\">\n<li>\n<p><strong>Technical implementation<\/strong><\/p>\n<\/li>\n<\/ol>\n<p><strong>4.1<\/strong> Finite state machine representation (FSM) of the program execution.<\/p>\n<p>The diagram (Figure 1) shows the flow of the program. The circles are states, arrows are transition conditions.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Figure 1: Program flow states.<\/p>\n<p><strong>4.2<\/strong>Displaying the state of the program<\/p>\n<p>LED indicates whether the stopwatch is active or paused. MAX 10 has a row of the named LEDs. In our case \u201cLEDR0\u201d is responsible for the indication of active state of countdown, flashing every second (see Appendix Figure 3).<\/p>\n<p>In addition the RGB LED (see Appendix Figure 4) was connected via Arduino connector to indicate all the states of the stopwatch (Default\/Pause &#8212;\u00a0 red, Active &#8212; green, Loops check &#8212; blue).<\/p>\n<p>For the better interpretation of the time flow, we decided to add a circuit with a row of additional LEDs of different colors (see Appendix Figure 5), which sequentially change their flashing state. To prevent the burnout of the LEDs, the circuit was supported by resistors.<\/p>\n<p><strong>4.3<\/strong>Time display<\/p>\n<p>The main time counting is tracked via a 7-segment digit display. Each segment is represented as a unique output pin (see Appendix Figure 6). To simplify the process of the numbers output, we decided to create an array of 10 elements, which contained a binary representation of each digit from 0 to 9. The problem was that the values of each segment were inverted. Proper values have been handpicked by ourselves manually.<\/p>\n<p><strong>4.4<\/strong>Clock\u00a0<\/p>\n<p>The frequency of the clock update is 50 MHz, which means it makes 50 * 106<\/p>\n<p>cycles per second. Taking this into consideration we update our display each 1 centisecond i.e. each 500.000 ticks.\u00a0<\/p>\n<p><strong>4.5<\/strong>Schmitt trigger<\/p>\n<p>To move between stages we use buttons. Generally every button has a bounce effect (see Appendix Figure 7), some electrical noise generated as the button rapidly oscillates between states immediately after a button is pressed but before it settles. To overcome this problem we use a special schmitt trigger integrated into the FPGA board.<\/p>\n<ol start=\"5\">\n<li>\n<p><strong>Demonstration<\/strong><\/p>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/photos.app.goo.gl\/CcPgUqBN3E1H9iYP6\" rel=\"noopener noreferrer nofollow\"><strong><u>Video<\/u><\/strong><\/a><\/p>\n<p><u>Step-by-step instruction<\/u>\u00a0<\/p>\n<ol>\n<li>\n<p>Install Quartus Prime 21.1.1<\/p>\n<\/li>\n<li>\n<p>Open Quartus Prime 21.1.1<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<p>Quartus Prime 21.1.1<\/p>\n<ol start=\"3\">\n<li>\n<p>New project wizard<\/p>\n<\/li>\n<li>\n<p>Press &#171;Next&#187; (This section may not be displayed if you disabled it earlier).<\/p>\n<\/li>\n<li>\n<p>Choose the directory for your project, set some name for the project, set &#171;top&#187; as<\/p>\n<\/li>\n<\/ol>\n<p>top-level entity. Press &#171;Next&#187; (Directory, Name, Top-Level Entity).<\/p>\n<ol start=\"6\">\n<li>\n<p>Select &#171;Empty project&#187;. Press &#171;Next&#187; (Project type).<\/p>\n<\/li>\n<li>\n<p>Press &#171;Next&#187; (Add Files).<\/p>\n<\/li>\n<li>\n<p>First, choose your device family in the &#171;Family&#187; list. Second, select your device in the &#171;Available devices&#187; list (Usually the device name is written on an FPGA, in other words, on a big black square). Finally, press &#171;Next&#187; (Family, Device &amp; Board Settings).<\/p>\n<\/li>\n<li>\n<p>Press &#171;Next&#187; (EDA Tool Settings).<\/p>\n<\/li>\n<li>\n<p>Press &#171;Finish&#187; (Summary).<\/p>\n<\/li>\n<li>\n<p>Create all files and copy paste corresponding code from <a href=\"https:\/\/github.com\/RwKaLs\/StopWatch-FPGA\/blob\/main\/stopwatch00.v\" rel=\"noopener noreferrer nofollow\"><u>GitHub<\/u><\/a> using following approach: File >> New >> Verilog HDL >> OK >> copy paste the code >> File >> Save as&#8230; >> set corresponding to code name >> Save\u00a0<\/p>\n<\/li>\n<li>\n<p>Project Navigator >> Files >> Choose your file >> Set as Top-Level Entity.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<p>Project Navigator.<\/p>\n<ol start=\"13\">\n<li>\n<p>Processing >> Start Compilation.<\/p>\n<\/li>\n<li>\n<p>Assignments >> Pin planner.<\/p>\n<\/li>\n<li>\n<p>Close Pin planner.<\/p>\n<\/li>\n<li>\n<p>Tools >> Programmer >> Hardware setup >> Select your device.<\/p>\n<\/li>\n<li>\n<p>Close Hardware setup.<\/p>\n<\/li>\n<li>\n<p>Press Start.<\/p>\n<\/li>\n<li>\n<p>Done, stopwatch installed on your device.<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<ol start=\"5\">\n<li>\n<p><strong>Conclusion<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>The project has reached completion and fully meets the declared functionality. Future development could focus on addressing the button bounce issue. In conclusion, we have detailed the basic implementation of a stopwatch using an FPGA board, Quartus Prime software, and Verilog HDL. This project was undertaken as part of the \u201cComputer Architecture\u201d course at Innopolis University. The primary goal of this project was to create a functional stopwatch, and to foster teamwork and enhance our skills in FPGA programming.<\/p>\n<h3>Acknowledgments<\/h3>\n<p>The authors would like to express gratitude to our professors<a href=\"https:\/\/www.researchgate.net\/profile\/Artem_Burmyakov\" rel=\"noopener noreferrer nofollow\"><u> Artem Burmyakov<\/u><\/a> and <a href=\"https:\/\/www.researchgate.net\/profile\/Alexander-Tormasov\" rel=\"noopener noreferrer nofollow\"><u>Alexander Tormasov<\/u><\/a> for giving us deep knowledge and possibility to use it in practice.\u00a0<\/p>\n<h3>References<\/h3>\n<p>\u00a0[1] <a href=\"https:\/\/ieeexplore.ieee.org\/abstract\/document\/8250622\" rel=\"noopener noreferrer nofollow\"><u>Design and implementation of digital clock with stopwatch on FPGA<\/u><\/a><\/p>\n<p><strong>\u00a0<\/strong>[2] <a href=\"https:\/\/www.ijsdr.org\/papers\/IJSDR2306229.pdf\" rel=\"noopener noreferrer nofollow\"><u>Implementation of DIgital Clock Stopwatch on FPGA<\/u><\/a><\/p>\n<p>\u00a0[3] <a href=\"https:\/\/moodle.innopolis.university\/pluginfile.php\/158471\/mod_resource\/content\/1\/DE10-Lite_User_Manual.pdf\" rel=\"noopener noreferrer nofollow\"><u>Max-10 manual<\/u><\/a><\/p>\n<p>\u00a0[4] <a href=\"https:\/\/www.intel.com\/content\/dam\/support\/us\/en\/programmable\/support-resources\/bulk-container\/pdfs\/literature\/misc\/fpgas-for-dummies-ebook.pdf\" rel=\"noopener noreferrer nofollow\"><u>FPGAs For Dummies<\/u><\/a><\/p>\n<p>\u00a0[5] <a href=\"https:\/\/www.youtube.com\/watch?v=pH9WQXhZEbw\" rel=\"noopener noreferrer nofollow\"><u>Display MAX-10 pins<\/u><\/a><\/p>\n<p><strong>Appendix<\/strong><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u00a0\u00a0Figure 2: The schematic representation of an FPGA board.<\/p>\n<p><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Figure 3: LEDs arrangement.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Figure 4: RGB LED during state 5.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Figure 5: Additional circuit of LEDs.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Figure 6: 7-segment display.<\/p>\n<figure class=\"\"><\/figure>\n<p>Figure 7: Button \u201cBounce\u201d<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/805215\/\"> https:\/\/habr.com\/ru\/articles\/805215\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-372691","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=372691"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372691\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}