14

I understand the difference between the two architectures is the separation of instructions from data in the Harvard architecture. But how do I know which type of system I'm on? Is it possible to write a program such that the program determines whether the system is von Neumann or Harvard? Could there be another architecture or are these architectures the only ones known?

Niklas Rosencrantz
  • 8,008
  • 17
  • 56
  • 95
  • 3
    [Modern Uses of Harvard Architecture](http://en.wikipedia.org/wiki/Harvard_architecture#Modern_uses_of_the_Harvard_architecture). Everything else in typical use is Von Neumann. – Robert Harvey Dec 06 '12 at 00:30
  • 1
    While modern systems aren't strictly von-Neumann either . thinking about GPUs and all those other things :) – johannes Dec 06 '12 at 01:01
  • 1
    There are other architecture types. [Dataflow architecture](http://en.wikipedia.org/wiki/Dataflow) is my favorite. But you are unlikely to see it out in the wild. – Martin York Dec 12 '12 at 01:52
  • 1
    Unless you are doing something really really low level I am not sure why you would need to know the difference (are you writing self modifying code?). Even though most modern machines are von-Neumann the OS usually marks code pages differently from data pages to prevent accidental (malicious) modifications to the code. – Martin York Dec 12 '12 at 01:56

5 Answers5

13

Your computer is a von Neumann machine. All general purpose computers are. The only exceptions are specialized co-processors like GPUs. It's not that you can't have a Harvard machine (or any other architecture). It's just that nobody builds them, especially not for sale (modulo co-processors, of course).

Robert Harvey
  • 198,589
  • 55
  • 464
  • 673
Ross Patterson
  • 10,277
  • 34
  • 43
  • 3
    This surely depends on the definition. If you replace the rather obsolete dichotomy by [a trichotomy](http://en.wikipedia.org/wiki/Modified_Harvard_architecture#Comparisons), most current general purpose computers are Modified Harvard Architecture. – maaartinus Dec 20 '12 at 06:33
  • 3
    Many embedded microcontrollers use Harvard architectures. They generally run code from some kind or ROM or flash memory, and little would be gained by using a common bus for code and data. – supercat Dec 24 '13 at 23:46
7

Most current general purpose CPUs use Modified Harvard Architecture. The CPU cores can access program and data independently in their separate L1 caches. At the outside, there are no separate program and data memories (nor the other cache levels are separated).

Could there be another architecture or are these architectures the only ones known?

All the other architectures are rather restricted in their use. Because of the extreme complexity and costs associated with processor development, I don't think anybody would try it seriously again.

However, while modern CPUs are basically von Neumann, they incorporate a lot of ideas like Dataflow Architecture internally.

maaartinus
  • 2,633
  • 1
  • 21
  • 29
4

Both Von Neumann and Harvard architectures belong to the Control flow paradigm.

There is another paradigm, which is Data flow.

A common example of dataflow computing, though implemented on control flow computers, is the spreadsheet (from Visicalc and Multiplan to Excel).

Neural networks also belong to this category.

FPGA are another example of dataflow architecture. They are programmed with hardware description languages such as VHDL.

mouviciel
  • 15,473
  • 1
  • 37
  • 64
3

Harvard Architecture is typically only used in embedded microprocessors where the program is stored in on-board eeprom memory. The only one you are likely to see is an Atmel AVR as used in the Arduino

Martin Beckett
  • 15,776
  • 3
  • 42
  • 69
1

When you program it: Modify a memory region and then jump there and execute it.

If it is Havard you can not do it.

User
  • 795
  • 4
  • 9