Skip to content
Sagar Karandikar edited this page Feb 21, 2014 · 3 revisions
  • Webworkers: The core of ANGEL runs in a separate thread - this lets us run instructions in a "real" loop as opposed to repeatedly calling setTimeout, while maintaining the ability to update the UI

  • 32-bit Program Counter: In general, although ANGEL simulates a 64 bit processor, we avoid working with 64 bit values as much as possible (due to the lack of native JS support). One such case is the PC - we use a 32 bit PC because the performance penalty is far too great when dealing with Longs (provided by Closure's Long.js). Since the simulated processor's physical memory is small anyways, we simply maintain a mapping table to "fill" in the bits for higher virtual addresses as necessary during address translation.

  • 32-bit Array-Based TLB: Although addresses are Long objects, doing translation this way would require a dictionary to build a TLB. Such an approach significantly diminishes the performance increase from implementing a TLB. Instead, the TLB only indexes on bits [31:13] of the VPN - this allows us to use an Array for our TLB instead.

Clone this wiki locally