1

I know FPGA/ASIC are for a specific task and they are not microprocessors and an OS is needed mainly if multiple processes (tasks) need to be run concurrently.

Just wondering if an FPGA/ASIC can have an operating system. Is there any real time need which may require this?

JRE
  • 67,678
  • 8
  • 104
  • 179
Franc
  • 93
  • 8
  • 3
    You can design a processor in FPGA/ASIC and run OS on it. Because OS is just a system software or simply high-level set of instructions which have to be executed by a processor. For eg: Designing a RISC-V processor on RTL and running FreeRTOS on it is quite popular these days. – Mitu Raj Mar 24 '21 at 13:40
  • Operating systems are very common on higher end ASICs. – user1850479 Mar 24 '21 at 14:49
  • 1
    You might even call a typical CPU an ASIC, so... yes? – Richard the Spacecat Mar 24 '21 at 15:00
  • An FPGA precisely doesn't require an OS to run multiple things concurrently. – DamienD Apr 05 '22 at 13:48
  • Possibly relevant reading of an OS implemented *as* FPGA resources (at research-grade, not sure if commercialized): https://eprint.iacr.org/2016/550.pdf – nanofarad Apr 05 '22 at 13:59

4 Answers4

7

Well, you can use without doubt an FPGA without software, in fact many are used to support booting more complex systems (power sequencing, for example). But you can also define some kind of embedded soft processor needing an OS.

On the other hand no CPU really requires an operating system, you could probably program a Cortex-A (for example) bare to the metal. The operating system/user software is only a useful distinction in responsabilities.

There are also ASIC which are single task but are however microcoded with some mask defined program to do their job (some USB bridge comes to mind).

In short anything can go

As for the real time issue: there's nothing more real time than a state machine on the FPGA fabric (except maybe a real ASIC), every kind software is slower (since it's by definition interpreted and run on a state machine in the FPGA fabric)

Lorenzo Marcantonio
  • 8,231
  • 7
  • 28
6

You can put a soft processor into the FPGA logic, and there are a lot of FPGA parts with integrated hard processors, these processors are running software, so can and in a lot of cases do run an OS.

The FPGA itself though is a bunch of logic, it's not 'running code' so the idea of an OS doesn't make sense.

Colin
  • 4,499
  • 2
  • 19
  • 33
0

FPGA is not running any software so it cannot have an OS.

FPGA is a programmable array of logic gates. The gate connections are programmable.

All the logic already runs concurrently.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • It would have to be really large and constructed as one with an RTOS which is inefficient – Tony Stewart EE75 Mar 24 '21 at 11:48
  • 4
    Your answer gives an impression that we cannot find an operating system on FPGAs. When a microprocessor core is implemented on FPGA, you know that it can has an embedded OS. – Paul Ghobril Mar 24 '21 at 12:05
  • 3
    @PaulGhobril Yes of course you can implement a logical CPU that runs an OS with hardware like FPGA or soldering NAND gates together. But it's the FPGA that implements the CPU logic and it's the CPU logic that executes software code and thus OS code is for the emulated CPU, not for the FPGA. – Justme Mar 24 '21 at 12:14
  • 1
    Sorry, but if you configure an FPGA to behave logically like a CPU, it IS a CPU. The logical behavior of the FPGA is indistinguishable from the behavior of a dedicated CPU. Distinguishing between "the emulated CPU' and "the FPGA" makes no sense. If the FPGA is not providing the behavior, what is? The "emulated CPU"? That has no physical existence - there is only the FPGA. – WhatRoughBeast Apr 05 '22 at 17:58
-1

ASIC by definition would require an OS to include a uC is “Application Specific”. I have been part of a team that designed one with a 6805 in the late ‘90’s with a proprietary RTOS.

FPGA’s are the “glue logic” and often very complex logic.

That means by the context of the leading question, it would be correct to say it would NEED a uC and some RTOS to validate your assumption in the question, but it presumes you have both an embedded uC and RTOS to reside in an ASIC and ASICs generally have neither. When in doubt, check your assumptions.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182
  • 1
    . It would need a uC to have an OS, yet having a uC never presumes you have an OS. I hope that restores your faith in my answers. " You also said FPGAs are glue logic, which is also completely incorrect. said @user253751 and that depends on your assumption of topology , completely? Spartan users don't be so sensitive – Tony Stewart EE75 Mar 24 '21 at 14:40