I thought it would take me a day or two to implement, it took almost two weeks...

But here it is, the new comments systems for blogs, heavily inspired by the forum system I developed earlier this year.

Which means that:

• You can easily add images, either by drag and drop or through the 'Insert Image' button
• You can add MathML, TeX and ASCIImath equations and they will be rendered with Mathjax
• You can add code snippets and they will be highlighted with highlights.js
• You can edit...

## Use DPLL to Lock Digital Oscillator to 1PPS Signal

Introduction

There are occasions where it is desirable to lock a digital oscillator to an external time reference such as the 1PPS (One Pulse Per Second) signal output from a GPS receiver. One approach would be to synchronize a fixed frequency oscillator on the leading edge of the 1PPS signal. In many cases, this will result in adequate performance. However, in situations where simple synchronization does not provide adequate performance, digital phase-lock techniques can be applied to a...

## Summer of gateware is coming (again)

How time flies!  I swear my last post was a summary of the 2015 summer of gateware.  This year (2016) MyHDL is participating in the Google summer of code again, for the second year, continuing as a sub-org of the Python Software Foundation organization.

This year, so far, has been amazing and inspiring.  We have had many talented students inquire about the project and contribute to myhdl and

## Data Types for Control & DSP

There's a lot of information out there on what data types to use for digital signal processing, but there's also a lot of confusion, so the topic bears repeating.

I recently posted an entry on PID control. In that article I glossed over the data types used by showing "double" in all of my example code.  Numerically, this should work for most control problems, but it can be an extravagant use of processor resources.  There ought to be a better way to determine what precision you need...

## 3 Good News

March 9, 20161 comment
Good News #1

Last week, I announced a new and ambitious reward program that will be funded by the new Vendors Directory.

This week, I am happy to announce that we have our firsts two sponsors!  Quantum Leaps & Abelon Systems have agreed to pay the sponsorship fee to be listed in the new Vendors Directory.  Because of their support, there is now some money in the reward pool ($1,000) and enough to pay for the firsts 500 'beers' awarded. Please... ## Go Big or Go Home - Generating$500,000 for Contributors

In a Nutshell
• A new Vendors Directory has been created
• Vendors will be invited to pay a sponsorship fee to be listed in the directory
• 100% of the basic sponsorship fee will be distributed to the *Related Sites community through a novel reward system
• The goal is for the directory to eventually generate - drum roll please -  $500,000 on a yearly basis for contributing members on the *Related Sites • Members will choose how the reward money gets distributed between... ## The New Forum is LIVE! February 18, 20161 comment After months of hard word, I am very excited to introduce to you the new forum interface. Here are the key features: 1- Easily add images to a post by drag & dropping the images in the editor 2- Easily attach files to a post by drag & dropping the files in the editor 3- Add latex equations to a post and they will be rendered with Mathjax (tutorial) 4- Add a code snippet and surround the code with ## Running Average February 15, 20166 comments The running average filter is a useful way to reduce noise in a system. One project I recently worked on required a 4 times frequency output from an encoder input. The problem was the encoder is mounted to the wheel of an old truck and bearing noise was making the original algorithm generate way too many pulses. The original algorithm worked, but the noise on the input made it useless. I first implemented the moving average based on ## Ancient History January 18, 201612 comments The other day I was downloading an IDE for a new (to me) OS. When I went to compile some sample code, it failed. I went onto a forum, where I was told "if you read the release notes you'd know that the peripheral libraries are in a legacy download". Well damn! Looking back at my previous versions I realized I must have done that and forgotten about it. Everything changes, and keeping up with it takes time and effort. When I first started with microprocessors we... ## Dealing With Fixed Point Fractions January 5, 20163 comments Fixed point fractional representation always gives me a headache because I screw it up the first time I try to implement an algorithm. The difference between integer operations and fractional operations is in the overflow. If the representation fits in the fixed point result, you can not tell the difference between fixed point integer and fixed point fractions. When integers overflow, they lose data off the most significant bits. When fractions overflow, they lose data off... ## The Spartans February 20, 20104 comments The latest release of the Xilinx Spartan family is the Spartan6 line of FPGAs. It has been awhile since the last major Spartan released, the Spartan3, but this last year Xilinx released the Spartan6. The Xilinx Spartan family is the low cost FPGAs compared to the higher cost and high performance Virtex family. The Spartan family is derived from the Virtex architecture with some changes to reduce the cost. The Spartan3 FPGAs were derived from the Virtex-II architecture. Since the Spartan3... ## Homebrew CPUs: Messing around with a J1 May 29, 2015 In this article I will examine James Bowman's excellent J1 CPU; I will then proceed to mess around with various parts of it, making it smaller, more appropriate to my particular application, and possibly faster. I hope this will show you how easy it is to fiddle around with homemade CPUs and encourage you to make something weird and wonderful. J1 CPU My hat is off to James Bowman. J1 is pretty cool. It is a stack machine; it executes instructions in one cycle, it is... ## How to start in FPGA development? - Some tips August 30, 20123 comments Introduction The aim of this tutorial is to show some useful tips for people like me that one day started from zero to work with FPGA's. Why FPGA's? Because they are easy to use and they are not too expensive, and they are usually used in lab courses to let students "play" with them. 1: How to choose the right FPGA? As you may know there are a lot of different FPGA's, brands and models. How to choose the right one? It's very difficult to say that before knowing which will be the... ## Discrete-Time PLLs, Part 1: Basics December 1, 20159 comments Design Files: Part1.slx Hi everyone, In this series of tutorials on discrete-time PLLs we will be focusing on Phase-Locked Loops that can be implemented in discrete-time signal proessors such as FPGAs, DSPs and of course, MATLAB. In the first part of the series, we will be reviewing the basics of continuous-time baseband PLLs and we will see some useful mathematics that will give us insight into the inners working of PLLs. In the second part, we will focus on... ## Shared-multiplier polyphase FIR filter July 31, 20135 comments Keywords: FPGA, interpolating decimating FIR filter, sample rate conversion, shared multiplexed pipelined multiplier Discussion, working code (parametrized Verilog) and Matlab reference design for a FIR polyphase resampler with arbitrary interpolation and decimation ratio, mapped to one multiplier and RAM. Introduction A polyphase filter can be as straightforward as multirate DSP ever gets, if it doesn't turn into a semi-deterministic, three-legged little dance between input, output and... ## StrangeCPU #4. Microcode May 13, 20137 comments Summary: Sliding windows containing runs of microcode. Table of Contents: ## Half-band filter on Xilinx FPGA November 30, 20105 comments 1. DSP48 Slice in Xilinx FPGA There are many DSP48 Slices in most Xilinx® FPGAs, one DSP48 slice in Spartan6® FPGA is shown in Figure 1, the structure may different depending on the device, but broadly similar. Figure 1: A whole DSP48A1 Slice in Spartan6 (www.xilinx.com) 2. Symmetric Systolic Half-band FIR Figure 2: Symmetric Systolic Half-band FIR Filter 3. Two-channel Symmetric Systolic Half-band FIR Figure 3: 2-Channel... ## Go Big or Go Home - Generating$500,000 for Contributors

In a Nutshell
• A new Vendors Directory has been created
• Vendors will be invited to pay a sponsorship fee to be listed in the directory
• 100% of the basic sponsorship fee will be distributed to the *Related Sites community through a novel reward system
• The goal is for the directory to eventually generate - drum roll please -  \$500,000 on a yearly basis for contributing members on the *Related Sites
• Members will choose how the reward money gets distributed between...