Is the code on an FPGA firmware? - Page 1
Forum section: electronics / general

author: Pack34
author_rank: Frequent Contributor
timestamp: September 19, 2017, 12:33:20 pm
content: Is the correct vernacular for the code that goes on and FPGA to be called firmware?I've always felt that it was decidedly different enough to be referred to as "FPGA code" with the actual programming files referred to as "FPGA loads". In large part due to how differently these are programmed versus a microcontroller. Sequential line-by-line C versus a hardware description language that all exists at the same time.Am I off-base by making the distinction? What does everyone here refer to it as?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: September 19, 2017, 12:38:24 pm
content: I don't think there is a generally accepted term but firmware is definitely not itBitstream or configuration data are two terms that are used.

author: legacy
author_rank: Super Contributor
timestamp: September 19, 2017, 12:52:58 pm
content: Indeedfirmware -> { CPU, MPU, DSP }bitstream -> { CPLD, FPGA }

author: Jeroen3
author_rank: Super Contributor
timestamp: September 19, 2017, 01:13:06 pm
content: Quote from: mikeselectricstuff on September 19, 2017, 12:38:24 pmBut it's not like anyone here doesn't know what you're talking about with firmware for an fpga.The HDL is a different story, that's neither code nor *ware. But when talking about binaries for upgrades, firmware is stillcorrect enoughfor me.It's like those things where people keep shouting "there is no power/current on this socket!".

author: RoGeorge
author_rank: Super Contributor
timestamp: September 19, 2017, 01:23:47 pm
content: Nope, the "firmware" for FPGAs is called bitstream.

author: rstofer
author_rank: Super Contributor
timestamp: September 19, 2017, 02:17:06 pm
content: It's a bitstream when it is being pushed into the FPGA. But, a level up, it might be called firmware for an oscilloscope, for example. Or, the bitstream itself might be one aspect of a firmware package. It's not inconceivable to have an FPGA softcore defined by the bitstream and the executable written in C and called firmware both loaded from the platform flash.There are certainly examples of controllers using downloadable firmware that has nothing to do with FPGAs or bitstreams. Tape controllers, disk controllers and other items from the mainframe days.It's just too complicated... No wonder I can't keep up!

author: dgtl
author_rank: Regular Contributor
timestamp: September 19, 2017, 02:39:02 pm
content: For me, the "configuration" feels most appropriate. The chip is reconfigured in a specific way, thus configuration. The configuration is static, the chip just gets connected that way. The configuration gets streamed into the chip, so it can be called "configuration bitstream".Things get more messy if there are no clear boundaries anymore. Sometimes, the FPGA configuration bitstream is located inside a FW (FPGA gets bootstrapped by the application processor, for example uboot bootloader). Even if the FPGA configuration bitstream is in its own flash, the updates may come with the system FW update package. Sometimes its vice versa, there is a microcontroller or some other programmable statemachine embedded in the FPGA and the firmware image for that is loaded as the default value of a blockram, that resides in the bitstream.

author: paulcav
author_rank: Contributor
timestamp: September 19, 2017, 03:55:18 pm
content: Lets define the term:Firmware- In electronic systems and computing, firmware is a type of computer program that provides the low-level program control for the device's specific hardware. Firmware can either provide a standardized operating environment for the device's more complex software, or, for less complex devices, act as the device's complete operating system, performing all control, monitoring and data manipulation functions. Typical examples of devices containing firmware are embedded systems, consumer appliances, computers, computer peripherals, and others. Almost all electronic devices beyond the simplest contain some firmware.So you could think it would be better suited to call the coding of an FPGA 'Firmware' but the coding is not permanent unless the code is stored in external eeprom. It is more of programmable hardware hence the words in FPGA Field Programmable indicates that it is software controlled in some fashion of Gate Array or could be seen as hardware.When you look at PGAs they almost follow the path of ROMs, where PGAs in the beginning were received from the factory by the programmer to burn in the hardware configuration, a similar procedure for PROMs then EPROMs and later EEPROMs which later was called firmware as the code aka software would stay permanent when power is off.So is it called 'Firmware' for FPGAs, i think not as it is not permanent, however, PGAs once burned they are permanent.You could view FPGAs as something similar to RAM. The FPGA powers up and goes through a startup routine, loads up a configuration from a storage medium, rearranges the hardware according to its instructions and loses its setup when power is turned off or reset.So i think it lies in between Software, Firmware and Hardware maybe a collection of the three call it 'SoFiHa' a new term for FPGAs.

author: RoGeorge
author_rank: Super Contributor
timestamp: September 19, 2017, 04:42:08 pm
content: Sorry to disappoint here, but science is not compatible with democracy or voting.It doesn't matter which candidate is more appealing. Beauty contest or presidential election's rules does not apply here.Xilinx is calling itbitstream, not firmware, so you should call it the same.Altera, the same, it calls it beatstream.Lattice, calls it bitstream, too.Some people misinterpret the software updates as being "firmware", just because "firmware" is the only term they are familiar with, and starts to draw wrong conclusions about bitstreams being called firmware.[rant off, won't write here any more, call it JIL if you like, but it's not JIL, grrrrr!]

author: NorthGuy
author_rank: Super Contributor
timestamp: September 19, 2017, 09:17:58 pm
content: According to the dictionary:https://en.oxforddictionaries.com/definition/firmware"Permanent software programmed into a read-only memory".I'd say if you use your bitstream to configure FPGA through JTAG it is not firmware. But once you write it to PROM, your bitstream becomes firmware.

author: Cerebus
author_rank: Super Contributor
timestamp: September 19, 2017, 10:24:36 pm
content: Quote from: RoGeorge on September 19, 2017, 04:42:08 pmHow strange. You call a discussion about words "science" - it's not, it's semantics, or possibly etymology, but it's not science.Then you disavow any idea of "democracy or voting" but opt for an argument based, not on science, but on the majority agreeing ("voting") on the same term:QuoteAnywhere else that would get the "confused thinking of the week" prize - but around here that quality of logic is, sadly, oft-times par for the course.

author: nctnico
author_rank: Super Contributor
timestamp: September 19, 2017, 10:53:58 pm
content: It is code you compile so it is firmware. Calling it anything else just confuses management.

author: Pack34
author_rank: Frequent Contributor
timestamp: September 20, 2017, 01:28:54 am
content: Quote from: nctnico on September 19, 2017, 10:53:58 pmWhich was the purpose of this post. I wanted to be sure to make the distinction because they require substantially different amounts of effort and timelines. Management assumes everything is firmware.

author: ejeffrey
author_rank: Super Contributor
timestamp: September 20, 2017, 05:28:42 am
content: Quote from: RoGeorge on September 19, 2017, 04:42:08 pmThis is nomenclature / language / jargon, not science. There are no fundamental principles or laws of nature here, and these terms are of necessity somewhat fluid as the common technologies and usage change. Bitstream does seem to be the most accepted answer, but there is no need or reason to get so excited about it.

author: Jeroen3
author_rank: Super Contributor
timestamp: September 20, 2017, 08:28:00 am
content: Quote from: nctnico on September 19, 2017, 10:53:58 pmNo, you synthesize.But it will indeed confuse management and end-users.

author: paulcav
author_rank: Contributor
timestamp: September 20, 2017, 08:51:42 am
content: Quote from: Pack34 on September 20, 2017, 01:28:54 amIf money is related then it would be the highest cost with the longest time just to make sure there are no complications if the project is finished early and under budget then its a win.

author: daqq
author_rank: Super Contributor
timestamp: September 20, 2017, 08:53:09 am
content: QuoteThat is the default state of end users and management. There's no way to avoid it.

author: nctnico
author_rank: Super Contributor
timestamp: September 20, 2017, 09:21:52 am
content: Quote from: RoGeorge on September 19, 2017, 04:42:08 pmActually it is. When you look through history then you'll see the explaination which is carried by most is the accepted one. Even if it is wrong (in hindsight).

author: hans
author_rank: Super Contributor
timestamp: September 20, 2017, 09:22:07 am
content: The memory contents of a microcontroller and the bitstream send to a FPGA are both binary images, which could both be considered a form of firmware.I would certainly call it "firmware" from a system point of view. Bothering that a particular chip requires a bitstream instead of a set of processor instructions is too much implementation detail. If you're a systems designer (let alone manager, end user, etc.) all you should care about that the chip needs to be programmed with a binary image.

author: borjam
author_rank: Unknown
timestamp: September 20, 2017, 09:25:35 am
content: I don't think it's incorrect to call it "firmware". In fact, many firmware updates for lots of devices include both actual microprocessor code and FPGA bitstreams.Moreover, for complex FPGA configurations the line between actual code and electronics is somewhat blurry.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: September 20, 2017, 10:02:01 am
content: The optimal answer probably does depend on who's asking and why....

author: mac.6
author_rank: Regular Contributor
timestamp: September 20, 2017, 10:32:32 am
content: bitstream (or sometimes called bitfile) is what is going on the FPGA fabric (either ram or flash based)memory configuration file (mcs) is what is flashed in external flash used for power-on configuration for some FPGA.

author: legacy
author_rank: Super Contributor
timestamp: September 20, 2017, 10:59:52 am
content: Approval of software & electronic hardware parts: what should I load to the board?in Avionics there is implicationif you say (x)x="firmware", you will end dealing with thesoftware-quality guys, discussing onDO-178x="bitstream", you will end dealing with thehardware-quality guys, discussing onDO-254but if you say "firmware" referring to an fpga, or "bitstream" referring to PowerPC ... probably you will end dealing with the person who owns a "god certificate", owns your desk, and since you are supposed to be a "a person who provides expert advice professionally" then she (unfortunately she is a she) may want to verify that you are really qualified to do the job, thus ........ you will have a sort of inquisition in her office(it happened, I am not kidding)

author: Mr. Scram
author_rank: Super Contributor
timestamp: September 20, 2017, 02:01:12 pm
content: Quote from: RoGeorge on September 19, 2017, 04:42:08 pmThis has nothing to do with science. It's a simple matter of definitions, which is a shaky and arbitrary area at best. Although, as you say, when thee of the major manufacturers call something technical one thing, it helps clarity to call it the same.

author: MT
author_rank: Super Contributor
timestamp: September 20, 2017, 02:09:49 pm
content: Back in the 90'ies at R/D meetings our department boss always asked us if theconfigof our Xilinx was done and we replied thatbitstreamshad been sent. He was pleased.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: September 20, 2017, 02:55:38 pm
content: You write firmware. After it's been synthesized, you load the bitstream onto the FPGA. That's the syntax I use...the code itself is "firmware" or "HDL", the synthesized binary blob is the bitstream, though many people I work with still refer to that as the firmware, and nobody cares.

author: jnz
author_rank: Frequent Contributor
timestamp: September 20, 2017, 08:43:14 pm
content: I mean, I don't know the second thing about FPGA really, but it seems to me you're just defining a *configuration*.In terms of the real world firmware seems about a million times clearer to a normal person than bitstream.

author: ZaneKaminski
author_rank: Contributor
timestamp: September 21, 2017, 02:42:27 pm
content: Once it's on the FPGA, it is certainly not a bitstream. The bits all end up scattered around in different internal flipflops and SRAM blocks. There is no stream anymore. So it's a "configuration" now, not a bitstream. A bitstream is just that... a stream of bits. In this case, the bitstreamencodesthe FPGA configuration.Firmware is a more abstract concept. Firmware is the stuff you have to apply to the device or it doesn't work. I hesitate to provide a more specific definition, since more specificity would undermine the usefulness of the term. Firmware doesn't have to be a single bitstream, though it often is. It could be multiple, or it could refer to some other way to structure the data. Consider multiple files in a typical computer filesystem. These files could, together, represent the firmware, but they have tree-type relationship and aren't just a single stream (a tree of streams, of course).So if all a system needs to "work" (whatever that means) is an FPGA configuration bitstream, then it represents the entirety of the firmware. Otherwise there may be other files or bistreams or whatever you want to say, and those all together represent the firmware.Addendum: it's worth noting that the firmware doesn't have to be compiled, whereas a bitstream (like the software term, a "binary") always is compiled and ready to run or be applied to the device.

author: legacy
author_rank: Super Contributor
timestamp: September 21, 2017, 07:36:55 pm
content: mr.brilliant: hey?mr.sapiens: oh!mr.brilliant: pip?mr.sapiens: and dandy!mr.brilliant: yeah! let's upload the firmwaremr.sapiens: yeah cool!!!!!!!!5 sec later ... some neurons have a blastmr.sapiens: ehm ... what? into what? we have two CPUs and four fpgas on the boardmr.brilliant: ye-e-ah, I meant the file-something for the chip-somethingmr.sapiens: which one? the slave MPU? the ARM chip? do you mean loooooonnnniiiixxxxx?mr.brilliant:it!(pointing the finger in the direction of the chip)mr.sapiens: ah, that chip, that file!!! Alright!---The ape was a great big Hit!The first time it said "banana",pointing the finger in the directionof a banana on a banana tree.Nowadays problems with evolutionare greater still( kidding )