3

I was under the impression that the Raspberry Pi's ARM processor, although having an armhf microarchitecture, still followed the Von Neumann architecture (principally sharing main memory for instructions and data).

However I came across this single line in a Computer Science textbook (A Level Computer Science for AQA Unit 2, Kevin R Bond 2016, pg265)

The Raspberry Pi computer is based on the Harvard architecture

Having searched online, I can't find any solid sources that either prove or disprove this statement. Is this in error? I would appreciate a source given in an answer.

(I'm aware the Raspberry Pi SE exists, but given the fact that the tag does not exist there, I thought it more appropriate to post it here)

Luke Moll
  • 428
  • 6
  • 18
  • 1
    I would call this off topic for stack overflow as it isnt regarding a programming issue. – Takarii Jan 27 '17 at 09:42
  • 1
    @Takarii which Stack Exchange would you suggest then? `cpu-architecture` has a large following, while Raspberry Pi SE has zero questions containing _Harvard_ or _Von Neumann_ – Luke Moll Jan 27 '17 at 09:46
  • 1
    @Takarii I'll clarify the wording, but can you find a source for either of those statements? It would seem rare for a linux computer to run Harvard, as that's usually the domain of Arduinos and co-processors – Luke Moll Jan 27 '17 at 09:51
  • Keep in mind, that while alot of Pi distro's are linux based, not all of them are. Ultimately they are based on the RISC microinstruction set. For example, windows 10 IoT and RISC OS Pi aren't linux distros, but will run perfectly fine on a pi – Takarii Jan 27 '17 at 10:00
  • @Takarii what I don't understand is how Raspbian, which (I had understood to be) essentially a Debian recompile, can run on such a fundamentally different system. In something as complex as a desktop operating system, where is the separation between instructions and data? Does the Pi SoC share _RAM_ but not buses? – Luke Moll Jan 27 '17 at 10:03
  • Debian, like other typical OS's are based on the CISC microinstruction set. Rasbian uses RISC. As to how it does what you ask im unsure, but my best guess would be in the way that CISC does things differently to RISC. – Takarii Jan 27 '17 at 10:08
  • Note - These comments are now diverging from your original question, the answer to which has been posted below. You should post your question regarding how it does what it does on the Raspberry Pi SO - You should find your answer more easily there. – Takarii Jan 27 '17 at 10:10

2 Answers2

2

It's not specifically the pi that uses the architecture, but the processor it has.

The original raspberry pi uses an ARM 11 chip (Later versions migrated to the CORTEX-A chips), and ARM transfered from Von Neumann architecture to Harvard with the ARM9 chip

https://en.wikipedia.org/wiki/ARM9

Additionally, this is from ARM's product page

https://www.arm.com/products/processors/classic/arm9/index.php

Note, It is assumed that as nothing has been mentioned about there being any changes to the architecture, the CORTEX-A cores also maintain this too

Takarii
  • 1,612
  • 2
  • 18
  • 29
2

Even though the internal architecture of the CPU might be harvard-like, with separate instruction and data caches and buses, the rest of the SoC still only has got one main memory, and both instruction and data buses connect to the same memory. From https://en.wikipedia.org/wiki/ARM9:

With this design generation, ARM moved from a von Neumann architecture (Princeton architecture) to a Harvard architecture with separate instruction and data buses (and caches), significantly increasing its potential speed. Most silicon chips integrating these cores will package them as modified Harvard architecture chips, combining the two address buses on the other side of separated CPU caches and tightly coupled memories.

From the linked page about modified Harvard architecture:

Most modern computers instead implement a modified Harvard architecture.

The most common modification builds a memory hierarchy with a CPU cache separating instructions and data. This unifies all except small portions of the data and instruction address spaces, providing the von Neumann model. Most programmers never need to be aware of the fact that the processor core implements a (modified) Harvard architecture, although they benefit from its speed advantages. Only programmers who write instructions into data memory need to be aware of issues such as cache coherency.

The same also goes for any modern x86 chip.

This doesn't pose any issue for Raspbian, which is just a special recompile of normal Debian for Raspberry Pis; the main difference in raspbian is that it has got a different arm target (armv6+vfp hardfloat) than the other existing arm debian distributions (which target either armv4t or armv7+vfp hardfloat).

Community
  • 1
  • 1
mstorsjo
  • 12,983
  • 2
  • 39
  • 62