<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages</link><pubDate>Wed, 26 Jun 2024 21:04:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Current Revision posted to Documents by pchan on 6/26/2024 9:04:13 PM&lt;br /&gt;
&lt;p&gt;&lt;a name="top" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt; &lt;img class="nolightbox essProfile xs-float-left xs-pr3" alt="Profile Image" height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/p&gt;
&lt;p&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;br /&gt; &lt;a class="xbold" href="/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;Development Kits&lt;/a&gt; | &lt;a class="xbold" href="#test" data-e14adj="t"&gt;Test Your Knowledge &lt;i class="text-orange xs-ml05 fas fa-caret-right"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a name="object" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;h2 id="mcetoc_1i0jqnaos0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;2. Objectives&lt;/h2&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process of programmable logic creation&lt;/li&gt;
&lt;li&gt;The difference between Synthesizable and Non-Synthesizable code&lt;/li&gt;
&lt;li&gt;The history and basics of VHDL and Verilog&lt;/li&gt;
&lt;li&gt;The basics of HLS&lt;/li&gt;
&lt;li&gt;The role of a System Optimising Compiler and how it is used&lt;/li&gt;
&lt;li&gt;More about HDLs such as MyHDL and Chisel&lt;/li&gt;
&lt;li&gt;Higher level frameworks which allow the use of languages such as Python&lt;a name="sec3" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;3. Programmable Logic Creation&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram1" src="/e14/assets/legacy/2019/fpga_diagram1x.png" /&gt;
&lt;h5&gt;Figure 1: Software application execution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;a name="sec4" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c1" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 2" src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 3" src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;
&lt;h5&gt;Figure 3: VHDL Example of Non-Synthesisable code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;a name="sec5" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c2" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;5. VHDL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 4" src="/e14/assets/legacy/2019/fpga_diagram4.png" /&gt;
&lt;h5&gt;Figure 4: Process Implementing a State Machine&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/li&gt;
&lt;li&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;a name="sec6" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c3" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;6. Verilog&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 5" src="/e14/assets/legacy/2019/fpga_diagram5.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 5: Verilog Always Block&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;a name="sec7" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c4" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;7. VHDL &amp;amp; Verilog Language Wars&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;a name="sec8" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c5" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;8. High Level Synthesis&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 6" src="/e14/assets/legacy/2019/fpga_diagram6.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 6: Example of HLS Code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 7" src="/e14/assets/legacy/2019/fpga_diagram7x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the algorithm in C, using the appropriate libraries&lt;/li&gt;
&lt;li&gt;Create a C Test Bench&lt;/li&gt;
&lt;li&gt;Update the algorithm until the functional performance is achieved&lt;/li&gt;
&lt;li&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/li&gt;
&lt;li&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/li&gt;
&lt;li&gt;Export the IP core into Vivado&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;
&lt;table border="1" width="100%" cellpadding="5"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h5&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 9" src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 9: Pipelining at the data flow level&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 10" src="/e14/assets/legacy/2019/fpga_diagram10.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/h5&gt;
&lt;a name="sec9" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1c6" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;9. System Optimizing Compilers&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the application in C running on the processors&lt;/li&gt;
&lt;li&gt;Verify the functionality&lt;/li&gt;
&lt;li&gt;Identify the performance bottleneck functions&lt;/li&gt;
&lt;li&gt;Accelerate the bottleneck functions into the programmable logic&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 11" src="/e14/assets/legacy/2019/fpga_diagram11.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 11: Profiling the Functions in SW&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 12" src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w30" alt="formula 10" src="/e14/assets/legacy/2019/fpga_diagramx.png" /&gt;&lt;/center&gt;
&lt;p&gt;Where,&lt;/p&gt;
&lt;p&gt;&lt;b&gt;S:&lt;/b&gt; overall performance improvement &lt;br /&gt;&lt;b&gt;&amp;alpha;:&lt;/b&gt; percentage of the algorithm that can be sped up with hardware acceleration &lt;br /&gt;&lt;b&gt;1-&amp;alpha;:&lt;/b&gt; percentage of the algorithm that cannot be improved&lt;br /&gt;&lt;b&gt;p:&lt;/b&gt; the speedup due to acceleration (%) &lt;br /&gt; Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1 &lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 13" src="/e14/assets/legacy/2019/fpga_diagram13.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;a name="sec10" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1c7" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;10. MyHDL and CHISEL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 14" src="/e14/assets/legacy/2019/fpga_diagram14x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 14: MyHDL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w60" alt="diagram 15" src="/e14/assets/legacy/2019/fpga_diagram15.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 15: CHISEL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;a name="sec11" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c8" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;11. Higher Level Frameworks&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 16" src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 16: The PYNQ Framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 17" src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 17: Implementation of the Pynq framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 18" src="/e14/assets/legacy/2019/fpga_diagram18.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 19" src="/e14/assets/legacy/2019/fpga_diagram19.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p class="xbold"&gt;Conclusion&lt;/p&gt;
&lt;p&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;center&gt;
&lt;h5 style="clear:both;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of AMD Corp.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/h5&gt;
&lt;/center&gt;&lt;center&gt;
&lt;p class="xs-border-bottom xs-pb2"&gt;Shop our wide range of &lt;strong&gt;SoCs, EVMs, application specific kits, embedded development boards, and more.&amp;nbsp;&lt;span &gt;&lt;a class="e14-button e14-button--primary e14-button--large" href="https://referral.element14.com/OrderCodeView?url=%2Fsearch%3Fst%3Damd%2520programmable%2520devices&amp;COM=e14c-essentials-prgmdevice3-doc&amp;CMP=e14c-essentials-prgmdevice3-doc&amp;osetc=e14c-essentials-prgmdevice3-doc" title="Shop Now" title="Shop Now" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;a name="test" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1d9" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;Test Your Knowledge&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;div class="xs-float-left xs-m2"&gt;            
&lt;style&gt;
   .e14-achievement-name{font-size:14px;font-weight:700;text-align:center;height:40px;margin:0;padding:5px}.e14-avatar{width:50% !important;margin:auto;border-radius:500px}.e14-avatar img{border-radius:543px}.e14-progress-bar{height:12px;border-radius:6px;background-clip:padding-box;background:#3575c2}.e14-achievement-thumb{height:200px}.e14-achievement-criteria{font-size:10px !important;overflow:hidden;margin-bottom:10px;line-height:1.5;height:60px}.e14-achievement-criteria p{font-size:10px !important;overflow:hidden;margin-bottom:10px;line-height:1.5;height:60px}.e14-achievement-criteria.complete{height:38px}.e14-achievement-criteria.complete p{height:38px}.e14-greyout{-webkit-filter:grayscale(90%);-moz-filter:grayscale(90%);-o-filter:grayscale(90%);-ms-filter:grayscale(90%);filter:grayscale(90%)}.e14-complete{float:right;margin-top:-20px;padding-right:5px;margin-bottom:12px;font-weight:700;color:dimgray}.e14-achievement-status{margin:5px}.shimmer{position:relative;overflow:hidden;background:#f6f7f8;background:linear-gradient(-45deg,#eee 40%,#fafafa 50%,#eee 60%);background-size:300%;background-position-x:100%;animation:shimmer 8s infinite linear}@keyframes shimmer{0%{background-position:-1000px 0}
100%{background-position:1000px 0}}
@media only screen and (max-width:480px){.e14-achievement-criteria{display:none}.e14-complete{font-size:9px}.e14-user-achievement{width:100px !important;height:150px !important}.e14-achievement-status{margin-top:15px}.e14-achievement-thumb{height:130px}.e14-achievement-name{font-size:10px}} 
&lt;/style&gt;

    &lt;div id="embed-82aa6c13188049b5b38c30973ccf0a97_thumbnails" data-columnclass="thumbnail-column"&gt;
        &lt;div class="content thumbnail e14-user-achievement" data-href="/achievements/00219500-5d29-4ee9-a5aa-e4f33697d724" style="border: 3px solid #8d8d8d;cursor: pointer;"&gt;
        	       &lt;h2 class="name e14-achievement-name"&gt;
    		            Programmable Devices 3&lt;br&gt;
    		       &lt;/h2&gt;
    			&lt;div class="e14-avatar e14-greyout"&gt;
    				&lt;img loading="lazy" src="https://community-storage.element14.com/communityserver-components-imagefileviewer/achievements/002195005d294ee9a5aae4f33697d724/Programmable%20Devices%203.png-140x140x2.png?_=FZA9m+5BqaS11jvmu4xxow==" style="width: 140px;max-height:140px;overflow:hidden;background:url(&amp;#39;https://community-storage.element14.com/communityserver-components-imagefileviewer/achievements/002195005d294ee9a5aae4f33697d724/Programmable%20Devices%203.png-140x140x2.png?_=FZA9m+5BqaS11jvmu4xxow==&amp;#39;) center center no-repeat;background-size:cover;aspect-ratio:140/140" alt="Programmable Devices 3" border="0" /&gt;
    		    &lt;/div&gt;
    		    &lt;div style="padding:5px;"&gt;
    		        &lt;div title="Complete our Essentials: Programmable Devices 3 course, earn 100% on the quiz and give the page a star rating to earn this badge!" class="e14-achievement-criteria"&gt;Complete our Essentials: Programmable Devices 3 course, earn 100% on the quiz and give the...&lt;/div&gt;
    		        
    		    &lt;/div&gt;
    		&lt;/div&gt;
    &lt;/div&gt;   
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, and leave us some feedback in the comments section.&lt;/p&gt;
&lt;p&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;h5&gt;&lt;a href="/learn/learning-center/essentials/" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" style="vertical-align:top;" alt="essentials" src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt; Sponsored by &lt;a title="FPGA / Programmable SoC Programming Languages" href="/products/manufacturers/amd" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" class="essSponsor" style="vertical-align:top;" title="amd" alt="amd logo" height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/12</link><pubDate>Mon, 24 Jun 2024 20:45:36 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 12 posted to Documents by pchan on 6/24/2024 8:45:36 PM&lt;br /&gt;
&lt;p&gt;&lt;a name="top" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt; &lt;img class="nolightbox essProfile xs-float-left xs-pr3" alt="Profile Image" height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/p&gt;
&lt;p&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;br /&gt; &lt;a class="xbold" href="/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;Development Kits&lt;/a&gt; | &lt;a class="xbold" href="#test" data-e14adj="t"&gt;Test Your Knowledge &lt;i class="text-orange xs-ml05 fas fa-caret-right"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a name="object" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;h2 id="mcetoc_1i0jqnaos0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;2. Objectives&lt;/h2&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process of programmable logic creation&lt;/li&gt;
&lt;li&gt;The difference between Synthesizable and Non-Synthesizable code&lt;/li&gt;
&lt;li&gt;The history and basics of VHDL and Verilog&lt;/li&gt;
&lt;li&gt;The basics of HLS&lt;/li&gt;
&lt;li&gt;The role of a System Optimising Compiler and how it is used&lt;/li&gt;
&lt;li&gt;More about HDLs such as MyHDL and Chisel&lt;/li&gt;
&lt;li&gt;Higher level frameworks which allow the use of languages such as Python&lt;a name="sec3" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;3. Programmable Logic Creation&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram1" src="/e14/assets/legacy/2019/fpga_diagram1x.png" /&gt;
&lt;h5&gt;Figure 1: Software application execution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;a name="sec4" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c1" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 2" src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 3" src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;
&lt;h5&gt;Figure 3: VHDL Example of Non-Synthesisable code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;a name="sec5" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c2" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;5. VHDL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 4" src="/e14/assets/legacy/2019/fpga_diagram4.png" /&gt;
&lt;h5&gt;Figure 4: Process Implementing a State Machine&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/li&gt;
&lt;li&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;a name="sec6" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c3" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;6. Verilog&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 5" src="/e14/assets/legacy/2019/fpga_diagram5.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 5: Verilog Always Block&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;a name="sec7" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c4" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;7. VHDL &amp;amp; Verilog Language Wars&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;a name="sec8" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c5" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;8. High Level Synthesis&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 6" src="/e14/assets/legacy/2019/fpga_diagram6.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 6: Example of HLS Code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 7" src="/e14/assets/legacy/2019/fpga_diagram7x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the algorithm in C, using the appropriate libraries&lt;/li&gt;
&lt;li&gt;Create a C Test Bench&lt;/li&gt;
&lt;li&gt;Update the algorithm until the functional performance is achieved&lt;/li&gt;
&lt;li&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/li&gt;
&lt;li&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/li&gt;
&lt;li&gt;Export the IP core into Vivado&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;
&lt;table border="1" width="100%" cellpadding="5"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h5&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 9" src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 9: Pipelining at the data flow level&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 10" src="/e14/assets/legacy/2019/fpga_diagram10.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/h5&gt;
&lt;a name="sec9" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1c6" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;9. System Optimizing Compilers&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the application in C running on the processors&lt;/li&gt;
&lt;li&gt;Verify the functionality&lt;/li&gt;
&lt;li&gt;Identify the performance bottleneck functions&lt;/li&gt;
&lt;li&gt;Accelerate the bottleneck functions into the programmable logic&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 11" src="/e14/assets/legacy/2019/fpga_diagram11.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 11: Profiling the Functions in SW&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 12" src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w30" alt="formula 10" src="/e14/assets/legacy/2019/fpga_diagramx.png" /&gt;&lt;/center&gt;
&lt;p&gt;Where,&lt;/p&gt;
&lt;p&gt;&lt;b&gt;S:&lt;/b&gt; overall performance improvement &lt;br /&gt;&lt;b&gt;&amp;alpha;:&lt;/b&gt; percentage of the algorithm that can be sped up with hardware acceleration &lt;br /&gt;&lt;b&gt;1-&amp;alpha;:&lt;/b&gt; percentage of the algorithm that cannot be improved&lt;br /&gt;&lt;b&gt;p:&lt;/b&gt; the speedup due to acceleration (%) &lt;br /&gt; Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1 &lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 13" src="/e14/assets/legacy/2019/fpga_diagram13.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;a name="sec10" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1c7" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;10. MyHDL and CHISEL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 14" src="/e14/assets/legacy/2019/fpga_diagram14x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 14: MyHDL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w60" alt="diagram 15" src="/e14/assets/legacy/2019/fpga_diagram15.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 15: CHISEL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;a name="sec11" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c8" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;11. Higher Level Frameworks&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 16" src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 16: The PYNQ Framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 17" src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 17: Implementation of the Pynq framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 18" src="/e14/assets/legacy/2019/fpga_diagram18.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 19" src="/e14/assets/legacy/2019/fpga_diagram19.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p class="xbold"&gt;Conclusion&lt;/p&gt;
&lt;p&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;center&gt;
&lt;h5 style="clear:both;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of AMD Corp.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/h5&gt;
&lt;/center&gt;&lt;center&gt;
&lt;p class="xs-border-bottom xs-pb2"&gt;Shop our wide range of &lt;strong&gt;SoCs, EVMs, application specific kits, embedded development boards, and more.&amp;nbsp;&lt;span &gt;&lt;a class="e14-button e14-button--primary e14-button--large" href="https://referral.element14.com/OrderCodeView?url=%2Fsearch%3Fst%3Damd%2520programmable%2520devices&amp;COM=e14c-essentials-prgmdevice2-doc&amp;CMP=e14c-essentials-prgmdevice2-doc&amp;osetc=e14c-essentials-prgmdevice2-doc" title="Shop Now" title="Shop Now" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;a name="test" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1d9" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;Test Your Knowledge&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;div class="xs-float-left xs-m2"&gt;            
&lt;style&gt;
   .e14-achievement-name{font-size:14px;font-weight:700;text-align:center;height:40px;margin:0;padding:5px}.e14-avatar{width:50% !important;margin:auto;border-radius:500px}.e14-avatar img{border-radius:543px}.e14-progress-bar{height:12px;border-radius:6px;background-clip:padding-box;background:#3575c2}.e14-achievement-thumb{height:200px}.e14-achievement-criteria{font-size:10px !important;overflow:hidden;margin-bottom:10px;line-height:1.5;height:60px}.e14-achievement-criteria p{font-size:10px !important;overflow:hidden;margin-bottom:10px;line-height:1.5;height:60px}.e14-achievement-criteria.complete{height:38px}.e14-achievement-criteria.complete p{height:38px}.e14-greyout{-webkit-filter:grayscale(90%);-moz-filter:grayscale(90%);-o-filter:grayscale(90%);-ms-filter:grayscale(90%);filter:grayscale(90%)}.e14-complete{float:right;margin-top:-20px;padding-right:5px;margin-bottom:12px;font-weight:700;color:dimgray}.e14-achievement-status{margin:5px}.shimmer{position:relative;overflow:hidden;background:#f6f7f8;background:linear-gradient(-45deg,#eee 40%,#fafafa 50%,#eee 60%);background-size:300%;background-position-x:100%;animation:shimmer 8s infinite linear}@keyframes shimmer{0%{background-position:-1000px 0}
100%{background-position:1000px 0}}
@media only screen and (max-width:480px){.e14-achievement-criteria{display:none}.e14-complete{font-size:9px}.e14-user-achievement{width:100px !important;height:150px !important}.e14-achievement-status{margin-top:15px}.e14-achievement-thumb{height:130px}.e14-achievement-name{font-size:10px}} 
&lt;/style&gt;

    &lt;div id="embed-82aa6c13188049b5b38c30973ccf0a97_thumbnails" data-columnclass="thumbnail-column"&gt;
        &lt;div class="content thumbnail e14-user-achievement" data-href="/achievements/00219500-5d29-4ee9-a5aa-e4f33697d724" style="border: 3px solid #8d8d8d;cursor: pointer;"&gt;
        	       &lt;h2 class="name e14-achievement-name"&gt;
    		            Programmable Devices 3&lt;br&gt;
    		       &lt;/h2&gt;
    			&lt;div class="e14-avatar e14-greyout"&gt;
    				&lt;img loading="lazy" src="https://community-storage.element14.com/communityserver-components-imagefileviewer/achievements/002195005d294ee9a5aae4f33697d724/Programmable%20Devices%203.png-140x140x2.png?_=FZA9m+5BqaS11jvmu4xxow==" style="width: 140px;max-height:140px;overflow:hidden;background:url(&amp;#39;https://community-storage.element14.com/communityserver-components-imagefileviewer/achievements/002195005d294ee9a5aae4f33697d724/Programmable%20Devices%203.png-140x140x2.png?_=FZA9m+5BqaS11jvmu4xxow==&amp;#39;) center center no-repeat;background-size:cover;aspect-ratio:140/140" alt="Programmable Devices 3" border="0" /&gt;
    		    &lt;/div&gt;
    		    &lt;div style="padding:5px;"&gt;
    		        &lt;div title="Complete our Essentials: Programmable Devices 3 course, earn 100% on the quiz and give the page a star rating to earn this badge!" class="e14-achievement-criteria"&gt;Complete our Essentials: Programmable Devices 3 course, earn 100% on the quiz and give the...&lt;/div&gt;
    		        
    		    &lt;/div&gt;
    		&lt;/div&gt;
    &lt;/div&gt;   
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, and leave us some feedback in the comments section.&lt;/p&gt;
&lt;p&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;h5&gt;&lt;a href="/learn/learning-center/essentials/" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" style="vertical-align:top;" alt="essentials" src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt; Sponsored by &lt;a title="FPGA / Programmable SoC Programming Languages" href="/products/manufacturers/amd" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" class="essSponsor" style="vertical-align:top;" title="amd" alt="amd logo" height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/11</link><pubDate>Mon, 24 Jun 2024 20:44:44 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 11 posted to Documents by pchan on 6/24/2024 8:44:44 PM&lt;br /&gt;
&lt;p&gt;&lt;a name="top" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt; &lt;img class="nolightbox essProfile xs-float-left xs-pr3" alt="Profile Image" height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/p&gt;
&lt;p&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;br /&gt; &lt;a class="xbold" href="/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;Development Kits&lt;/a&gt; | &lt;a class="xbold" href="#test" data-e14adj="t"&gt;Test Your Knowledge &lt;i class="text-orange xs-ml05 fas fa-caret-right"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a name="object" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;h2 id="mcetoc_1i0jqnaos0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;2. Objectives&lt;/h2&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process of programmable logic creation&lt;/li&gt;
&lt;li&gt;The difference between Synthesizable and Non-Synthesizable code&lt;/li&gt;
&lt;li&gt;The history and basics of VHDL and Verilog&lt;/li&gt;
&lt;li&gt;The basics of HLS&lt;/li&gt;
&lt;li&gt;The role of a System Optimising Compiler and how it is used&lt;/li&gt;
&lt;li&gt;More about HDLs such as MyHDL and Chisel&lt;/li&gt;
&lt;li&gt;Higher level frameworks which allow the use of languages such as Python&lt;a name="sec3" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;3. Programmable Logic Creation&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram1" src="/e14/assets/legacy/2019/fpga_diagram1x.png" /&gt;
&lt;h5&gt;Figure 1: Software application execution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;a name="sec4" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c1" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 2" src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 3" src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;
&lt;h5&gt;Figure 3: VHDL Example of Non-Synthesisable code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;a name="sec5" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c2" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;5. VHDL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 4" src="/e14/assets/legacy/2019/fpga_diagram4.png" /&gt;
&lt;h5&gt;Figure 4: Process Implementing a State Machine&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/li&gt;
&lt;li&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;a name="sec6" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c3" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;6. Verilog&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 5" src="/e14/assets/legacy/2019/fpga_diagram5.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 5: Verilog Always Block&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;a name="sec7" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1i15vrr1c4" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;7. VHDL &amp;amp; Verilog Language Wars&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;a name="sec8" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c5" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;8. High Level Synthesis&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 6" src="/e14/assets/legacy/2019/fpga_diagram6.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 6: Example of HLS Code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 7" src="/e14/assets/legacy/2019/fpga_diagram7x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the algorithm in C, using the appropriate libraries&lt;/li&gt;
&lt;li&gt;Create a C Test Bench&lt;/li&gt;
&lt;li&gt;Update the algorithm until the functional performance is achieved&lt;/li&gt;
&lt;li&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/li&gt;
&lt;li&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/li&gt;
&lt;li&gt;Export the IP core into Vivado&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;
&lt;table border="1" width="100%" cellpadding="5"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h5&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 9" src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 9: Pipelining at the data flow level&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 10" src="/e14/assets/legacy/2019/fpga_diagram10.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/h5&gt;
&lt;a name="sec9" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1c6" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;9. System Optimizing Compilers&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the application in C running on the processors&lt;/li&gt;
&lt;li&gt;Verify the functionality&lt;/li&gt;
&lt;li&gt;Identify the performance bottleneck functions&lt;/li&gt;
&lt;li&gt;Accelerate the bottleneck functions into the programmable logic&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 11" src="/e14/assets/legacy/2019/fpga_diagram11.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 11: Profiling the Functions in SW&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 12" src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w30" alt="formula 10" src="/e14/assets/legacy/2019/fpga_diagramx.png" /&gt;&lt;/center&gt;
&lt;p&gt;Where,&lt;/p&gt;
&lt;p&gt;&lt;b&gt;S:&lt;/b&gt; overall performance improvement &lt;br /&gt;&lt;b&gt;&amp;alpha;:&lt;/b&gt; percentage of the algorithm that can be sped up with hardware acceleration &lt;br /&gt;&lt;b&gt;1-&amp;alpha;:&lt;/b&gt; percentage of the algorithm that cannot be improved&lt;br /&gt;&lt;b&gt;p:&lt;/b&gt; the speedup due to acceleration (%) &lt;br /&gt; Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1 &lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 13" src="/e14/assets/legacy/2019/fpga_diagram13.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;a name="sec10" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1c7" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;10. MyHDL and CHISEL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 14" src="/e14/assets/legacy/2019/fpga_diagram14x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 14: MyHDL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w60" alt="diagram 15" src="/e14/assets/legacy/2019/fpga_diagram15.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 15: CHISEL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;a name="sec11" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1i15vrr1c8" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;11. Higher Level Frameworks&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 16" src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 16: The PYNQ Framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 17" src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 17: Implementation of the Pynq framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 18" src="/e14/assets/legacy/2019/fpga_diagram18.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 19" src="/e14/assets/legacy/2019/fpga_diagram19.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p class="xbold"&gt;Conclusion&lt;/p&gt;
&lt;p&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;center&gt;
&lt;h5 style="clear:both;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of AMD Corp.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/h5&gt;
&lt;/center&gt;&lt;center&gt;
&lt;p class="xs-border-bottom xs-pb2"&gt;Shop our wide range of &lt;strong&gt;SoCs, EVMs, application specific kits, embedded development boards, and more.&amp;nbsp;&lt;span &gt;&lt;a class="e14-button e14-button--primary e14-button--large" href="https://referral.element14.com/OrderCodeView?url=%2Fsearch%3Fst%3Damd%2520programmable%2520devices&amp;COM=e14c-essentials-prgmdevice2-doc&amp;CMP=e14c-essentials-prgmdevice2-doc&amp;osetc=e14c-essentials-prgmdevice2-doc" title="Shop Now" title="Shop Now" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;a name="test" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;h2 id="mcetoc_1i15vrr1d9" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;Test Your Knowledge&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;div class="xs-float-left xs-m2"&gt;            
&lt;style&gt;
   .e14-achievement-name{font-size:14px;font-weight:700;text-align:center;height:40px;margin:0;padding:5px}.e14-avatar{width:50% !important;margin:auto;border-radius:500px}.e14-avatar img{border-radius:543px}.e14-progress-bar{height:12px;border-radius:6px;background-clip:padding-box;background:#3575c2}.e14-achievement-thumb{height:200px}.e14-achievement-criteria{font-size:10px !important;overflow:hidden;margin-bottom:10px;line-height:1.5;height:60px}.e14-achievement-criteria p{font-size:10px !important;overflow:hidden;margin-bottom:10px;line-height:1.5;height:60px}.e14-achievement-criteria.complete{height:38px}.e14-achievement-criteria.complete p{height:38px}.e14-greyout{-webkit-filter:grayscale(90%);-moz-filter:grayscale(90%);-o-filter:grayscale(90%);-ms-filter:grayscale(90%);filter:grayscale(90%)}.e14-complete{float:right;margin-top:-20px;padding-right:5px;margin-bottom:12px;font-weight:700;color:dimgray}.e14-achievement-status{margin:5px}.shimmer{position:relative;overflow:hidden;background:#f6f7f8;background:linear-gradient(-45deg,#eee 40%,#fafafa 50%,#eee 60%);background-size:300%;background-position-x:100%;animation:shimmer 8s infinite linear}@keyframes shimmer{0%{background-position:-1000px 0}
100%{background-position:1000px 0}}
@media only screen and (max-width:480px){.e14-achievement-criteria{display:none}.e14-complete{font-size:9px}.e14-user-achievement{width:100px !important;height:150px !important}.e14-achievement-status{margin-top:15px}.e14-achievement-thumb{height:130px}.e14-achievement-name{font-size:10px}} 
&lt;/style&gt;

    &lt;div id="embed-82aa6c13188049b5b38c30973ccf0a97_thumbnails" data-columnclass="thumbnail-column"&gt;
        &lt;div class="content thumbnail e14-user-achievement" data-href="/achievements/00219500-5d29-4ee9-a5aa-e4f33697d724" style="border: 3px solid #8d8d8d;cursor: pointer;"&gt;
        	       &lt;h2 class="name e14-achievement-name"&gt;
    		            Programmable Devices 3&lt;br&gt;
    		       &lt;/h2&gt;
    			&lt;div class="e14-avatar e14-greyout"&gt;
    				&lt;img loading="lazy" src="https://community-storage.element14.com/communityserver-components-imagefileviewer/achievements/002195005d294ee9a5aae4f33697d724/Programmable%20Devices%203.png-140x140x2.png?_=FZA9m+5BqaS11jvmu4xxow==" style="width: 140px;max-height:140px;overflow:hidden;background:url(&amp;#39;https://community-storage.element14.com/communityserver-components-imagefileviewer/achievements/002195005d294ee9a5aae4f33697d724/Programmable%20Devices%203.png-140x140x2.png?_=FZA9m+5BqaS11jvmu4xxow==&amp;#39;) center center no-repeat;background-size:cover;aspect-ratio:140/140" alt="Programmable Devices 3" border="0" /&gt;
    		    &lt;/div&gt;
    		    &lt;div style="padding:5px;"&gt;
    		        &lt;div title="Complete our Essentials: Programmable Devices 3 course, earn 100% on the quiz and give the page a star rating to earn this badge!" class="e14-achievement-criteria"&gt;Complete our Essentials: Programmable Devices 3 course, earn 100% on the quiz and give the...&lt;/div&gt;
    		        
    		    &lt;/div&gt;
    		&lt;/div&gt;
    &lt;/div&gt;   
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, and leave us some feedback in the comments section.&lt;/p&gt;
&lt;p&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;h5&gt;&lt;a href="/learn/learning-center/essentials/" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" alt="essentials" src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt; Sponsored by &lt;a title="FPGA / Programmable SoC Programming Languages" href="/products/manufacturers/amd" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" class="essSponsor" style="vertical-align:top;" title="amd" alt="amd logo" height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/10</link><pubDate>Mon, 24 Jun 2024 20:30:43 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 10 posted to Documents by pchan on 6/24/2024 8:30:43 PM&lt;br /&gt;
&lt;p&gt;&lt;a name="top" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt; &lt;img class="nolightbox essProfile xs-float-left xs-pr3" alt="Profile Image" height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/p&gt;
&lt;p&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;br /&gt; &lt;a class="xbold" href="/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;Development Kits&lt;/a&gt; | &lt;a class="xbold" href="#test" data-e14adj="t"&gt;Test Your Knowledge &lt;i class="text-orange xs-ml05 fas fa-caret-right"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a name="object" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;h2 id="mcetoc_1i0jqnaos0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;2. Objectives&lt;/h2&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process of programmable logic creation&lt;/li&gt;
&lt;li&gt;The difference between Synthesizable and Non-Synthesizable code&lt;/li&gt;
&lt;li&gt;The history and basics of VHDL and Verilog&lt;/li&gt;
&lt;li&gt;The basics of HLS&lt;/li&gt;
&lt;li&gt;The role of a System Optimising Compiler and how it is used&lt;/li&gt;
&lt;li&gt;More about HDLs such as MyHDL and Chisel&lt;/li&gt;
&lt;li&gt;Higher level frameworks which allow the use of languages such as Python&lt;a name="sec3" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;3. Programmable Logic Creation&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram1" src="/e14/assets/legacy/2019/fpga_diagram1x.png" /&gt;
&lt;h5&gt;Figure 1: Software application execution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;a name="sec4" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 2" src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 3" src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;
&lt;h5&gt;Figure 3: VHDL Example of Non-Synthesisable code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;a name="sec5" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;5. VHDL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 4" src="/e14/assets/legacy/2019/fpga_diagram4.png" /&gt;
&lt;h5&gt;Figure 4: Process Implementing a State Machine&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/li&gt;
&lt;li&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;a name="sec6" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;6. Verilog&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 5" src="/e14/assets/legacy/2019/fpga_diagram5.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 5: Verilog Always Block&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;a name="sec7" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;7. VHDL &amp;amp; Verilog Language Wars&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;a name="sec8" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;8. High Level Synthesis&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 6" src="/e14/assets/legacy/2019/fpga_diagram6.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 6: Example of HLS Code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 7" src="/e14/assets/legacy/2019/fpga_diagram7x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the algorithm in C, using the appropriate libraries&lt;/li&gt;
&lt;li&gt;Create a C Test Bench&lt;/li&gt;
&lt;li&gt;Update the algorithm until the functional performance is achieved&lt;/li&gt;
&lt;li&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/li&gt;
&lt;li&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/li&gt;
&lt;li&gt;Export the IP core into Vivado&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;
&lt;table border="1" width="100%" cellpadding="5"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h5&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 9" src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 9: Pipelining at the data flow level&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 10" src="/e14/assets/legacy/2019/fpga_diagram10.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/h5&gt;
&lt;a name="sec9" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;9. System Optimizing Compilers&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the application in C running on the processors&lt;/li&gt;
&lt;li&gt;Verify the functionality&lt;/li&gt;
&lt;li&gt;Identify the performance bottleneck functions&lt;/li&gt;
&lt;li&gt;Accelerate the bottleneck functions into the programmable logic&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 11" src="/e14/assets/legacy/2019/fpga_diagram11.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 11: Profiling the Functions in SW&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 12" src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w30" alt="formula 10" src="/e14/assets/legacy/2019/fpga_diagramx.png" /&gt;&lt;/center&gt;
&lt;p&gt;Where,&lt;/p&gt;
&lt;p&gt;&lt;b&gt;S:&lt;/b&gt; overall performance improvement &lt;br /&gt;&lt;b&gt;&amp;alpha;:&lt;/b&gt; percentage of the algorithm that can be sped up with hardware acceleration &lt;br /&gt;&lt;b&gt;1-&amp;alpha;:&lt;/b&gt; percentage of the algorithm that cannot be improved&lt;br /&gt;&lt;b&gt;p:&lt;/b&gt; the speedup due to acceleration (%) &lt;br /&gt; Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1 &lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 13" src="/e14/assets/legacy/2019/fpga_diagram13.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;a name="sec10" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;/center&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;10. MyHDL and CHISEL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 14" src="/e14/assets/legacy/2019/fpga_diagram14x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 14: MyHDL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w60" alt="diagram 15" src="/e14/assets/legacy/2019/fpga_diagram15.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 15: CHISEL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;a name="sec11" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;11. Higher Level Frameworks&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 16" src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 16: The PYNQ Framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 17" src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 17: Implementation of the Pynq framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 18" src="/e14/assets/legacy/2019/fpga_diagram18.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 19" src="/e14/assets/legacy/2019/fpga_diagram19.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p class="xbold"&gt;Conclusion&lt;/p&gt;
&lt;p&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;center&gt;
&lt;h5 style="clear:both;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of AMD Corp.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/h5&gt;
&lt;/center&gt;&lt;center&gt;
&lt;p class="xs-border-bottom xs-pb2"&gt;Shop our wide range of &lt;strong&gt;SoCs, EVMs, application specific kits, embedded development boards, and more.&amp;nbsp;&lt;span &gt;&lt;a class="e14-button e14-button--primary e14-button--large" href="https://referral.element14.com/OrderCodeView?url=%2Fsearch%3Fst%3Damd%2520programmable%2520devices&amp;COM=e14c-essentials-prgmdevice2-doc&amp;CMP=e14c-essentials-prgmdevice2-doc&amp;osetc=e14c-essentials-prgmdevice2-doc" title="Shop Now" title="Shop Now" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;a name="test" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;Test Your Knowledge&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;div class="xs-float-left xs-m2"&gt;Achievement&lt;/div&gt;
&lt;p&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, and leave us some feedback in the comments section.&lt;/p&gt;
&lt;p&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;h5&gt;&lt;a href="/learn/learning-center/essentials/" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" alt="essentials" src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt; Sponsored by &lt;a title="FPGA / Programmable SoC Programming Languages" href="/products/manufacturers/amd" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" class="essSponsor" style="vertical-align:top;" title="amd" alt="amd logo" height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/9</link><pubDate>Mon, 24 Jun 2024 20:27:59 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 9 posted to Documents by pchan on 6/24/2024 8:27:59 PM&lt;br /&gt;
&lt;p&gt;&lt;a name="top" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt; &lt;img class="nolightbox essProfile xs-float-left xs-pr3" alt="Profile Image" height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/p&gt;
&lt;p&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;br /&gt; &lt;a class="xbold" href="/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;Development Kits&lt;/a&gt; | &lt;a class="xbold" href="#test" data-e14adj="t"&gt;Test Your Knowledge &lt;i class="text-orange xs-ml05 fas fa-caret-right"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a name="object" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;h2 id="mcetoc_1i0jqnaos0" class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;2. Objectives&lt;/h2&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process of programmable logic creation&lt;/li&gt;
&lt;li&gt;The difference between Synthesizable and Non-Synthesizable code&lt;/li&gt;
&lt;li&gt;The history and basics of VHDL and Verilog&lt;/li&gt;
&lt;li&gt;The basics of HLS&lt;/li&gt;
&lt;li&gt;The role of a System Optimising Compiler and how it is used&lt;/li&gt;
&lt;li&gt;More about HDLs such as MyHDL and Chisel&lt;/li&gt;
&lt;li&gt;Higher level frameworks which allow the use of languages such as Python&lt;a name="sec3" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;3. Programmable Logic Creation&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram1" src="/e14/assets/legacy/2019/fpga_diagram1x.png" /&gt;
&lt;h5&gt;Figure 1: Software application execution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;a name="sec4" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 2" src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 3" src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;
&lt;h5&gt;Figure 3: VHDL Example of Non-Synthesisable code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;a name="sec5" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;5. VHDL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 4" src="/e14/assets/legacy/2019/fpga_diagram4.png" /&gt;
&lt;h5&gt;Figure 4: Process Implementing a State Machine&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/li&gt;
&lt;li&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;a name="sec6" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;6. Verilog&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 5" src="/e14/assets/legacy/2019/fpga_diagram5.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 5: Verilog Always Block&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;a name="sec7" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;7. VHDL &amp;amp; Verilog Language Wars&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;a name="sec8" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;8. High Level Synthesis&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 6" src="/e14/assets/legacy/2019/fpga_diagram6.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 6: Example of HLS Code&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 7" src="/e14/assets/legacy/2019/fpga_diagram7x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the algorithm in C, using the appropriate libraries&lt;/li&gt;
&lt;li&gt;Create a C Test Bench&lt;/li&gt;
&lt;li&gt;Update the algorithm until the functional performance is achieved&lt;/li&gt;
&lt;li&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/li&gt;
&lt;li&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/li&gt;
&lt;li&gt;Export the IP core into Vivado&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;
&lt;table border="1" width="100%" cellpadding="5"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h5&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/li&gt;
&lt;/ul&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 9" src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 9: Pipelining at the data flow level&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" alt="diagram 10" src="/e14/assets/legacy/2019/fpga_diagram10.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/h5&gt;
&lt;a name="sec9" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;9. System Optimizing Compilers&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;ol class="xs-ml45"&gt;
&lt;li&gt;Develop the application in C running on the processors&lt;/li&gt;
&lt;li&gt;Verify the functionality&lt;/li&gt;
&lt;li&gt;Identify the performance bottleneck functions&lt;/li&gt;
&lt;li&gt;Accelerate the bottleneck functions into the programmable logic&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 11" src="/e14/assets/legacy/2019/fpga_diagram11.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 11: Profiling the Functions in SW&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 12" src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w30" alt="formula 10" src="/e14/assets/legacy/2019/fpga_diagramx.png" /&gt;&lt;/center&gt;
&lt;p&gt;Where,&lt;/p&gt;
&lt;p&gt;&lt;b&gt;S:&lt;/b&gt; overall performance improvement &lt;br /&gt;&lt;b&gt;&amp;alpha;:&lt;/b&gt; percentage of the algorithm that can be sped up with hardware acceleration &lt;br /&gt;&lt;b&gt;1-&amp;alpha;:&lt;/b&gt; percentage of the algorithm that cannot be improved&lt;br /&gt;&lt;b&gt;p:&lt;/b&gt; the speedup due to acceleration (%) &lt;br /&gt; Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1 &lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 13" src="/e14/assets/legacy/2019/fpga_diagram13.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;a name="sec10" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;/center&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;10. MyHDL and CHISEL&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 14" src="/e14/assets/legacy/2019/fpga_diagram14x.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 14: MyHDL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w60" alt="diagram 15" src="/e14/assets/legacy/2019/fpga_diagram15.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 15: CHISEL Example&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;a name="sec11" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;11. Higher Level Frameworks&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;hr style="margin:0;" /&gt;
&lt;p&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 16" src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 16: The PYNQ Framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 17" src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 17: Implementation of the Pynq framework&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/li&gt;
&lt;/ol&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox" alt="diagram 18" src="/e14/assets/legacy/2019/fpga_diagram18.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;center&gt;&lt;img loading="lazy" class="nolightbox xs-w70" alt="diagram 19" src="/e14/assets/legacy/2019/fpga_diagram19.png" /&gt;&lt;br /&gt;
&lt;h5&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/h5&gt;
&lt;/center&gt;
&lt;p&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p class="xbold"&gt;Conclusion&lt;/p&gt;
&lt;p&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;center&gt;
&lt;h5 style="clear:both;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of AMD Corp.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/h5&gt;
&lt;/center&gt;&lt;center&gt;
&lt;p class="xs-border-bottom xs-pb2"&gt;Shop our wide range of &lt;strong&gt;SoCs, EVMs, application specific kits, embedded development boards, and more.&amp;nbsp;&lt;span &gt;&lt;a class="e14-button e14-button--primary e14-button--large" href="https://referral.element14.com/OrderCodeView?url=%2Fsearch%3Fst%3Damd%2520programmable%2520devices&amp;COM=e14c-essentials-prgmdevice2-doc&amp;CMP=e14c-essentials-prgmdevice2-doc&amp;osetc=e14c-essentials-prgmdevice2-doc" title="Shop Now" title="Shop Now" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;a name="test" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;h2 class="xbold" style="color:#007fac;display:inline-block;vertical-align:middle;width:75%;"&gt;Test Your Knowledge&lt;/h2&gt;
&lt;div class="xbold" style="display:inline-block;font-size:11px;text-align:right;vertical-align:middle;width:24%;"&gt;&lt;a href="#top" data-e14adj="t"&gt;Back to Top&lt;/a&gt;&lt;/div&gt;
&lt;div class="xs-float-left xs-m2"&gt;Achievement&lt;/div&gt;
&lt;p&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, and leave us some feedback in the comments section.&lt;/p&gt;
&lt;p&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;h5&gt;&lt;a href="/learn/learning-center/essentials/" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt; Sponsored by &lt;a title="FPGA / Programmable SoC Programming Languages" href="/products/manufacturers/amd" data-icid="essentials-programdevice3-doc" data-e14adj="t"&gt;&lt;img loading="lazy" class="essSponsor" style="vertical-align:top;" title="amd" alt="amd logo" height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/8</link><pubDate>Tue, 17 Jan 2023 20:31:20 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 8 posted to Documents by pchan on 1/17/2023 8:31:20 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/" data-icid="essentials-programdevice4-doc"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/essentials/" data-icid="essentials-programdevice4-doc"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/7</link><pubDate>Tue, 17 Jan 2023 20:27:32 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 7 posted to Documents by pchan on 1/17/2023 8:27:32 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/" data-icid="essentials-programdevice4-doc"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/" data-icid="essentials-programdevice4-doc"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/6</link><pubDate>Sun, 27 Feb 2022 19:48:05 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 6 posted to Documents by pchan on 2/27/2022 7:48:05 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/?ICID=essentials-programdevice4-doc"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/?ICID=essentials-programdevice4-doc"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;table style="border:0;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="160"&gt;&lt;span id="attid_https://www.element14.com/community/api/core/v3/attachments/286822" class="_se_attachment"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-50/FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf"&gt;community.element14.com/.../FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="font-size:80%;"&gt;FPGA : Programmable SoC Programming Languages Essentials.pdf&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/5</link><pubDate>Fri, 25 Feb 2022 17:41:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 5 posted to Documents by pchan on 2/25/2022 5:41:47 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/w/documents/4109/programmable-devices-ii-programmable-socs?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;a href="/w/documents/4659/programmable-devices-iv-hard-and-soft-processors-in-programmable-logic?ICID=essentials-programdevice4-doc"&gt;
                    &lt;button class="e14-nav-button-next"&gt;Next&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/?ICID=essentials-programdevice4-doc"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/?ICID=essentials-programdevice4-doc"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;table style="border:0;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="160"&gt;&lt;span id="attid_https://www.element14.com/community/api/core/v3/attachments/286822" class="_se_attachment"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-50/FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf"&gt;community.element14.com/.../FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="font-size:80%;"&gt;FPGA : Programmable SoC Programming Languages Essentials.pdf&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices III: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/4</link><pubDate>Fri, 18 Feb 2022 20:31:31 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 4 posted to Documents by pchan on 2/18/2022 8:31:31 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/main/mfg-group-assets/xilinxLogo.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e4f2f8;border:1px solid #b8d7e5;float:right;margin:20px 0px 5px 5px;padding:12px;width:155px;"&gt;
&lt;p style="color:#007fac;font-weight:bold;margin:0;"&gt;Also Available:&lt;/p&gt;
&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/3802/programmable-devices-i-programmable-logic"&gt;Programmable Devices I: Programmable Logic&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4109/programmable-devices-ii-programmable-socs"&gt;Programmable Devices II: Programmable SoCs&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;table style="border:0;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="160"&gt;&lt;span id="attid_https://www.element14.com/community/api/core/v3/attachments/286822" class="_se_attachment"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-50/FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf"&gt;community.element14.com/.../FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="font-size:80%;"&gt;FPGA : Programmable SoC Programming Languages Essentials.pdf&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices III: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/3</link><pubDate>Thu, 20 Jan 2022 10:30:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 3 posted to Documents by cstanton on 1/20/2022 10:30:50 AM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/legacy/2018/xilinxlogoSM.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e4f2f8;border:1px solid #b8d7e5;float:right;margin:20px 0px 5px 5px;padding:12px;width:155px;"&gt;
&lt;p style="color:#007fac;font-weight:bold;margin:0;"&gt;Also Available:&lt;/p&gt;
&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/3802/programmable-devices-i-programmable-logic"&gt;Programmable Devices I: Programmable Logic&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4109/programmable-devices-ii-programmable-socs"&gt;Programmable Devices II: Programmable SoCs&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;table style="border:0;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="160"&gt;&lt;span id="attid_https://www.element14.com/community/api/core/v3/attachments/286822" class="_se_attachment"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-50/FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf"&gt;community.element14.com/.../FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="font-size:80%;"&gt;FPGA : Programmable SoC Programming Languages Essentials.pdf&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices III: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/2</link><pubDate>Wed, 03 Nov 2021 21:46:21 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>dychen</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 2 posted to Documents by dychen on 11/3/2021 9:46:21 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/community/docs/DOC-93113/l/fpga-programmable-soc-programming-languages?ICID=essentials-prgmdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#f9f9f9;border:1px solid #c6c6c6;display:block;float:right;padding:6px 8px;width:212px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="border:1px solid #c6c6c6;clear:both;padding:8px;"&gt;
&lt;div style="display:inline-block;padding-right:16px;vertical-align:top;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/"&gt;&lt;img alt="image"  src="/e14/assets/legacy/2017/learningess.png" width="175px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;"&gt;
&lt;p class="essTitle" style="font-size:18px;font-weight:bold;margin:0;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;
&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener noreferrer" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" style="vertical-align:top;" title="Xilinx"  height="25px" src="/e14/assets/legacy/2018/xilinxlogoSM.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/LinkArrow.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e4f2f8;border:1px solid #b8d7e5;float:right;margin:20px 0px 5px 5px;padding:12px;width:155px;"&gt;
&lt;p style="color:#007fac;font-weight:bold;margin:0;"&gt;Also Available:&lt;/p&gt;
&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/3802/programmable-devices-i-programmable-logic"&gt;Programmable Devices I: Programmable Logic&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4109/programmable-devices-ii-programmable-socs"&gt;Programmable Devices II: Programmable SoCs&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;
&lt;p style="clear:both;margin:0;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin:0;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;
&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:304.244px;width:512px;"  height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" width="512" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis &amp;ndash; &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Implementation &amp;ndash; &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation &amp;ndash; &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1&amp;micro;s) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Entity &amp;ndash; &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Architecture &amp;ndash; &lt;/strong&gt;This defines the functionality of the module itself, and it&amp;rsquo;s where we implement the majority of the VHDL code.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" style="float:left;height:393.708px;width:720px;"  height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" width="720" /&gt;&lt;/a&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;std_logic &amp;ndash; &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed &amp;ndash; &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Integer &amp;ndash; &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Packages &amp;ndash; &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Procedures &amp;ndash; &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:227.244px;width:634px;"  height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" width="634" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Tasks &amp;ndash; &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the &amp;lsquo;include option&amp;rsquo; in the calling module.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Functions &amp;ndash; &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:261.096px;width:496px;"  height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" width="496" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling &amp;ndash; &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding &amp;ndash; &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction &amp;ndash; &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:409px;width:437.859px;"  height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" width="437" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;
&lt;p style="clear:both;font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries &amp;ndash; &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries &amp;ndash; &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Math Library &amp;ndash; &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra &amp;ndash; &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP &amp;ndash; &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;
&lt;table border="1" cellpadding="5" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Language&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Max Size&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Header&lt;/td&gt;
&lt;td style="background-color:#182e53;border:1px solid black;color:white;"&gt;Example&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;C++&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;1024&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;64&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;System C&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;512&lt;/td&gt;
&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;
&lt;td style="background-color:#f4f2f0;border:1px solid black;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="font-size:11px;line-height:12px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow &amp;ndash; &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Interface &amp;ndash; &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" style="vertical-align:middle;"  src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition &amp;ndash; &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image"  src="/e14/assets/legacy/2019/fpga_diagram9x.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;
&lt;center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" style="height:390.622px;width:852px;"  height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" width="852" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:411.395px;width:497px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" width="497" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox"  src="/e14/assets/legacy/2019/fpga_diagram12.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of &amp;ldquo;What should we accelerate using the system optimizing compiler?&amp;rdquo; To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:88.443px;width:274px;"  height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" width="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;&amp;alpha;: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-&amp;alpha;: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up &amp;ndash; close to factor of two improvement&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:328.525px;width:1020px;"  height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" width="1020" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what&amp;rsquo;s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:410.61px;width:796px;"  height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" width="796" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="height:372.305px;width:313px;"  height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" width="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;color:#007fac;font-size:15px;margin-top:16px;padding:4px 8px;vertical-align:middle;"&gt;
&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;
&lt;div style="display:inline-block;font-size:11px;text-align:right;vertical-align:top;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram16.png" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;"  src="/e14/assets/legacy/2019/fpga_diagram17.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor&amp;rsquo;s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;
&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  &amp;mdash;  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  &amp;mdash;  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  &amp;mdash;  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  &amp;mdash; &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;
&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:317px;width:528.333px;"  height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" width="529" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;height:149.921px;width:558px;"  height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" width="558" /&gt;&lt;/a&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;
&lt;p style="font-size:11px;line-height:12px;margin:0;padding:0px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/center&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;
&lt;p style="font-size:11px;margin:0;padding-top:12px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color:#e7f2f5;border:1px solid #a9aaaa;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" style="float:left;padding-right:10px;vertical-align:middle;"  height="115" src="/e14/assets/legacy/2019/fpga_profile.png" /&gt;&lt;/a&gt;
&lt;div&gt;
&lt;p style="color:#007fac;font-size:15px;margin:0;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" title="Shop Now" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" rel="noopener noreferrer" target="_blank"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="clear:both;margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="color:#007fac;font-size:18px;margin:0;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="float:right;font-size:11px;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" style="float:left;padding:0px 10px 5px 0px;vertical-align:top;"  height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;div class="voltquiz" data-formid="f0bd8cc8-9b69-448e-850f-179ddd694dc6" data-formtype="quiz" data-success-message="" data-fail-message="" data-pass-mark="OTk=" &gt;&lt;/div&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt;&lt;/div&gt;
&lt;p style="margin:0;padding:0px;"&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;
&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;table style="border:0;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="160"&gt;&lt;span id="attid_https://www.element14.com/community/api/core/v3/attachments/286822" class="_se_attachment"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-50/FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf"&gt;community.element14.com/.../FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="font-size:80%;"&gt;FPGA : Programmable SoC Programming Languages Essentials.pdf&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item><item><title>Programmable Devices III: FPGA / Programmable SoC Programming Languages</title><link>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages/revision/1</link><pubDate>Wed, 06 Oct 2021 22:06:44 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8110c455-461c-4ca5-b3a5-fe048c451ae5</guid><dc:creator>kabhari</dc:creator><comments>https://community.element14.com/learn/learning-center/essentials/w/documents/4501/programmable-devices-fpga-programmable-soc-programming-languages#comments</comments><description>Revision 1 posted to Documents by kabhari on 10/6/2021 10:06:44 PM&lt;br /&gt;
&lt;span&gt;&lt;div class="e14-navigation-buttons"&gt;&lt;a href="/community/docs/DOC-93113/l/fpga-programmable-soc-programming-languages?ICID=essentials-prgmdevice3-doc"&gt;
                    &lt;button class="e14-nav-button-prev"&gt;Previous&lt;/button&gt;
                &lt;/a&gt;&lt;/div&gt;&lt;script&gt;e14.func.queueScripts.add(function(){ e14.func.repositionNavButtons(); })&lt;/script&gt;&lt;/span&gt;&lt;div style="padding:6px 8px;border:1px solid #c6c6c6;background-color:#f9f9f9;display:block;width:212px;float:right;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/learn/learning-center/"&gt;element14 Learning Center&lt;/a&gt;&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="padding:8px;clear:both;border:1px solid #c6c6c6;"&gt;&lt;div style="display:inline-block;vertical-align:top;padding-right:16px;"&gt;&lt;a href="/learn/learning-center/online-learning/essentials/"&gt;&lt;img alt="image" src="/e14/assets/legacy/2017/learningess.png" width="175px"  /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="display:inline-block;"&gt;&lt;p class="essTitle" style="margin:0;font-weight:bold;font-size:18px;" title="FPGA / Programmable SoC Programming Languages"&gt;&lt;span style="color:#007fac;"&gt;Programmable Devices III: &lt;/span&gt; FPGA / Programmable SoC Programming Languages&lt;/p&gt;&lt;p style="margin:0;padding:8px;"&gt;&lt;span style="font-size:11px;padding-right:10px;"&gt;&lt;em&gt;Sponsored by&lt;/em&gt;&lt;/span&gt;&lt;a href="http://www.xilinx.com/" rel="nofollow ugc noopener" target="_blank"&gt;&lt;img loading="lazy" alt="image" class="essSponsor" height="25px" src="/e14/assets/legacy/2018/xilinxlogoSM.png" style="vertical-align:top;" title="Xilinx"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div style="clear:both;line-height:1.5;"&gt;&lt;span style="padding-right:6px;"&gt;&lt;a class="jive-link-anchor-small" href="#intro"&gt;1. Introduction&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#object"&gt;2. Objectives&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec3"&gt;3. Programmable Logic Creation&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec4"&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec5"&gt;5. VHDL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec6"&gt;6. Verilog &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec7"&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec8"&gt;8. High Level Synthesis &lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec9"&gt;9. System Optimizing Compilers&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec10"&gt;10. MyHDL and CHISEL&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-anchor-small" href="#sec11"&gt;11. Higher Level Frameworks&lt;/a&gt;&lt;/span&gt; | &lt;span style="padding:0px 6px;"&gt;&lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4498/development-kits-for-element14-essentials-fpga-programmable-soc-programming-languages"&gt;Development Kits&lt;/a&gt;&lt;/span&gt; | &lt;span style="font-weight:bold;padding:0px 6px;"&gt;&lt;a href="#test"&gt;Test Your Knowledge &lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/LinkArrow.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="float:right;width:155px;border:1px solid #b8d7e5;padding:12px;margin:20px 0px 5px 5px;background-color:#e4f2f8;"&gt;&lt;p style="margin:0;color:#007fac;font-weight:bold;"&gt;Also Available:&lt;/p&gt;&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/3802/programmable-devices-i-programmable-logic"&gt;Programmable Devices I: Programmable Logic&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:5px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;a class="jive-link-wiki-small" href="/learn/learning-center/online-learning/essentials/w/documents/4109/programmable-devices-ii-programmable-socs"&gt;Programmable Devices II: Programmable SoCs&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;color:#007fac;font-size:15px;padding:8px 0px;"&gt;&lt;a name="intro"&gt;&lt;/a&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;There are several different methods that we can use to create the Programmable Logic design within an FPGA or heterogeneous SoC. The goal of this course on programming languages is to explore the different methods that can be used to capture a design.&lt;/p&gt;&lt;p style="margin:0;clear:both;"&gt;&lt;a name="object"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;strong&gt;2. Objectives&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 8px 35px;"&gt;&lt;em&gt;Upon completion of this module, you will be able to understand:&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; The process of programmable logic creation&lt;/p&gt;&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; The difference between Synthesizable and Non-Synthesizable code&lt;/p&gt;&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; The history and basics of VHDL and Verilog&lt;/p&gt;&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; The basics of HLS&lt;/p&gt;&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; The role of a System Optimising Compiler and how it is used&lt;/p&gt;&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; More about HDLs such as MyHDL and Chisel&lt;/p&gt;&lt;p style="margin:0;padding:4px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; Higher level frameworks which allow the use of languages such as Python&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec3"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;3. Programmable Logic Creation&lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Before we jump too far into the languages themselves, we need to first understand the FPGA implementation process and how it is different from traditional software designed to run on a processor.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;The main difference between the software and programmable logic implementations is that the software world is inherently sequential. To execute a software application, each instruction in the application must be fetched from memory, decoded, and then executed. Of course, computer architects implement pipelines, conditional execution, and multiple cores to increase performance.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Commonly used embedded system languages such as C and C++ are therefore designed to operate with this sequential execution in mind, although there are ways to code for multi-threading and parallel programming.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram1x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="304" src="/e14/assets/legacy/2019/fpga_diagram1x.png" style="width:512px;height:304.244px;" width="512"  /&gt;&lt;/a&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 1: Software application execution&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;However, programmable logic is inherently parallel, and therefore the Hardware Description Languages used to capture design intent need to be able to support both parallel and sequential structures.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;While implementation of software requires a single stage compilation, implementing an FPGA is a three-stage process which can be much more involved to achieve the desired performance. The input is the design described in a Hardware Description Language (HDL), while the output is the programming file.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Synthesis – &lt;/strong&gt;During the synthesis stage, the logical structures defined within the HDL are extracted. Synthesis therefore determines the logic design which will be implemented, and this includes logic gates, RAMS, DSPs, etc. Synthesis will analyze the design and perform logic optimization, trimming unused signals and variables. This can result in unwanted optimizations or synthesis decisions, and as such the developer can control synthesis behavior, strategies, and optimizations using synthesis constraints. Constraints are text based and guide the synthesis tool during its operation.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Implementation – &lt;/strong&gt;The implementation stage takes the netlist created by the synthesis tool and performs two separate functions. The first step in the implementation process is to map the logical functions defined by the synthesis netlist into logic resources available within the logic. To ensure the timing performance can be achieved, placement needs to be timing aware, to ensure logic functions are placed close together. Once all the logic resources have been placed, they need to be interconnected as defined in the synthesis netlist. This step is called routing, and it has a significant impact on the timing behavior of the logic implementation. Just as we can with synthesis, we can use constraints to control the behavior of the place and route solution.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Bit File Generation – &lt;/strong&gt;This is the final stage, and it takes the output from the implementations stage and creates a programming file which will configure the logic. Depending upon the target device, this may be used to program an SRAM, FLASH, or One Time Programmable FPGA.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec4"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;4. Synthesizable vs Non-Synthesizable Commands &amp;amp; Structures &lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;One of the key concepts that we need to understand when writing code for programmable logic implementation, regardless of the language, is the concept of synthesizable and non-synthesizable command and structures.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Synthesizable code is code for which the synthesis tool will be able to extract a logical structure. At the simplest level, this could be a logic gate or a flip flop. Synthesizable code consists of commands, which the synthesis tool can interpret and implement, along with specific coding structures which the Synthesis tool can interpret. As such, we find that for synthesizable code, we are constrained by not only the commands we can use, but also the way in which we use those commands.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram2.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" src="/e14/assets/legacy/2019/fpga_diagram2.png"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 2: VHDL Synthesisable Accumulator&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Non-synthesizable code, on the other hand, is where the synthesis tool cannot work out and implement the design intent. A good example of this would be a delay or a statement to print out a message. Such functionality can be implemented within programmable logic, however, it requires the implementation of shift registers, timers, and state machines, the creation of which is beyond the capabilities of synthesis tools.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;An example of non-synthesizable VHDL can be seen below which includes both a time delay (wait for 1µs) and reporting messages. The command structure has multiple waits; it should be noted that within the process VHDL also cannot be synthesized.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram3.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" src="/e14/assets/legacy/2019/fpga_diagram3.png"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 3: VHDL Example of Non-Synthesisable code &lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Both synthesizable and non-synthesizable code will be used in most programmable logic developments. Synthesizable code is used to describe the logic design, while the non-synthesizable code is used to create test benches which verify the behaviour.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec5"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;5. VHDL &lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;VHDL is one of the two main HDLs, the other being Verilog. VHDL actually stands for Very High-speed integrated circuit Hardware Description Language (VDHL); it was originally created in the 1980s by the US Department of Defense, who desired a standard language with which defense contractors could document and simulate their ASIC designs. Of course, it did not take long before the first synthesis tool was available to directly implement logic from VHDL descriptions.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;The VHDL language itself was based on another DoD language, ADA, and when it was initially released VHDL fell under ITAR (International Traffic in Arms Regulations) controls. However, ITAR status was removed in 1986 when the language reference manual was passed to the IEEE for standardization. This led to the first of several IEEE versions of the VHDL, the first starting in 1987. This initial version was followed five years later by VHDL-1993, which was the first major revision and introduced multi value logic, useful when you want to define weak pull ups or tristate. VHDL-1993 is still the most commonly used version of the language today nearly 25 years later. Minor revisions of VHDL were introduced in 2000 and 2002, while a more major revision was introduced with VHDL 2008; however, many EDA tools suppliers are still yet to fully support this.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;The basic VHDL file consists of two parts:&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Entity – &lt;/strong&gt;This defines the inputs and outputs of the design. It is also possible to include customization parameters within an entity.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Architecture – &lt;/strong&gt;This defines the functionality of the module itself, and it’s where we implement the majority of the VHDL code.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Within the architecture, once the types, constants, and signals have been defined, every command is implemented concurrently. Most of the logic implemented within a VHDL file will be contained within a VHDL process. A process is a concurrent statement, meaning that all processes within the architecture are concurrent. However, within a process, the statements are executed sequentially; within simulation processes are awakened for execution by the sensitivity list.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram4.png"&gt;&lt;img loading="lazy" alt="image" height="394" src="/e14/assets/legacy/2019/fpga_diagram4.png" style="width:720px;height:393.708px;float:left;" width="720"  /&gt;&lt;/a&gt;&lt;p style="margin:0;clear:both;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 4: Process Implementing a State Machine &lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Communication between processes and combinatorial structures within an architecture uses signals. Signals can be declared to be one of several types, and the most common three types are:&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;std_logic – &lt;/strong&gt;Logical type which can be one of nine logic values (0,1,W,H,L,-,X,Z,U)&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Unsigned / Signed – &lt;/strong&gt;Logical type capable of storing signed and unsigned numbers&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Integer – &lt;/strong&gt;Integer type, and the range of the integer can be defined. However, if it is not defined, it defaults to 32-bit implementation&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;In comparison to Verilog, VHDL is very strongly typed; as such, conversion between types requires a conversion function. This can prevent some issues which may result from incorrect conversion between types accidentally.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;While entities and architectures are the mainstay of the VHDL developments, we will also work with packages, functions, and procedures.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Packages – &lt;/strong&gt;Used to store common constants, functions, and procedures which can be used across several VHDL designs.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Functions – &lt;/strong&gt;Contain sequential statements which implement logical or mathematical functions. We can use functions to define conversion functions between types as well.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Procedures – &lt;/strong&gt;Contain collections of sequential statements.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;So, what is the difference between functions and procedures? To a newcomer, Functions and Procedures may seem very similar; however, there are several subtle but significant differences. The largest difference between the two is the number of returned parameter functions. Functions must return only one parameter, while procedures can return zero or multiple parameters.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec6"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;6. Verilog&lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Unlike VHDL, which emerged from the US DoD, the other main language used for programmable logic development, Verilog, emerged from the commercial sector. Verilog emerged around the same time that VHDL did in 1983, being developed for a logic simulator offered by Gateway Design Automation (now Cadence).&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;As a language, Verilog is based upon C, Pascal, and OCAM. This makes Verilog much less verbose than VHDL, and unlike VHDL, Verilog is not strongly typed.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Like VHDL, Verilog was first standardized by the IEEE in 1995, and has undergone several revisions over the years, including 2001 and 2005. Verilog 2005 is also the base for System Verilog along with OpenVera and SuperLog. System Verilog includes many additional constructs and support for design modelling and verification. Since 2008, Verilog and System Verilog have been part of the same standard.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;The basic element of Verilog is the module. The module is where we declare not only the inputs and outputs of the module, but also where the body of the design is implemented.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;To implement sequential structures within Verilog we use the &amp;quot;always block&amp;quot;. Like VHDL, the always block also has a sensitivity list which triggers the execution of the block. Within an always block commands are executed sequentially, while multiple always blocks operate in parallel.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Within a Module we can use either a wire or a reg to represent variables in the design. Which one we use depends upon if we are implementing combinatorial or sequential logic, and if we are implementing the code within an always block.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;If we are performing a combinatorial assignment outside of an always block, all the variables can be declared as wires. However, if we are using an always block to implement either a combinatorial or clocked structure, then the Left-Hand Side variable must be declared of type Reg.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram5.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="227" src="/e14/assets/legacy/2019/fpga_diagram5.png" style="width:634px;height:227.244px;" width="634"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 5: Verilog Always Block &lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Verilog also allows the developer to create and reuse code using tasks and functions.&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Tasks – &lt;/strong&gt;Are like subroutines and contain code which implements the desired function. A task is called, receives its data, processes the data, and returns the results of the task.&amp;nbsp; Tasks are defined within a module and can be located in separate files, which can be called using the ‘include option’ in the calling module.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Functions – &lt;/strong&gt;Are like tasks; however, they can only drive one output and cannot contain any delays, for example, waiting for clocks, etc.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec7"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;7. VHDL &amp;amp; Verilog Language Wars &lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;During the early 1990s, when both VHDL and Verilog were gaining in popularity, there occurred what is now called the language war. The VHDL / Verilog language war took place in the unlikely EDA battleground, as EDA tool vendors and engineers pushed one language over the other with the expectation that like the VHS / Betamax battle one would reign supreme. This would lead to many heated conversations on discussion boards and at conferences between engineers on the benefits of their chosen language.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;As it turns out, the war ended in a truce when it was realized by EDA vendors that both languages where maturing and issues within the language reference manuals were being addressed by later revisions of the standards. Major advances in this were the IEEE 1993 version and the adoption of Verilog as an IEEE standard, also.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec8"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;8. High Level Synthesis&lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;High Level Synthesis (HLS) allows programmable logic developers to create IP cores using high level languages such as C, C++, or SystemC.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram6.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="261" src="/e14/assets/legacy/2019/fpga_diagram6.png" style="width:496px;height:261.096px;" width="496"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 6: Example of HLS Code&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;As we can work at a higher level of abstraction using a C-based language, we can create more complex designs faster. This shortening of the design cycle comes in two areas. The first comes from the development of the algorithm at a higher level. However, perhaps the largest savings come across in the verification times scales, as we can simulate the design in C as well. This means we are not simulating at the clock cycle level but at the functional level, significantly accelerating the simulation time.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Of course, there is also a learning curve associated with learning a new language and approach such as HLS.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;It should be pointed out at this time that the output from HLS is both VHDL and Verilog source code, which is then implemented following a traditional programmable logic flow.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;HLS converts C into an HDL for implementation using three stages:&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Scheduling – &lt;/strong&gt; In this phase, the HLS algorithm determines the order of operations and assigns them to a clock cycle.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) Binding – &lt;/strong&gt; In the binding phase, the operations are bound to logic resources within the target FPGA device, e.g. DSP, Block RAM, or LUTs.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Control Logic Extraction – &lt;/strong&gt; In this final phase, the control logic is generated to control synthesized logic.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram7x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="409" src="/e14/assets/legacy/2019/fpga_diagram7x.png" style="height:409px;width:437.859px;float:left;" width="437"  /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p style="margin:0;clear:both;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 7: HLS converts C into an HDL for implementation using three stages&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;clear:both;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor’s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the algorithm in C, using the appropriate libraries&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Create a C Test Bench&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Update the algorithm until the functional performance is achieved&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Perform High Level Synthesis generating the HDL for implementation&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) &lt;/strong&gt;Perform Co-Simulation with RTL tested by C Test Bench&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;6) &lt;/strong&gt;Export the IP core into Vivado&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;To enable the maximum performance the synthesis tool needs to provide several libraries. For Vivado HLS this includes:&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Arbitrary Precision libraries – &lt;/strong&gt; These allow operands which are not based on power of 2 (e.g., 8,16,32). These are especially important for fixed point mathematical operations.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Video Libraries – &lt;/strong&gt; Provides a range of image processing functions, which are synthesizable along with providing several functions that integrate with OpenCV for verification and simulation.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Math Library – &lt;/strong&gt; Provides a range of functions, like what we would find in math.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Linear Algebra – &lt;/strong&gt; Provides libraries for implementing linear algebra&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Logic Core IP – &lt;/strong&gt; Ability to call up any IP core from the Xilinx IP Library.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;table border="1" cellpadding="5" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border:1px solid black;background-color:#182e53;color:white;"&gt;Language&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#182e53;color:white;"&gt;Type (unsigned/signed)&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#182e53;color:white;"&gt;Max Size&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#182e53;color:white;"&gt;Header&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#182e53;color:white;"&gt;Example&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;C&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;uint&amp;lt;&amp;gt; / int&amp;lt;&amp;gt;&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;1024&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_cint.h&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;int &amp;lt; 87&amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;C++&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_uint / ap_int&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;1024&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;ap_int.h&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;ap_int&amp;lt; 87 &amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;System C&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_uint / sc_int&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;64&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;ON&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;sc_int&amp;lt; 87 &amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;System C&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;sc_ubigint / sc_bigint&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;512&lt;/td&gt;&lt;td style="border:1px solid black;color:#71695a;"&gt;OFF&lt;/td&gt;&lt;td style="border:1px solid black;background-color:#f4f2f0;color:#71695a;"&gt;sc_bigint&amp;lt; 87 &amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="line-height:12px;font-size:11px;padding-top:12px;"&gt;&lt;em&gt;Figure 8: HLS Arbitrary Precision Data Types&lt;/em&gt;&lt;/div&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;As stated in the introduction, C is not intended for parallelization inherently, and as such, to get the best performance from the HLS and leverage the parallelization of logic we need to instruct the HLS tool how best to implement the design for a logic implementation.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;We do this using #pragmas in the body of the code. There are many pragmas which can be used in HLS, however, the three most commonly used ones are:&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Pipeline / DataFlow – &lt;/strong&gt; Used to ensure instructions and functions are pipelines if possible&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Interface – &lt;/strong&gt; Define the interface type from either simple FIFO to AXI&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;a href="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/small_square_bullet_oj5x5.gif" style="vertical-align:middle;"  /&gt;&lt;/a&gt; &lt;strong&gt;Array Partition – &lt;/strong&gt; Fracture Arrays such that they are stored across multiple BRAMS easing parallelization&lt;/p&gt;&lt;center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram9x.png"&gt;&lt;img loading="lazy" alt="image" src="/e14/assets/legacy/2019/fpga_diagram9x.png"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 9: Pipelining at the data flow level&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;To help us optimize the C-based synthesis, we can use inbuilt design analysis tools to identify bottle necks, helping us to apply the correct optimization.&lt;/p&gt;&lt;center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram10.png"&gt;&lt;img loading="lazy" alt="image" height="391" src="/e14/assets/legacy/2019/fpga_diagram10.png" style="width:852px;height:390.622px;" width="852"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 10: Optimizing the C-based synthesis with an inbuilt design analysis tool&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec9"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;9. System Optimizing Compilers&lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Many logic designs are implemented in heterogeneous SoC devices. These devices combine high performance processors (usually Arm based) with programmable logic.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Unfortunately, the standard development flow is based around separate flows, for the different halves of the device.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Once the sub system architecture has been defined, which identifies which elements of the algorithm are implemented in the processing system and which ones are implemented within the programmable logic, the two separate design and implementation teams go away and work in isolation until it is time to perform the integration at the system.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;System optimising compilers enable the architecture of the design to be optimized and partitioned between the processors and programmable logic as the development progresses, seamlessly moving functions between the processor and programmable logic at will at the click of a switch.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;This is possible thanks to the power of HLS and an interconnectivity framework which can connect HLS IP blocks back to the processor seamlessly.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;This framework allows the application to be developed initially entirely running the processors cores in C. Again, like HLS this development flow is much faster, however, the resultant performance on the target, while functionally correct may not meet the performance required.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Like HLS tools, system optimising compilers are specific to a vendor. As such, for the rest of the section, we will use Xilinx SDSoC as an example tool.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;SDSoC allows us to generate the design on the processor and then accelerate functions into the programmable logic using the following flow:&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) &lt;/strong&gt;Develop the application in C running on the processors&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) &lt;/strong&gt;Verify the functionality&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) &lt;/strong&gt;Identify the performance bottleneck functions&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) &lt;/strong&gt;Accelerate the bottleneck functions into the programmable logic&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram11.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="411" src="/e14/assets/legacy/2019/fpga_diagram11.png" style="width:497px;height:411.395px;" width="497"  /&gt;&lt;/a&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 11: Profiling the Functions in SW&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Once the application is complete, the TCF profiler can be used to identify the bottlenecks in performance. The results of this profiling can be used to identify potential acceleration candidates.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram12.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" src="/e14/assets/legacy/2019/fpga_diagram12.png"  /&gt;&lt;/a&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 12: The stages that SDSoC uses to create a solution&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;As SDSoC uses High Level Synthesis as part of the solution, many of the pragmas used in an HLS solution are necessary to achieve the best performance in the accelerated function.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;That may lead to the question of “What should we accelerate using the system optimizing compiler?” To get the best from SDSoC, we need to transfer large quantities of data to and from the programmable logic using DMA. If we are transferring small segments of data between the processor and programmable logic, the data transfer time will dominate and impact the results of the acceleration.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Amdahl&amp;#39;s law can be used as a good indication of the acceleration achieved by moving a function from the PS to the PL.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagramx.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="88" src="/e14/assets/legacy/2019/fpga_diagramx.png" style="width:274px;height:88.443px;" width="274"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Where,&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;S: overall performance improvement&lt;br /&gt;α: percentage of the algorithm that can be sped up with hardware acceleration&lt;br /&gt;1-α: percentage of the algorithm that cannot be improved&lt;br /&gt;p: the speedup due to acceleration (%)&lt;br /&gt;Set Alpha to 0.1 and select speed up - even with large acceleration P defined, speed up is close to 1&lt;br /&gt;Set Alpha to 0.5 and select same speed up – close to factor of two improvement&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Once we have an implementation, we may want to further fine tune the application. To provide the best understanding of the processor execution, data transfer time, and programmable logic implementation we can trace the design which provides a breakdown of where time is spent in the application.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram13.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="329" src="/e14/assets/legacy/2019/fpga_diagram13.png" style="width:1020px;height:328.525px;" width="1020"  /&gt;&lt;/a&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 13: SDSoC: Tracing the Design, looking in both HW and SW&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec10"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;10. MyHDL and CHISEL&lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Of course, not all developments use VHDL, Verilog, or HLS for development. There are several other languages which are often used for programmable logic development. Two of the more commonly used are CHISEL and MyHDL, and just like HLS tools both languages generate VHDL or Verilog for implementation.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;According to the IEEE, Python is the hottest programming language. Python is used across several industries, taught in schools and universities, and even is used in embedded systems via micro Python.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;MyHDL is a Python package that allows us to use Python to design our FPGA;, what’s more, it is open source and freely available. It is not, however, a High-Level Synthesis tool; the developer still needs to understand logic design techniques.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram14x.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="411" src="/e14/assets/legacy/2019/fpga_diagram14x.png" style="width:796px;height:410.61px;" width="796"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 14: MyHDL Example&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Like using HLS, MyHDL allows us to use the same language for the algorithm development as for implementation. To achieve concurrency, MyHDL uses generators, while communication between concurrent modules uses an object called a signal which is within the MyHDL package.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;What is very interesting about MyHDL is that it provides a powerful simulation environment, as it can leverage the power of the wider Python language to generate test benches and stimulus. This includes native support for databases, GUIs, and so on.&lt;/p&gt;&lt;p style="margin:0;clear:both;padding-top:12px;"&gt;CHISEL is an acronym like VHDL; it actually stands for Constructing Hardware In a Scala Embedded language. CHISEL is an open source language which was developed at UC Berkeley, the same University who gave us SPICE.&amp;nbsp; Indeed, the RISC-V rocket core is implemented by Berkeley Architecture Research using CHISEL.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;At the heart of CHISEL is SCALA, which was developed originally by a French university to compile down to byte code and be executed on the Java Virtual Machine (JVM). Within the programmable logic world, we use CHISEL very similarly to MyHDL although there are some subtle differences. The first is that CHISEL is object orientated, and the second is in how we verify and use our CHISEL design.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram15.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="372" src="/e14/assets/legacy/2019/fpga_diagram15.png" style="width:313px;height:372.305px;" width="313"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;"&gt;&lt;em&gt;Figure 15: CHISEL Example&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;CHISEL has two output formats, but unlike MyHDL they are not Verilog and VHDL. Instead, Verilog&amp;#39;s used for hardware implementation and C++ for verification, with the C++ being used for verification with a software model. This presents a very interesting capability for large designs, in that we can reduce the verification time significantly like we can when we are using HLS.&lt;/p&gt;&lt;p style="margin:0;padding:0px;clear:both;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a name="sec11"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="color:#007fac;font-size:15px;padding:4px 8px;margin-top:16px;background-color:#e7f2f5;vertical-align:middle;"&gt;&lt;div style="display:inline-block;vertical-align:top;width:75%;"&gt;&lt;strong&gt;11. Higher Level Frameworks &lt;/strong&gt;&lt;/div&gt;&lt;div style="display:inline-block;vertical-align:top;text-align:right;font-size:11px;width:24%;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:12px;"&gt;When working with heterogeneous SoCs, we can use both processors and the programmable logic to implement the overall solution. We can of course use a system optimising compiler to implement the solution optimally between the processor and programmable logic. However, when we use a system optimising compiler, the software application is still created in C or C++.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;What would be nice is to be able to leverage the design in the programmable logic using higher level languages and frameworks, such as Python, running on the processors.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;One framework which enables this is the Xilinx Open Source PYNQ Framework. The PYNQ framework builds upon the Linux Kernel drivers and offers a range of specific APIs, which provide PYNQ libraries and drivers.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram16.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" src="/e14/assets/legacy/2019/fpga_diagram16.png" style="float:left;"  /&gt;&lt;/a&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 16: The PYNQ Framework&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;These APIs enable iPython applications running within a Jupyter note book to be able to access the programmable logic design.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram17.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" src="/e14/assets/legacy/2019/fpga_diagram17.png" style="float:left;"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;center&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 17: Implementation of the Pynq framework&lt;/em&gt;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Communication between the processor system and the programmable logic depends on the interface used. In PYNQ implementations, there are five different PS / PL interfaces which are used:&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Free HLS Tools are generally specific to a vendor’s tool chain and devices. For the remainder of this section we use Xilinx Vivado HLS as the base example.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;The standard development flow for an HLS based IP module is:&lt;/p&gt;&lt;p style="margin:0;padding:12px 0px 0px 45px;"&gt;&lt;strong&gt;1) Bitstream  —  &lt;/strong&gt;This configures the programmable logic for the desired application. In the PYNQ framework, the xdevcfg driver is used.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;2) GPIO  —  &lt;/strong&gt;This provides simple IO in both directions. In the PYNQ framework, this is supported by the sysgpio driver.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;3) Interrupts  —  &lt;/strong&gt;Support interrupt generation from the programmable logic to the processing system. In the PYNQ framework, this is supported by the Userspace IO driver.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;4) Master AXI Interfaces  — &lt;/strong&gt; These are used to transfer data between the PS to the PL when the PS is the initiator of the transaction. The PYNQ framework uses devmem when employing the master AXI interface.&lt;/p&gt;&lt;p style="margin:0;padding:8px 0px 0px 45px;"&gt;&lt;strong&gt;5) Slave AXI Interfaces  — &lt;/strong&gt; These are used to transfer data between the PS and PL when the PL is the initiator of the transaction. The PYNQ framework uses xlnk to enable these transfers.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding:8px 0px 0px 45px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram18.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="317" src="/e14/assets/legacy/2019/fpga_diagram18.png" style="height:317px;width:528.333px;float:left;" width="529"  /&gt;&lt;/a&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 18: Interfaces between the processor system and the programmable logic.&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;PYNQ applications are developed using a Jupyter notebook over a web interface.&lt;/p&gt;&lt;p style="margin:0;padding:0px;padding-top:12px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;center&gt;&lt;a href="/e14/assets/legacy/2019/fpga_diagram19.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="150" src="/e14/assets/legacy/2019/fpga_diagram19.png" style="width:558px;height:149.921px;float:left;" width="558"  /&gt;&lt;/a&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&lt;em&gt;Figure 19: Example PYNQ code loading a design into the programmable logic&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;line-height:12px;font-size:11px;padding-top:3px;text-align:left;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/center&gt;&lt;p style="margin:0;padding-top:12px;"&gt;When it comes to creating PYNQ designs, we can use a system optimising compiler as the starting point to create the programmable logic design and the C libraries, which are then wrapped in Python.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;color:#007fac;font-size:15px;padding:8px 0px;"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;"&gt;Having been introduced to several languages which can be used to implement programmable logic designs, you should now understand a little more about the available languages and their suitability for your application.&lt;/p&gt;&lt;p style="margin:0;padding-top:12px;font-size:11px;"&gt;*Trademark. &lt;strong&gt;Xilinx is a trademark of Xilinx Inc.&lt;/strong&gt; Other logos, product and/or company names may be trademarks of their respective owners.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="border:1px solid #a9aaaa;background-color:#e7f2f5;padding:12px 12px 0px;"&gt;&lt;a href="/e14/assets/legacy/2019/fpga_profile.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox essProfile" height="115" src="/e14/assets/legacy/2019/fpga_profile.png" style="float:left;padding-right:10px;vertical-align:middle;"  /&gt;&lt;/a&gt;&lt;div&gt;&lt;p style="margin:0;font-size:15px;color:#007fac;padding-bottom:10px;"&gt;Shop our wide range of SoCs, EVMs, application specific kits, embedded development boards, and more.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AU_CN_HK_IN_KR_MY_NZ_PH_SG_TH_TW_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" href="http://sg.element14.com/xilinx-storefront?COM=essentials-fpga-banlink" target="_blank" title="Shop Now"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-AT_BE_BG_CZ_DK_EE_FI_FR_DE_HU_IE_IL_IT_LV_LT_NL_NO_PL_PT_RO_RU_SK_SI_ES_SE_CH_TR_UK_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" href="http://uk.farnell.com/xilinx-storefront?COM=essentials-fpga-banlink" target="_blank" title="Shop Now"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-US_BR_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" href="http://www.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" target="_blank" title="Shop Now"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-CA_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" href="http://canada.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" target="_blank" title="Shop Now"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="e14-conditional-content e14-init-hidden e14-conditional-country-MX_"&gt;&lt;span class="e14-button-large e14-button-primary"&gt;&lt;a class="jive-link-external-small" href="http://mexico.newark.com/xilinx-storefront?COM=essentials-fpga-banlink" target="_blank" title="Shop Now"&gt;Shop Now&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;clear:both;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin:0;padding-top:20px;"&gt;&lt;a name="test"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;color:#007fac;font-size:18px;padding-bottom:8px;"&gt;&lt;strong&gt;Test Your Knowledge&lt;/strong&gt;&lt;span style="font-size:11px;float:right;"&gt;&lt;a class="jive-link-anchor-small" href="#top"&gt;&lt;strong&gt;Back to Top&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/e14/assets/legacy/2019/fpgaBadge_03.png"&gt;&lt;img loading="lazy" alt="image" class="nolightbox" height="80" src="/e14/assets/legacy/2019/fpgaBadge_03.png" style="vertical-align:top;float:left;padding:0px 10px 5px 0px;"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding-bottom:8px;"&gt;Are you ready to demonstrate your FPGA / Programmable SoC Programming Languages knowledge? &lt;strong&gt;Then take a quick 15-question multiple choice quiz to see how much you&amp;#39;ve learned from this module.&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;To earn the Programmable Devices III Badge&lt;/strong&gt;, read through the module to learn all about FPGA / Programmable SoC Programming Languages, attain 100% in the quiz at the bottom, leave us some feedback in the comments section, and give the module a star rating.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-document-metadata e14-init-hidden"&gt; &lt;/div&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;  [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;       [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;     [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;     [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;     [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;     [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;     [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="e14-quiz-question"&gt;      [QUIZ QUESTION PLACEHOLDER]&lt;/div&gt;
&lt;div class="migration-injected-attachments"&gt;&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;table style="border:0;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="160"&gt;&lt;span class="_se_attachment" id="attid_https://www.element14.com/community/api/core/v3/attachments/286822"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-50/FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf"&gt;community.element14.com/.../FPGA-_3A00_-Programmable-SoC-Programming-Languages-Essentials.pdf&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:80%;"&gt;FPGA : Programmable SoC Programming Languages Essentials.pdf&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;script&gt;window.top.e14.func.queueScripts.add(function() { window.top.e14.func.e14ConditionalContent();} );&lt;/script&gt;

&lt;div style="font-size: 90%;"&gt;Tags: programmable devices iii, fpga_essentials, soc, programmable_devices, xilinx_essentials, fpga programmable soc programming languages*, xilinx, fpga, ess_module&lt;/div&gt;
</description></item></channel></rss>