Prototype

1. Usage Pool of prototypical instances copying them-self to create new copy of objects. Reason can be expensive usage of new() command. Also such approach hide complexity. 2. UML class diagram 3. Pros Adding and removing products at run-time. Specifying new objects by varying values. Specifying new objects by varying structure. Reduced sub-classing. Configuring an […]

Builder

1. Usage To implement reusable mechanize of polymorphic pipeline to generate step by step final complex product. For example function “save as” document – as HTML, RTF, PDF. each plugin for different format will have its own way to serialize – table, image or title objects. 2. UML class diagram Source: https://sourcemaking.com/design_patterns/builder 3. Pros 4. […]

Abstract Factory

1. Usage When required to create family of related objects, and they should be easily changed to another family of related objects at run-time we use Abstract Factory; 2. UML class diagram 3. Pros – related objects grouped together; – easy switch at runtime between families of objects; – making uniform way of working with […]

Factory Method

1. Usage “Define an interface for creating an object, but let subclasses decide which class to instantiate. The Factory method lets a class defer instantiation it uses to subclasses.”(Gang Of Four) 2. UML class diagram 3. Pros – client can create objects without specifying subclass types. 4. Cons – hard to refactor existing code. – […]

Double Dispatch

Recently I was visiting one company and got C++ interview question: What is double dispatch. I studied C++ quite long time ago and that question confused me. Single Dispatch is calling virtual method based on V-Table (run-time) but double dispatch? After interview I always review subjects which made me hard time. Thats only reason for going to […]

Using Digilent’s PMOD8LD with ZYBO FPGA board

This article explain how capabilities of powerful Xilinx FPGA ZYBO board can be expanded by using Pmod extensions from Digilent. Xilinx FPGA ZYBO board is perfect tool to learn FPGA programming. It is powerful but also a little bit limited if you compare to others boards from competitors. One of its limitation is amount of […]

VERILOG example using VIVADO 2015 with ZYBO FPGA board

Aim In this tutorial I will use Verilog with  classical FPGA design. I bought perfect modern FPGA board ZYBO (ZYnq BOard) based on Xilinx Z-7010 from Digilent but latest tools from Xilinx VIVADO 2015.2 more focused on AP SoC programming while I want to just pure FPGA design without any linuxes bootloaders etc. So I […]

VHDL example using VIVADO 2015 with ZYBO FPGA board

Aim   I am FPGA novice and want to try classical FPGA design tutorials. I bought perfect modern FPGA board ZYBO (ZYnq BOard) based on Xilinx Z-7010 from Digilent but latest tools from Xilinx VIVADO 2015.2 more focused on AP SoC programming while I want to just pure FPGA design without any linuxes bootloaders etc. […]