• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Understanding FPGAs

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,722
Likes
241,599
Location
Seattle Area
Understanding FPGAs

FPGAs have become part of the parlance of DAC technology so I thought I write this article to explain what they are.

Before we understand FPGAs we need to first learn a bit about digital circuits. Digital circuits used to be designed using discrete tubes and then transistors. Later, Integrated Circuit (ICs) were invented that could contain blocks of transistors and other components. This led to creation of specific ICs that performed digital logic operation. There were too types of these, TTL and CMOS but both accomplished the same thing. They provided basic logic circuits such as AND, OR, Counters, etc. Much more complicated digital circuits could now be designed by using ICs. Less space was taken and designs simplified.

IC revolution also gave birth to Microprocessors which power so much of our life today from computers to smartphones. This provided another path to get digital work done. Instead of designing fixed function circuits, a computer is a general purpose machine where the program written for it performs the function. To add numbers, you tell the microprocessor to do that for you. By changing the program, you change the operation of a digital computer. That flexibility came with a price: much slower speed. Today’s microprocessors are incredibly fast so that is not as much of an issue for many problems but all else being equal, a circuit designed using logic building block will be faster and more efficient.

Another way to skin the cat was through what is called an ASIC which is short for Application Specific Integrated Circuit. An ASIC is a (larger) cluster or digital circuits customized for a specific function. Being a custom implementation, an ASIC can be incredibly fast, and power efficient. And on a per unit basis, can be cheaper than other solutions. On the negative side, ASICs are very difficult to design and require high-up front expense. Non-recurring Engineering (NRE) fee may run into a million dollars. Worse yet, if you make a mistake, you may have to pay some of that again to “spin” the ASIC and make a new revision that works. For these reasons ASICs are justified for very high volume products where the NRE and engineering costs can be amortized over that volume and performance advantages realized.

All of this gets us to FPGAs. What if we could have the programmability of microprocessors, yet speed of ASICs? That is more or less what we have in FPGA or Field Programmable Gate Arrays. An FPGA is designed somewhat like an ASIC but unlike an ASIC, it can be erased and reprogrammed. Making a mistake now is no big deal. Simply change the design and re-download into the FGPA. Indeed, the typical design for a system with an FPGA is to store its program in flash memory and upon powering up the device, the program is pushed into the FPGA. This allows “software” updates of FPGA.

Note that FPGAs are still complex to design. Not as bad as ASIC but still, far more difficult than writing a computer program. They also require specialized tools to program. As such, they are outside of DIY skills. It requires a proper digital designer to program one.

Leading suppliers of FPGAs by far are Altera and Xilinx. So any time you see those names on a part on a circuit board, you know right away that there is an FPGA there.
images
images


Here is an example of the Intona USB isolator. The Xilinx FPGAs are clearly visible.

attachment.php


Traditionally FPGAs were smaller and much slower than ASICs. Today if you have the money, you can buy very large FPGAs but each may cost you $1,000 or more. If you are building high-end products, this can be justified. In exchange for the dollars spent, you get to have full custom solution. You want to add 48 bit numbers? You can do that in an FPGA. Same operation in a computer program would require you to either operate in 32 or 64 bits. FPGAs therefore allow more efficient implementation of a logic circuit but at much higher cost of development.

Realizing some of the drawbacks of FGPAs, the vendors now provide them with embedded (ARM) CPUs and memory. Those components allow you to mix both technologies. Use the CPU for non-math-intensive operation such as control (i.e. what to do) and use the rest of the FPGA for fast and efficient customization.

On the other hand, computers bring so much computing power to us that one can use them in a wasteful manner and still perform the job. Better yet, they have huge amount of high-performance memory which FPGAs by themselves don’t have. Hence the recent development of software upsampling logics such as HQPlayer. If you are OK with maintaining a computer instead of buying a dedicated piece of hardware with FPGA that “just works,” then provide a reasonable alternative.
 
Last edited:

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
Understanding FPGAs

FPGAs have become part of the parlance of DAC technology so I thought I write this article to explain what they are.

Before we understand FPGAs we need to first learn a bit about digital circuits. Digital circuits used to be designed using discrete tubes and then transistors. Later, Integrated Circuit (ICs) were invented that could contain blocks of transistors and other components. This led to creation of specific ICs that performed digital logic operation. There were too types of these, TTL and CMOS but both accomplished the same thing. They provided basic logic circuits such as AND, OR, Counters, etc. Much more complicated digital circuits could now be designed by using ICs. Less space was taken and designs simplified.

IC revolution also gave birth to Microprocessors which power so much of our life today from computers to smartphones. This provided another path to get digital work done. Instead of designing fixed function circuits, a computer is a general purpose machine where the program written for it performs the function. To add numbers, you tell the microprocessor to do that for you. By changing the program, you change the operation of a digital computer. That flexibility came with a price: much slower speed. Today’s microprocessors are incredibly fast so that is not as much of an issue for many problems but all else being equal, a circuit designed using logic building block will be faster and more efficient.

Another way to skin the cat was through what is called an ASIC which is short for Application Specific Integrated Circuit. An ASIC is a (larger) cluster or digital circuits customized for a specific function. Being a custom implementation, an ASIC can be incredibly fast, and power efficient. And on a per unit basis, can be cheaper than other solutions. On the negative side, ASICs are very difficult to design and require high-up front expense. Non-recurring Engineering (NRE) fee may run into a million dollars. Worse yet, if you make a mistake, you may have to pay some of that again to “spin” the ASIC and make a new revision that works. For these reasons ASICs are justified for very high volume products where the NRE and engineering costs can be amortized over that volume and performance advantages realized.

All of this gets us to FPGAs. What if we could have the programmability of microprocessors, yet speed of ASICs? That is more or less what we have in FPGA or Field Programmable Gate Arrays. An FPGA is designed somewhat like an ASIC but unlike an ASIC, it can be erased and reprogrammed. Making a mistake now is no big deal. Simply change the design and re-download into the FGPA. Indeed, the typical design for a system with an FPGA is to store its program in flash memory and upon powering up the device, the program is pushed into the FPGA. This allows “software” updates of FPGA.

Note that FPGAs are still complex to design. Not as bad as ASIC but still, far more difficult than writing a computer program. They also require specialized tools to program. As such, they are outside of DIY skills. It requires a proper digital designer to program one.

Leading suppliers of FPGAs by far are Altera and Xilinx. So any time you see those names on a part on a circuit board, you know right away that there is an FPGA there.
images
images


Here is an example of the Intona USB isolator. The Xilinx FPGAs are clearly visible.

attachment.php


Traditionally FPGAs were smaller and much slower than ASICs. Today if you have the money, you can buy very large FPGAs but each may cost you $1,000 or more. If you are building high-end products, this can be justified. In exchange for the dollars spent, you get to have full custom solution. You want to add 48 bit numbers? You can do that in an FPGA. Same operation in a computer program would require you to either operate in 32 or 64 bits. FPGAs therefore allow more efficient implementation of a logic circuit but at much higher cost of development.

Realizing some of the drawbacks of FGPAs, the vendors now provide them with embedded (ARM) CPUs and memory. Those components allow you to mix both technologies. Use the CPU for non-math-intensive operation such as control (i.e. what to do) and use the rest of the FPGA for fast and efficient customization.

On the other hand, computers bring so much computing power to us that one can use them in a wasteful manner and still perform the job. Better yet, they have huge amount of high-performance memory which FPGAs by themselves don’t have. Hence the recent development of software upsampling logics such as HQPlayer. If you are OK with maintaining a computer instead of buying a dedicated piece of hardware with FPGA that “just works,” then provide a reasonable alternative.

When I asked Dustin Foreman of ESS about ASIC's vs FPGA's, he said ASIC's are still much superior to using FPGA's. For example, if you programmed the exact same functionality of the new ESS 9038 DAC chip into an FPGA, it wouldn't be near as good. However, with ASIC's, you are limited to what can be done for customization, and updates. As most of the functionality is hard coded into the silicon.
 
Last edited:
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,722
Likes
241,599
Location
Seattle Area
For sure. ASICs are much faster and more efficient especially if you use advanced processes. The cost though literally, is much higher design costs and NRE as I mentioned. And there cannot be any updates (aside from any embedded microprocessors on them). Mistakes take months to remedy to design and re-spin the chip.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
For sure. ASICs are much faster and more efficient especially if you use advanced processes. The cost though literally, is much higher design costs and NRE as I mentioned. And there cannot be any updates (aside from any embedded microprocessors on them). Mistakes take months to remedy to design and re-spin the chip.

Yes Dustin told me each ESS Sabre chip run costs $250000. And they have no idea how they will even sound until they get it built, have it sent to them, and solder it onto a board. He said when they first got the 9038 pro back, and for the first time listened to the work that took them years to accomplish, they were all astonished how much better it was than the 9018S. They had no idea how much better sound could get. But it had to get redone a few times to work all the bugs out.
 
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,722
Likes
241,599
Location
Seattle Area
ASIC design is one of the reasons I dislike managing hardware projects. You have so little control. We had this project that did real-time 3-d video effects. We went through three spins of the darn thing and each cost $250K in NRE and countless lost months of sale.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
ASIC design is one of the reasons I dislike managing hardware projects. You have so little control. We had this project that did real-time 3-d video effects. We went through three spins of the darn thing and each cost $250K in NRE and countless lost months of sale.

Yeah Interval Zero's (creators of Windows embedded) approach to efficiently utilizing the extra cores of a general purpose Intel multicore processor is one of the biggest and most exciting breakthrough's I've seen in recent history. Jussi uses the same type of system with his "pipeline SDM" feature in Hqplayer.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna

Phison Audio - Sonny

Industry Expert
Technical Expert
Joined
Mar 6, 2016
Messages
103
Likes
15
One thing you forget when disliking the FPGA is that cpu interrupt handling is very slow and very much depending on the compiler and the actual source code and or optimation. In this case the FPGA and asic wins.
It is easier to lock building blocks to run independently from another block.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
One thing you forget when disliking the FPGA is that cpu interrupt handling is very slow and very much depending on the compiler and the actual source code and or optimation. In this case the FPGA and asic wins.
It is easier to lock building blocks to run independently from another block.

It all depends on the application. For audio related DSP, this approach is much better:

http://audiosciencereview.com/forum...t-gen-cutting-edge-digital-audio-systems.254/
 
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,722
Likes
241,599
Location
Seattle Area
One thing you forget when disliking the FPGA is that cpu interrupt handling is very slow and very much depending on the compiler and the actual source code and or optimation. In this case the FPGA and asic wins.
It is easier to lock building blocks to run independently from another block.
This is true although audio has such relaxed interrupt response requirement if you have some buffering in the DAC/target device that this is not a practical problem for playing music.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
This is true although audio has such relaxed interrupt response requirement if you have some buffering in the DAC/target device that this is not a practical problem for playing music.

But it is for realtime applications like in the case of Merging. Since they are sending audio feeds from up to 100's of channels simultaneously, and at the same time outputting to 100's of channels simultaneously, all with perfect clock sync, the latency is extremely important. Using Interval Zero's RTX system, there's only 1.33 ms of round trip latency from input to output device! And that's using a general purpose Windows based PC!
 
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,722
Likes
241,599
Location
Seattle Area
It doesn't matter how many channels there. If you put in sufficient amount of memory and be OK with the latency (an issue for recording), then life is good.

Imagine having 1 second worth of memory in the DAC. You pump that full and then you have a full second to get back to it with the next chunk. Assuming the link to it is faster than real time, then you can fill the buffer faster than real-time so the delay won't be a full second.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
It doesn't matter how many channels there. If you put in sufficient amount of memory and be OK with the latency (an issue for recording), then life is good.

Imagine having 1 second worth of memory in the DAC. You pump that full and then you have a full second to get back to it with the next chunk. Assuming the link to it is faster than real time, then you can fill the buffer faster than real-time so the delay won't be a full second.

Modern DAC's by design have latency built in for their digital interface async jitter reduction. Merging also uses async with their Ravenna protocol, however the master clock of the DAC can be assigned to the role of "grandmaster". This way it ensures all of the rest of the gear on the network is in perfect clock sync within 1 nanosecond.

Anything that has to run through the Masscore DSP engine, can be subject to up to 1.33ms of latency. That is complete system from microphone/DSP/ADC/DAC/amplifier/speaker. In other words it's pretty much realtime just like if a mic was connected direct to an analog mic preamp, amp and speaker. This is less latency than even a purpose built Sharc realtime DSP chip, and it's running on a general purpose PC running Windows!
 
Last edited:

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,250
Likes
17,201
Location
Riverview FL
This way it ensures all of the rest of the gear on the network is in perfect clock sync within 1 nanosecond.

If the network cables aren't more than a foot or so long.
 

Opus111

Addicted to Fun and Learning
Joined
Mar 2, 2016
Messages
666
Likes
38
Location
Zhejiang
Cables tend to have lower propagation speeds than vacuum so perhaps more like 20cm? :p
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna
If the network cables aren't more than a foot or so long.

Network cables can be 10000 miles long with the same results. This is where fiber comes in handy :)
 

Opus111

Addicted to Fun and Learning
Joined
Mar 2, 2016
Messages
666
Likes
38
Location
Zhejiang
So long as latency isn't one of the results that matters, yep.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,250
Likes
17,201
Location
Riverview FL
A nanosecond is a light-foot.

10 feet = (roughly) 10 nanosecond latency.
 

Mivera

Major Contributor
Joined
Mar 4, 2016
Messages
2,322
Likes
97
Location
West Kelowna

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
635
Likes
379
Hi,

Surprised, this thread hasn't more comments.

Especially since it is now 4 years old. Does it mean that no one is interested in those FGPA products ?

As far as I can see, it seems that FPGA can be used alongside a DAC chip like AKM or ESS or can be used as standalone solutions with no "DAC chips"..

Am I wrong assuming that the price or mastering the FPGA "concept" has lowered ?

Are there any drawbacks today in getting a FPGA based converter ? I mean : are the changes to get a poorly designed/engineered device higher than to get a porrly designed/engineered DAC ?

Please : do not reply saying "You can get a cheap DAC so grab one of those". I want something looking as I see fit... No too pricey, but not the cheapest. I am ready to go for that up-price but do not want to do anything wrong.

Regards.
 
Top Bottom