13 December 2022

Verilog Vectors and Arrays

Welcome back to my series covering mathematics and algorithms with FPGAs. In this part, we dig into vectors and arrays, including slicing, configurable widths, for loops, and bit and byte ordering. This post is being updating in February 2023. New to the series? Start with Numbers in Verilog. Get in touch with @WillFlux or join me on GitHub Discussions and 1BitSquared Discord. Series Outline Numbers in Verilog - introduction to numbers in Verilog Vectors and Arrays (this post) - working with Verilog vectors and arrays Multiplication with DSPs - efficient multiplication with FPGA DSPs Fixed-Point Numbers in Verilog - precision without complexity Division in Verilog - divided we stand More maths throughout 2023 Sponsor My Work Read more

27 November 2021

Multiplication with FPGA DSPs

Welcome back to my series covering mathematics and algorithms with FPGAs. Project F is known for its practical, hands-on tutorials. So, I decided to dedicate a post to a topic usually ignored by introductory guides: multiplication with DSPs. This post was last updated in November 2022. New to the series? Start with Numbers in Verilog. Get in touch with @WillFlux or join me on GitHub Discussions and 1BitSquared Discord. Series Outline Numbers in Verilog - introduction to numbers in Verilog Vectors and Arrays - working with Verilog vectors and arrays Multiplication with FPGA DSPs (this post) - efficient multiplication with DSPs Fixed-Point Numbers in Verilog - precision without complexity Division in Verilog - divided we stand More maths throughout 2023 Sponsor My Work Read more

30 September 2021

Numbers in Verilog

Welcome to my ongoing series covering mathematics and algorithms with FPGAs. This series begins with the basics of Verilog numbers, then considers fixed-point, division, square roots and CORDIC before covering more complex algorithms, such as data compression. This post was last updated in February 2022. In this first post, we consider integers, dig into the challenges of signed numbers and expressions, and then finish with a bit of arithmetic. This post was completely revised in November 2022. Read more

27 May 2021

FPGA Sine Lookup Table

In this how to, we’re going to look at a straightforward method for generating sine and cosine using a lookup table. There are more precise methods, but this one is fast and simple and will suffice for many applications. This post was last updated in October 2022. New to Verilog maths? Check out my introduction to Numbers in Verilog. Get in touch with @WillFlux or join me on GitHub Discussions and 1BitSquared Discord. Read more

22 December 2020

Square Root in Verilog

The square root is useful in many circumstances, including statistics, graphics, and signal processing. In this how to, we’re going to look at a straightforward digit-by-digit square root algorithm for integer and fixed-point numbers. There are lower-latency methods, but this one is simple, using only subtraction and bit shifts. This post was last updated in June 2021. New to Verilog maths? Check out my introduction to Numbers in Verilog. Get in touch with @WillFlux or join me on GitHub Discussions and 1BitSquared Discord. Read more

22 September 2020

Life on Screen

In this FPGA demo we’ll experiment with Game of Life, a cellular automaton created by John Conway in 1970. This post was last updated in October 2022. Get in touch with @WillFlux or join me on GitHub Discussions and 1BitSquared Discord. This demo uses an old framebuffer design. For new projects, I recommend Framebuffers. Requirements For this demo you need an FPGA board with video output. I’ll be working with the Digilent Arty, but it should be easy to adapt this design to other boards. Read more

1 July 2020

Division in Verilog

Division is a fundamental arithmetic operation we take for granted. FPGAs include dedicated hardware to perform addition, subtraction, and multiplication and will infer the necessary logic. Division is different: we need to do it ourselves. This post looks at a straightforward division algorithm for positive integers before extending it to cover fixed-point numbers and signed numbers. New to Verilog maths? Check out my introduction to Numbers in Verilog. This post was completely revised in January 2023. Read more

26 May 2020

Fixed Point Numbers in Verilog

Sometimes you need more precision than integers can provide, but floating-point computation is not trivial (try reading IEEE 754). You could use a library or IP block, but simple fixed point maths can often get the job done with little effort. Furthermore, most FPGAs have dedicated DSP blocks that make multiplication and addition of integers fast; we can take advantage of that with a fixed-point approach. New to the series? Start with Numbers in Verilog. Read more

©2023 Will Green, Project F