{"id":519284,"date":"2017-01-13T10:13:17","date_gmt":"2017-01-13T09:13:17","guid":{"rendered":"http:\/\/antonpotocnik.com\/?p=519284"},"modified":"2017-12-14T03:35:58","modified_gmt":"2017-12-14T02:35:58","slug":"red-pitaya-fpga-project-4-frequency-counter","status":"publish","type":"post","link":"https:\/\/antonpotocnik.com\/?p=519284","title":{"rendered":"Red Pitaya FPGA Project 4 &#8211; Frequency Counter"},"content":{"rendered":"<h1>Introduction<\/h1>\n<p>On the way to a powerful acquisition systems let us make a quick detour and create a useful and simple project &#8211; <a href=\"https:\/\/en.wikipedia.org\/wiki\/Frequency_counter\" target=\"_blank\"><em>the Frequency Counter<\/em><\/a>. Yes, to measure frequencies one can use Red Pitaya&#8217;s native apps such as <a href=\"http:\/\/blog.redpitaya.com\/red-pitaya-oscilloscope-pro-signal-generator\/\" target=\"_blank\">Oscilloscope<\/a> or <a href=\"http:\/\/redpitaya.com\/apps\/spectrum-analyzer\/\" target=\"_blank\">Spectrum Analyzer<\/a>, however, our program will be able to determine frequencies with much higher resolution and at the same time we will learn how to use Red Pitaya&#8217;s 125 Msamples\/s 14-bit ADC and DAC peripherals in the FPGA program.<\/p>\n<p><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_intro.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-519285\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_intro.jpg\" width=\"500\" height=\"366\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_intro.jpg 900w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_intro-300x220.jpg 300w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_intro-768x562.jpg 768w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a>This project contains two separate parts: the <em>data acquisition<\/em> part with frequency counter and LED data display and the <em>signal generator<\/em> part. To communicate with these two parts we use the General Purpose IO block for setting configuration values and reading the counter output.<\/p>\n<p>The frequency counter will be implemented in the <a href=\"http:\/\/www.best-microcontroller-projects.com\/article-frequency-counter.html\" target=\"_blank\">reciprocal counting scheme <\/a>where a period of time of a predefined number of signal oscillations is measured and then inverted and divided by the number of oscillations. Such scheme can yield a much better frequency resolution, especially for low frequency signals, compared to the conventional method where number of signal cycles are counted in a predefined gate time.<\/p>\n<h1>Building the Project<\/h1>\n<p>To start off download the project from the <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\" target=\"_blank\">github<\/a>. First, build the necessary custom IP cores by navigating to <em>\/redpitaya_guide<\/em> base folder\u00a0in Vivado\u2019s tcl console and execute<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsource make_cores.tcl\r\n<\/pre>\n<p>This will create all custom IP cores in the <em>\/redpitaya_guide\/t<\/em><em>mp\/cores<\/em> folder. In this project we will use <em>axis_red_pitaya_adc <\/em>and <em>axis_red_pitaya_dac <\/em>IP cores from Pavel Demin which are handling fast ADCs and DACs peripherals on the Red Pitaya board. I only added\u00a0a global clock buffer\u00a0to the <em>axis_red_pitaya_adc<\/em> core for an optimal performance under Vivado 2016.3 and higher version.<\/p>\n<p>Once the custom cores are created build the project by appropriately modifying the <em>make_project.tcl <\/em>script and execute it in Vivado\u2019s tcl console with<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsource make_project.tcl\r\n<\/pre>\n<h1>Project overview<\/h1>\n<p>The full block design of the frequency counter project is composed of six parts: Processing System, GPIO, Signal Generator, Data Acquisition, Frequency Counter and Signal Decoder block as shown in the figure below.<\/p>\n<div id=\"attachment_519458\" style=\"width: 1297px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_block_design3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-519458\" class=\"wp-image-519458 size-full\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_block_design3.png\" width=\"1287\" height=\"577\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_block_design3.png 1287w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_block_design3-300x134.png 300w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_block_design3-768x344.png 768w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_block_design3-1024x459.png 1024w\" sizes=\"auto, (max-width: 1287px) 100vw, 1287px\" \/><\/a><p id=\"caption-attachment-519458\" class=\"wp-caption-text\">Block Design Overview<\/p><\/div>\n<p>These parts will be described in detail below. You can skip the lengthy description and go directly to the fun part at the end of the post.<\/p>\n<h3>Processing system<\/h3>\n<p>Let\u2019s start with the most common part &#8211; the processing system IP core. Together with the AXI Interconnect and Processor System Reset block these are the most common blocks in most of the Zynq 7000 FPGA applications. Since they take quite some space and have a lot of connections we will join them in a single hierarchy block, so they will take less space and make block design more transparent. To create a hierarchy select desired blocks, right click and select <em>Create Hierarchy<\/em>. From now on we will put in hierarchies most of the blocks with related functionality.<\/p>\n<div id=\"attachment_514767\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2016\/12\/4_averager_PS7.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-514767\" class=\"wp-image-514767\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2016\/12\/4_averager_PS7.png\" alt=\"Processing System 7 Hierarchy\" width=\"500\" height=\"294\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2016\/12\/4_averager_PS7.png 866w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2016\/12\/4_averager_PS7-300x176.png 300w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2016\/12\/4_averager_PS7-768x451.png 768w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><p id=\"caption-attachment-514767\" class=\"wp-caption-text\">Processing System 7 Hierarchy<\/p><\/div>\n<h3>General Purpose Input-Output Core<\/h3>\n<p>In the previous project we have learned how to write and read from the FPGA logic. We will use the same approach here for setting configurations such as number of cycles and signal generator&#8217;s phase increment. We will use the first GPIO port as an input to make results of the frequency counter available to a program running on the Linux side. Second GPIO port will be used as an 32-bit output port containing 27-bit <em>phase_inc <\/em>value for the signal generator and 5-bit <em>log2Ncycles<\/em> value for the frequency counter:<\/p>\n<p>gpio2_io_o[31:0] = <sub>31<\/sub>[ {27-bit <em>phase_inc<\/em>} {5-bit <em>log2Ncycles<\/em>} ]<sub>0<\/sub>.<\/p>\n<p>If you ever need more configuration output bits you can use Pavel Demin\u2019s <em>axi_configuration<\/em> IP core with a custom number of bits in a single output port. <em>axi_configuration<\/em> can be found in the <em>redpitaya_guide\/core<\/em> folder, which is automatically created with the <em>make_cores.tcl<\/em> script as described above.<\/p>\n<h3>Signal Generator<\/h3>\n<p>Signal Generator hierarchy creates a sin(<em>\u03c9t<\/em>) and cos(<em>\u03c9t<\/em>) signals at the two DAC output ports with a user defined frequency. The analog signal is generated with three blocks: <em>DDS compiler<\/em> for calculating 14-bit sinusoidal values, <em>Clock Wizard<\/em> to create a double clock frequency which allows setting the two DAC channels on each input clock cycle and <em>AXI-4 Stream Red Pitaya DAC<\/em> core for setting signal values to the external DAC unit. We will use\u00a0125 MHz <em>adc_clock<\/em> as input clock to achieve 125 Msamples\/s data rate.<\/p>\n<div id=\"attachment_519291\" style=\"width: 862px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_SignalGenerator.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-519291\" class=\"wp-image-519291 size-full\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_SignalGenerator.png\" width=\"852\" height=\"244\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_SignalGenerator.png 852w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_SignalGenerator-300x86.png 300w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_SignalGenerator-768x220.png 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/a><p id=\"caption-attachment-519291\" class=\"wp-caption-text\">Signal Generator Hierarchy<\/p><\/div>\n<p>Frequency, amplitude and other parameters can be set in the Direct Digital Synthesizer (DDS) re-customization dialog. Current DDS core settings will create sin(<em>\u03c9t<\/em>) on one and cos(<em>\u03c9t<\/em>) on the other DAC channel with maximal amplitude of +\/- 1V (maximal range) on both channels.<\/p>\n<p>The synthesized signal frequency is in the DDS compiler determined by a phase increment value at each clock cycle. A nice description of the signal synthesizer operation can be found in the <a href=\"https:\/\/www.xilinx.com\/support\/documentation\/ip_documentation\/dds_compiler\/v6_0\/pg141-dds-compiler.pdf\" target=\"_blank\">DDS compiler product guide<\/a>. The signal frequency can be set fixed at the design stage by choosing <em>Fixed<\/em> Phase Increment in the DDS re-customization dialog. In this case the dialog automatically calculates the required constant phase increment for a desired frequency and frequency resolution. Note that the output frequency will be a divisor of the clock frequency and might therefore deviate from the requested frequency.<\/p>\n<p>Since we want to change the frequency during an operation we choose <em>Streaming<\/em> Phase Increment in the re-customization dialog, which requires a phase increment value to be continuously supplied to the S_AXIS_PHASE input interface. AXIS interface implements the <a href=\"https:\/\/www.xilinx.com\/support\/documentation\/ip_documentation\/axi_ref_guide\/latest\/ug1037-vivado-axi-reference-guide.pdf\" target=\"_blank\">AXI4-Stream protocol<\/a> developed for fast directed data flow. It implements the basic handshake using at least <em>tvalid<\/em> and <em>tready<\/em> signals, however, we will neglect even those for our nearly constant phase increment value. To create a continuous stream of the user defined values we use Pavel Demin&#8217;s <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/cores\/axis_constant_v1_0\/axis_constant.v\" target=\"_blank\">AXI4-Stream Constant<\/a> IP core, which converts 32-bit input bus to the AXIS master interface. For the input we take 27-bit <em>phase_inc <\/em>value from the <em>gpio2_io_o<\/em> port using Slice IP core. Calculation of the<em> phase_inc<\/em> for a desired output frequency will be discussed in the last part of the post.<\/p>\n<h3>Data Acquisition<\/h3>\n<h4>AXI4-Stream Red Pitaya ADC Core<\/h4>\n<p>The first block in the Data Acquisition hierarchy is the axis_red_pitaya_adc_v1_0 IP core with two main features. First, it converts the external 125 MHz clock from <em>adc_clk_a<\/em> and <em>adc_clk_b<\/em> differential external ports into our programmable logic as a <em>adc_clk<\/em> clock. Second, it reads the ADC data from two input channels which becomes available on each <em>adc_clk<\/em> clock cycle and makes it available over the AXI Stream (AXIS) interface <em>M_AXIS<\/em>. <em>axis_red_pitaya_adc_v1_0<\/em> IP core uses two ports of the AXIS interface, the <em>axis_tvalid<\/em> port which is always asserted and the <em>axis_tdata<\/em> a 32-bit data port with new measurements available on every clock cycle. 32-bit <em>axis_tdata<\/em> contains 16-bit\u00a0channel 2 value and 16-bit channel 1 value:<\/p>\n<p>M_AXIS_tdata[31:0] = <sub>31<\/sub>[ {16-bit ADC2 value} {16-bit ADC1 value} ]<sub>0<\/sub>.<\/p>\n<p>Since Red Pitaya has 14-bit ADC the 16-bit value has two most significant bits set to either 00 or 11 depending on the sign of the measured value. It is instructive to have a look at the Verilog code of\u00a0 <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/cores\/axis_red_pitaya_adc_v1_0\/axis_red_pitaya_adc.v\" target=\"_blank\">AXI4-Stream Red Pitaya ADC core<\/a>. Note that Red Pitaya&#8217;s ADC core has an additional output port (<em>adc_csn)<\/em> connected to the external port <em>adc_csn_o<\/em> for a clock duty cycle stabilization<em>.<\/em><\/p>\n<div id=\"attachment_519456\" style=\"width: 706px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_data_acquisition.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-519456\" class=\"size-full wp-image-519456\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_data_acquisition.png\" alt=\"\" width=\"696\" height=\"184\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_data_acquisition.png 696w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_data_acquisition-300x79.png 300w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/a><p id=\"caption-attachment-519456\" class=\"wp-caption-text\">Data Acquisition Hierarchy<\/p><\/div>\n<h4>Signal Split\u00a0 Module<\/h4>\n<p>The second block in the hierarchy is the <em>signal_split<\/em> RTL module. It transforms ADC output interface M_AXIS with two channel values into two M_AXIS output interfaces each containing a single channel value. The module has a very simple Verilog code, which can be found on <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/projects\/4_frequency_counter\/signal_split.v\" target=\"_blank\">github<\/a>.<\/p>\n<p>It is interesting to note that if you want to create an input or an output interface on a RTL module, simply name the input or output ports with a standard interface notation (see <a href=\"https:\/\/www.xilinx.com\/support\/documentation\/sw_manuals\/xilinx2016_2\/ug994-vivado-ip-subsystems.pdf\" target=\"_blank\">Vivado IP user guide<\/a>). For example, in the signal_split RTL block port names: <em>S<\/em>_<em>AXIS_PORT1_tdata <\/em>and <em>S<\/em>_<em>AXIS_PORT1_tvalid<\/em> are automatically combined into an <em>S<\/em>_<em>AXIS_PORT1<\/em>\u00a0interface.<\/p>\n<h3>Frequency Counter Module<\/h3>\n<p>The frequency counter hierarchy is build around its main RTL module <em>frequency_counter<\/em> with two main inputs: <em>S_AXIS_IN<\/em> interface containing measured single channel ADC signal and <em>Ncycles, <\/em>a value that specifies a number of signal oscillation for time measurement. Since exact number for <em>Ncycles<\/em> is not important user specifies a 5-bit logarithmic value\u00a0<em>log2Ncycles<\/em> via the gpio core. <em>Ncycles<\/em> is then calculated as<\/p>\n<p><em>Ncycles<\/em> = 2^<em>log2Ncycles<\/em><\/p>\n<p>using a <em>pow2<\/em> RTL module. See the figure below.<\/p>\n<div id=\"attachment_519459\" style=\"width: 911px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_frequency_counter.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-519459\" class=\"size-full wp-image-519459\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_frequency_counter.png\" alt=\"\" width=\"901\" height=\"205\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_frequency_counter.png 901w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_frequency_counter-300x68.png 300w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_frequency_counter-768x175.png 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/a><p id=\"caption-attachment-519459\" class=\"wp-caption-text\">Frequency Counter Hierarchy<\/p><\/div>\n<p>The <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/projects\/4_frequency_counter\/frequency_counter.v\" target=\"_blank\">verilog code<\/a> of the\u00a0<em>frequency_counter\u00a0<\/em>RTL module has three main parts. The first part directly wires the <em>S_AXIS_IN<\/em> to the <em>M_AXIS_OUT<\/em> interface so that data is\u00a0 transferred to the next block for processing. Instead, we could split the AXIS interface before the module, however, this would require an additional IP core &#8211; the AXI3-Stream Broadcaster.<\/p>\n<p>The second part of the code sets the <em>state<\/em> buffer depending on the measured signal value relative to the high or low threshold values. If the signal is above the high threshold value<em> state<\/em> buffer is set to one and if the signal is below the low threshold value <em>state<\/em> buffer is set to 0. Using two threshold values helps to prevent false <em>state<\/em> transitions in case of noisy data.<\/p>\n<p>The third part increments <em>counts<\/em> register on each clock cycle, increments <em>cycles<\/em> register on each positive <em>state<\/em> transition and clears <em>cycles<\/em> and <em>counter<\/em> registers when <em>cycles<\/em> exceeds <em>Ncycles<\/em>. Before clearing the <em>counter<\/em> its value is copied to the <em>counter_output<\/em> register which is wired to the output port. The result of the frequency counter module is therefore a number of clock cycles in a time of <em>Ncycles<\/em> signal oscillations, updated on each <em>Ncycles<\/em> signal oscillations. The frequency is then calculated as<\/p>\n<p><em>frequency<\/em> = <em>Ncycles<\/em>\/<em>counts<\/em>*125 MHz<em>.<\/em><\/p>\n<h3>Signal Decode Module<\/h3>\n<p>The final block in the ADC signal chain and in the block design is the <em>signal_decode<\/em> RTL module. Its purpose is to display the ADC value on the Red Pitaya LED bar mostly for visual effects. The implementation is a simple 8-bit <a href=\"http:\/\/www.asic-world.com\/examples\/verilog\/decoder.html\" target=\"_blank\">decoder <\/a>from Vivado&#8217;s Language Templates. In <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/projects\/4_frequency_counter\/signal_decoder.v\" target=\"_blank\">signal_decoder.v<\/a> the three MSBs of the ADC value are decoded and displayed on LEDs. However, if your ADC range jumpers are set to +\/- 20 V instead of +\/-1 V you will see no activity when connecting the output of the Red Pitaya&#8217;s DAC to the input of its ADC port. In this case <em>BIT_OFFSET<\/em> parameter can be set to 4 to decode 4th, 5th and 6th signal&#8217;s MSBs. Shifting the bit position is related to signal amplification by a factor of 2. You can play with this value if the range is not optimal.<\/p>\n<h1>Fun Part<\/h1>\n<p>We are ready to test the frequency counter. Connect the Red Pitaya&#8217;s OUT1 port to the IN1 port. Save the project, create bitstream and write it to the FPGA as described in previous projects.<\/p>\n<p>Next, copy the <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/projects\/4_frequency_counter\/server\/counter.c\" target=\"_blank\"><em>counter.c<\/em> <\/a>program found in <em>redpitaya_guide\/4_frequency_counter\/server<\/em> folder to Red Pitaya&#8217;s\u00a0 Linux, compile it and execute it as shown in the figure below.<\/p>\n<div id=\"attachment_519520\" style=\"width: 631px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_linux.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-519520\" class=\"wp-image-519520 size-full\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_linux.png\" width=\"621\" height=\"135\" srcset=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_linux.png 621w, https:\/\/antonpotocnik.com\/wp-content\/uploads\/2017\/01\/4_fc_linux-300x65.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/a><p id=\"caption-attachment-519520\" class=\"wp-caption-text\">Demonstration of counter.c program<\/p><\/div>\n<p>The program can be used with the following parameters:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n.\/counter {log2Ncycles} {frequency_Hz}\r\n<\/pre>\n<p>Keep in mind that the frequency resolution depends on the number of clock counts within <em>Ncycles<\/em> signal oscillations. Low frequency signals require small <em>Ncycles<\/em> and high frequencies signals require large <em>Ncycles<\/em>.\u00a0 The maximal number of <em>counts<\/em> can be 2^32, the highest DAC frequency can be 125 MHz\/4 = 31.25 MHz and the lowest frequency can be approx. 1 Hz. The conversion from the desired frequency into the <em>phase_inc<\/em> is done in the <a href=\"https:\/\/github.com\/apotocnik\/redpitaya_guide\/blob\/master\/projects\/4_frequency_counter\/server\/counter.c\" target=\"_blank\"><em>counter.c<\/em><\/a>.<\/p>\n<p>When setting the frequency to 2 Hz the LED bar on the Red Pitaya board looks very much like Knight Rider&#8217;s lights \ud83d\ude42<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td><a href=\"https:\/\/antonpotocnik.com\/?p=489265\">&lt;&lt; Red Pitaya Project 3 &#8211; Stopwatch<\/a><\/td>\n<td align=\"right\"><a href=\"https:\/\/antonpotocnik.com\/?p=514765\">Red Pitaya Project 5 &#8211; Averager &gt;&gt;<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>References<\/h1>\n<ul>\n<li>Reference on RTL module interface <a href=\"https:\/\/www.xilinx.com\/support\/documentation\/sw_manuals\/xilinx2016_2\/ug994-vivado-ip-subsystems.pdf\">Xilinx User Guide &#8211; Designing IP Subsystems Using IP Integrator.<\/a><\/li>\n<li><a href=\"https:\/\/www.xilinx.com\/support\/documentation\/ip_documentation\/dds_compiler\/v6_0\/pg141-dds-compiler.pdf\" target=\"_blank\">Xilinx\u00a0Product Guide &#8211;\u00a0 DDS Compiler <\/a><\/li>\n<li><a href=\"https:\/\/www.xilinx.com\/support\/documentation\/ip_documentation\/axi_ref_guide\/latest\/ug1037-vivado-axi-reference-guide.pdf\" target=\"_blank\">Vivado&#8217;s AXI4 Reference Guide<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction On the way to a powerful acquisition systems let us make a quick detour and create a useful and simple project &#8211; the Frequency Counter. Yes, to measure frequencies one can use Red Pitaya&#8217;s native apps such as Oscilloscope or Spectrum Analyzer, however, our program will be able to determine frequencies with much higher&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[29],"tags":[],"class_list":["post-519284","post","type-post","status-publish","format-standard","hentry","category-fpga"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Hjcy-2b5y","_links":{"self":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts\/519284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=519284"}],"version-history":[{"count":50,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts\/519284\/revisions"}],"predecessor-version":[{"id":566549,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts\/519284\/revisions\/566549"}],"wp:attachment":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=519284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=519284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=519284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}