1
perms otype base length perms otype perms otype base perms otype base length c0: c1: c31: cpc: base length Robert Norton and Simon Moore Exploring the Hardware-Software Interface using an FPGA-based Research Platform [email protected] [email protected] Computer Architecture Group http://www.cl.cam.ac.uk/research/comparch/ Computer Laboratory Motivation Research into computer architectures is inhibited by the prohibitive cost of making custom hardware and the inadequacies of simulation. Meanwhile, commercial architectures are required to maintain backwards compatibility due to network economics. Therefore computers architectures evolve only very slowly and systems programmers tend to view them as static, meaning that opportunities for interface improvements go unexplored. What is needed is a platform to allow simultaneous evolution of hardware and software, providing a complete OS stack on readily available and affordable, customisable hardware. Research Platform BERI (BlueSpec Extensible RISC Imple-mentation) is a 64-bit MIPS-compatible soft processor written in BlueSpec Verilog. It is being developed as part of the CTSRD project. We have synthesised this for Altera's DE4 FPGA development board and successfully ported FreeBSD to it (Figure 1). This provides a complete platform for joint OS and hardware research. We intend to use this platform to challenge current assumptions about the hardware-software interface, demonstrating new archi-tectural features and how they can improve the security and efficiency of the system. For example: Research Area 1 - Fine Grained Memory Protection CHERI (Capability Hardware Enhanced RISC Imple- mentation) is a version of BERI with added support for hardware 'capabilities'. These provide a mechanism for fine grained memory protection and an efficient model for privilege escalation, without incurring the costs associated with repeated address space switching when using a traditional TLB for protection. Figure 2 shows the structure of the capability registers, including the 'otype' field which can be used for secure object invocation. Research Area 2 - Multi-Thread/Multi-Core processsor with Efficient Inter-Thread Communications One common approach to exposing more hardware parallelism is multi-threading. By replicating the register file multiple threads of execution can run simultaneously, sharing the hardware resources (Figure 3). The advantage of this is that interleaving instructions from different threads can mask unavoidable delays in single-threaded code, such as load latencies. I have extended BERI to support eight hardware threads which, in addition to providing the performance advantages of multi-threading, can alt- ernatively be used to emulate 8 single threaded processors running at one eighth of the speed. I intend to use this version of the processor to investigate new inter-core communication mechanisms such as asychronous remote stores, as proposed by Meredydd Luff (Figure 4). I hypothesise that I will be able to demonstrate considerable performance advantages for a parallel language runtime using these new features. PhD sponsored by: MESI: Note stalls in red Asynchronous Remote Store Thread0 (writing) Shared Bus Thread1 (polling) async. remote store S S M readX read data I I write poll (hit) poll (hit) poll (miss) Thread0 (writing) Shared Bus Thread1 (polling) read readX data data S I M S S read write I I poll (miss) poll (miss) Capability Registers General Purpose Registers r0 == zero r1 r31 pc Figure 2: CHERI Registers Thread0: pc Thread1: pc Thread7: pc r1 r1 r1 r31 r31 r31 Instruction Fetch Decode Execute Memory Access Write Back Thread Schedule Figure 3: Multi-threaded BERI Pipeline Figure 4: Writing shared flag with MESI cache coherence vs. MESI + asynchronous remote store Figure 1: FreeBSD running on BERI on DE4 board length Approved for public release. The BERI/CHERI research platform is sponsored by the Defense Advanced Research Projects Agency (DARPA) and the Air Force Research Laboratory (AFRL), under contract FA8750-10-C-0237. The views, opinions, and/or findings contained in this article/presentation are those of the author/presenter and should not be interpreted as representing the official views or policies, either expressed or implied, of the Defense Advanced Research Projects Agency or the Department of Defense.

Exploring the Hardware-Software Interface using an FPGA-based … · 2018-01-04 · perms otype base length perms otype perms otype base perms otype base length c0: c1: c31: cpc:

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Exploring the Hardware-Software Interface using an FPGA-based … · 2018-01-04 · perms otype base length perms otype perms otype base perms otype base length c0: c1: c31: cpc:

perms otype base length

perms otype

perms otype base

perms otype base length

c0:

c1:

c31:

cpc: base length

Robert Norton and Simon Moore

Exploring the Hardware-Software Interface using an FPGA-based Research Platform

[email protected] [email protected] Computer Architecture Grouphttp://www.cl.cam.ac.uk/research/comparch/

Computer Laboratory

Motivation Research into computer architectures is inhibited by the prohibitive cost of making custom hardware and the inadequacies of simulation. Meanwhile, commercial architectures are required to maintain backwards compatibility due to network economics. Therefore computers architectures evolve only very slowly and systems programmers tend to view them as static, meaning that opportunities for interface improvements go unexplored. What is needed is a platform to allow simultaneous evolution of hardware and software, providing a complete OS stack on readily available and affordable, customisable hardware.

Research PlatformBERI (BlueSpec Extensible RISC Imple-mentation) is a 64-bit MIPS-compatible soft processor written in BlueSpec Verilog. It is being developed as part of the CTSRD project. We have synthesised this for Altera's DE4 FPGA development board and successfully ported FreeBSD to it (Figure 1). This provides a complete platform for joint OS and hardware research. We intend to use this platform to challenge current assumptions about the hardware-software interface, demonstrating new archi-tectural features and how they can improve the security and efficiency of the system. For example:

Research Area 1 - Fine Grained Memory ProtectionCHERI (Capability Hardware Enhanced RISC Imple-mentation) is a version of BERI with added support for hardware 'capabilities'. These provide a mechanism for fine grained memory protection and an efficient model for privilege escalation, without incurring the costs associated with repeated address space switching when using a traditional TLB for protection. Figure 2 shows the structure of the capability registers, including the 'otype' field which can be used for secure object invocation.

Research Area 2 - Multi-Thread/Multi-Core processsor with Efficient Inter-Thread CommunicationsOne common approach to exposing more hardware parallelism is multi-threading. By replicating the register file multiple threads of execution can run simultaneously, sharing the hardware resources (Figure 3). The advantage of this is that interleaving instructions from different threads can mask unavoidable delays in single-threaded code, such as load latencies. I have extended BERI to support eight hardware threads which, in addition to providing the performance advantages of multi-threading, can alt-ernatively be used to emulate 8 single threaded processors running at one eighth of the speed. I intend to use this version of the processor to investigate new inter-core communication mechanisms such as asychronous remote stores, as proposed by Meredydd Luff (Figure 4). I hypothesise that I will be able to demonstrate considerable performance advantages for a parallel language runtime using these new features.

PhD sponsored by:

MESI: Note stalls in red Asynchronous Remote Store

Thread0(writing)

SharedBus

Thread1(polling)

async. remote store

S

S

MreadX

read

data

I I

write

poll (hit)

poll (hit)

poll (miss)

Thread0(writing)

SharedBus

Thread1(polling)

read

readX

data

data

S

IM

S

Sreadwrite

II

poll (miss)

poll (miss)

Capability RegistersGeneral Purpose Registers

r0 == zero

r1

r31

pc

Figure 2: CHERI Registers

Thread0: pc

Thread1: pc

Thread7: pc

r1

r1

r1

r31

r31

r31

InstructionFetch

Decode ExecuteMemoryAccess

WriteBack

ThreadSchedule

Figure 3: Multi-threadedBERI Pipeline

Figure 4: Writing shared flag with MESI cachecoherence vs. MESI + asynchronous remote store

Figure 1: FreeBSD running on BERI on DE4 board

length

Approved for public release. The BERI/CHERI research platform is sponsored by the Defense Advanced Research Projects Agency (DARPA) and the Air Force Research Laboratory (AFRL), under contract FA8750-10-C-0237. The views, opinions, and/or findings contained in this article/presentation are those of the author/presenter and should not be interpreted as representing the official views or policies, either expressed or implied, of the Defense Advanced Research Projects Agency or the Department of Defense.