FPGARelated.com

Square root in fixed point VHDL

Jari HonkanenJari Honkanen ● October 10, 2023●1 comment

In this blog we will design and implement a fixed point square root function in VHDL. The algorithm is based on the recursive Newton Raphson inverse square root algorithm and the implementation offers parametrizable pipeline depth, word length and the algorithm is built with VHDL records and procedures for easy use.


Mastering Modern FPGA Skills for Engineers

Lance HarvieLance Harvie ● October 5, 2023

In the rapidly evolving tech industry, engineers must acquire proficiency in modern FPGA skills. These skills empower engineers to optimize designs, minimize resource usage, and efficiently address FPGA design challenges while ensuring functionality, security, and compliance.


FPGA skills for the modern world

GLENN KirilowGLENN Kirilow ● September 4, 2023

FPGA demand is booming across industries from automotive to edge AI, and employers want engineers who can think in hardware. This post explains the mindset shift to RTL-level, concurrent design, waveform-based debugging with ILAs, and modern verification flows. It also highlights the practical skills that make you marketable, including HDLs, SoC/Linux integration, RISC-V know-how, and high-speed design techniques.


Three more things you need to know when transitioning from MCUs to FPGAs

Duane BensonDuane Benson ● August 24, 2023

Take a look at three more important difference between FPGAs and MCUs: "code reuse" vs templating, metastability and blocking vs. non-blocking operations.


An absolute position encoder VHDL core

Fabien Le MentecFabien Le Mentec ● November 11, 2015

In this article, Fabien Le Mentec explains how to implement a unique VHDL core addressing absolute position encoder interfaces. He reviews existing instruments in use or being developed and considers their specific requirements. He also looks for details in current implementations and considers the projects to come so that the implementation can be designed to be extensible. The VHDL core dubbed absenc features both ENDAT, BISS and SSI interface. Due to its architecture, new interfaces are easily added. Also, the 3 interfaces can be enabled at synthesis while 1 is selected at runtime. As much as possible, resources common to the different interfaces are shared (counters, comparators…).


Inside the Spartan-6: Using LUTs to optimize circuits

Victor YurkovskyVictor Yurkovsky ● June 24, 2015●3 comments

Victor Yurkovsky hit poor synthesis packing while building a J1 CPU on Spartan-6 and traced the problem to an 18-bit logic ALU that mapped to many slices. He demonstrates a practical fix: instantiate LUT6 primitives with carefully chosen INIT values, then use RLOC placement to stack the per-bit LUTs and collapse the design down to five slices. This is a hands-on guide to Xilinx-specific optimization when synthesis falls short.


Homebrew CPUs: Messing around with a J1

Victor YurkovskyVictor Yurkovsky ● May 29, 2015

Victor Yurkovsky takes James Bowman's compact J1 stack CPU and starts hacking: he trims the ALU, replaces the barrel shifter with simpler shifts, and experiments with dual stacks and memory/IO feeding directly into the ALU. The article walks through small, practical changes that cut logic, add instructions, and boost timing on Spartan-6. It's a hands-on tour that shows how approachable homebrew CPUs can be.


Use a Simple Microprogram Controller (MPC) to Speed Development of Complex Microprogrammed State Machines

Michael MorrisMichael Morris ● April 18, 2015●2 comments

The article presents a synthesizable Verilog microprogram controller (MPC) modeled on the Fairchild F9408 that simplifies development of complex microprogrammed state machines. It explains desirable MPC features — a loadable program counter for sequential and non-sequential execution, conditional and multi-way branching, and a microsubroutine stack — and then provides a working HDL implementation (F9408A_MPC). The module is parameterized for microprogram address width, supports a 4-level LIFO return stack, 8-way multiway branch via an external selector, pipelined or non-pipelined operation, and registered test inputs for conditional branches. The article includes the full Verilog source and discusses practical uses of the MPC in designs from protocol controllers to a 65C02 microprocessor reimplementation.


Use Microprogramming to Save Resources and Increase Functionality

Michael MorrisMichael Morris ● March 21, 2015

Microprogramming can rescue an overfull FPGA, Michael Morris shows, by compressing control logic and time-multiplexing FIFO storage. He replaces an ABEL state machine with a small microprogram ROM that uses block RAM for deep Rx/Tx FIFOs and LUT RAM for pointers and counters, freeing about 25 percent of the device. The article includes Verilog comparisons, resource tables, and a microassembler link to reproduce the approach.


I don’t often convert VHDL to Verilog but when I do ...

Christopher FeltonChristopher Felton ● December 24, 2014●2 comments

Converting VHDL to Verilog is tedious, and Christopher Felton lays out a pragmatic, repeatable workflow using vhd2vl to do most of the heavy lifting. He walks through the iterate-run-comment-fix cycle, highlights frequent failure points like arrays, records and packages, and explains why many open-source projects favor Verilog for better FOSS simulator support.


VHDL tutorial - A practical example - part 3 - VHDL testbench

Gene BrenimanGene Breniman ● June 25, 2011●8 comments

Gene Breniman walks a complete VHDL testbench workflow for a CPLD-based data acquisition engine, from Xilinx ISE testbench generation to stimulus processes. He shows clock and SPI gating, a simulated ADC data generator tied to ADC_LRCK and ADC_BCK, and how simulation revealed a timing bug in the nvSRAM header that was then fixed in the VHDL. Practical and hands-on for verification work.


VHDL tutorial - part 2 - Testbench

Gene BrenimanGene Breniman ● October 30, 2007●3 comments

In this follow-up Gene Breniman builds a VHDL testbench in Xilinx ISE, showing how to generate a continuous master clock, apply a power-on reset, and sequence register strobes to change clock divisors. He walks through timing waits and observation delays needed to verify ADC clock rates. The article also shows how simulation exposed a copy-paste bug in the original design.


VHDL tutorial

Gene BrenimanGene Breniman ● October 4, 2007●9 comments

Gene Breniman presents a hands-on VHDL walkthrough for a programmable clock divider implemented on a Xilinx CoolRunner CPLD (XC2C32A). The example shows how to declare ports and internal signals, implement a clock-division process with reset and falling-edge detection, and create a simple addressable latch to select clock rates from a 40MHz master clock. It’s a compact, practical guide for embedded engineers learning VHDL and CPLD design.


VHDL tutorial - A practical example - part 2 - VHDL coding

Gene BrenimanGene Breniman ● May 27, 2011

Gene Breniman walks through the VHDL coding for a CPLD-based data acquisition engine, turning the hardware spec into a working state machine and signal generators. The article explains SPI and I2S timing choices, an internal SPI peripheral latch, and counter-based timing (seqCount and CycleCnt) used to create LRCK, BCK, SPI SCK and nvSRAM write control. It’s a practical, implementation-focused guide for embedded designers.


VHDL tutorial - Creating a hierarchical design

Gene BrenimanGene Breniman ● May 22, 2008●6 comments

Complex VHDL files quickly become hard to read and maintain. This tutorial demonstrates how to break a design into reusable entities by building a divide-by-10 component, explaining ports, sensitivity lists, and the inout usage for a toggled output. It then shows how to instantiate and chain three instances into a ÷1000 divider, with synthesis notes from compiling to an XC2C128 device.


VHDL tutorial - A practical example - part 1 - Hardware

Gene BrenimanGene Breniman ● May 18, 2011●1 comment

Gene Breniman walks through a practical CPLD-based data acquisition engine built for a low-power handheld instrument, focusing on hardware choices, signal flow, and pin assignments. The article explains component selection including a PCM1870 ADC, CY14B101Q2 serial nvSRAM, and an XC2C64A CPLD, and shows how the CPLD acts as an SPI sequencer and I2S clock master while minimizing microcontroller pins and power draw.


VHDL tutorial - combining clocked and sequential logic

Gene BrenimanGene Breniman ● March 3, 2008

Need the ADC clock to sometimes be the raw 40MHz input? Gene Breniman shows how to extend a reloadable, counter-based VHDL clock divider to support a master-clock pass-through by using a conditional signal assignment to switch between the internal ADCClk and Mclk. The article also covers remapping ClkSel values and includes a working XC2C32A CPLD build that leaves room for future enhancements.


I don’t often convert VHDL to Verilog but when I do ...

Christopher FeltonChristopher Felton ● December 24, 2014●2 comments

Converting VHDL to Verilog is tedious, and Christopher Felton lays out a pragmatic, repeatable workflow using vhd2vl to do most of the heavy lifting. He walks through the iterate-run-comment-fix cycle, highlights frequent failure points like arrays, records and packages, and explains why many open-source projects favor Verilog for better FOSS simulator support.


Using GHDL for interactive simulation under Linux

Martin StrubelMartin Strubel ● October 24, 2011

Martin walks through using the free GHDL VHDL simulator on Linux to go beyond static testbenches and run interactive simulations. You will see how GHDL and gtkwave give a fast, low-cost waveform workflow, how to call C code from VHDL via the VHPI interface, and how simple pipes let real software talk to your simulated FPGA for deeper system-level debugging.


An Editor for HDLs

Dave VandenboutDave Vandenbout ● July 17, 2012●10 comments

If you prefer Notepad++ over Emacs, Dave Vandenbout shows how to turn it into a capable HDL editor using templates, a Perl package generator, and Emacs run in batch mode for beautification. He covers FingerText snippets for VHDL skeletons, binding a Perl script to auto-create/update package component declarations, and invoking Emacs from a hotkey to format files with one keystroke.