towards general purpose tagged memory
play

Towards General Purpose Tagged Memory Wei Song, Alex Bradbury, and - PowerPoint PPT Presentation

Towards General Purpose Tagged Memory Wei Song, Alex Bradbury, and Robert Mullins Computer Laboratory, University of Cambridge 2 nd RISC-V workshop, 30/06/2015 Code release and tutorial: http://www.lowrisc.org/docs/tutorial/ lowRISC Project


  1. Towards General Purpose Tagged Memory Wei Song, Alex Bradbury, and Robert Mullins Computer Laboratory, University of Cambridge 2 nd RISC-V workshop, 30/06/2015 Code release and tutorial: http://www.lowrisc.org/docs/tutorial/

  2. lowRISC Project • lowRISC – Open source SoC provider – 64-bit RISC-V ISA, Rocket core – Key features: tagged memory and “minion” cores • Tagged memory – Adding tag bits for each 64-bit word. – [Permission] Protection against control-flow hijacking – [Lock] Memory synchronization – [Type] Garbage collection – [Breakpoint] Debugging 2

  3. Rocket Chip Rocket Tile Rocket Tile Rocket Tile Rocket Rocket Rocket Core Core Core Rocket Tile: Rocket core, private I$ and D$ I$ D$ I$ D$ I$ D$ TileLink TileLink TileLink Crossbar between L1 and banked L2 TileLink TileLink TileLink L2 & L2 & L2 & Banked L2 (coherence manager) Coherence Coherence Coherence Manager Manager Manager Arbiter MemIO Single memory port, format converter Converter Memory Memory Controller 3

  4. Support Tagged Memory (1) Rocket Tile Rocket Tile Rocket Tile Augment each 64-bit word with tag bits Rocket Rocket Rocket Core Core Core 512 bit Word Word Word Word Word Word Word Word I$ D$ I$ D$ I$ D$ 528 bit Word Word Word Word Word Word Word Word tag tag tag tag tag tag tag tag TileLink TileLink TileLink TileLink TileLink TileLink Augmented cache line is transparent to L2 & L2 & L2 & coherence control. Coherence Coherence Coherence Manager Manager Manager Allocator Tag Cache Data Tracker & Array Tracker & Converter Converter MetaData Array Arbiter Memory 4 Controller

  5. Support Tagged Memory (1) Rocket Tile Rocket Tile Rocket Tile Augment each 64-bit word with tag bits Rocket Rocket Rocket Core Core Core 512 bit Word Word Word Word Word Word Word Word I$ D$ I$ D$ I$ D$ 528 bit Word Word Word Word Word Word Word Word tag tag tag tag tag tag tag tag TileLink TileLink TileLink TileLink TileLink TileLink Augmented cache line is transparent to L2 & L2 & L2 & coherence control. Coherence Coherence Coherence Manager Manager Manager Allocator Tag Cache Memory is partitioned into data and tag regions. Data Tracker & Array Tracker & Every memory access needs a data access and an Converter Converter MetaData extra tag access. Array Arbiter To reduce the number of tag access, a tag cache is added. Memory 5 Controller

  6. Support Tagged Memory (2) Rocket Tile Rocket Tile Rocket Tile Rocket Rocket Rocket New instructions for load/store tag: Core Core Core I$ D$ I$ D$ I$ D$ LTAG rd, imm(rs1) # load tag @ rs1 + imm to rd TileLink TileLink TileLink STAG rs2, imm(s1) # store tag rs2 @ rs1 + imm TileLink TileLink TileLink Adding a new memory op type M_T in D$. L2 & L2 & L2 & No change in core pipeline. Coherence Coherence Coherence Manager Manager Manager Allocator Tag Cache Data Tracker & Array Tracker & Converter Converter MetaData Array Arbiter Memory 6 Controller

  7. Support Tagged Memory (2) Rocket Tile Rocket Tile Rocket Tile Rocket Rocket Rocket New instructions for load/store tag: Core Core Core I$ D$ I$ D$ I$ D$ LTAG rd, imm(rs1) # load tag @ rs1 + imm to rd TileLink TileLink TileLink STAG rs2, imm(s1) # store tag rs2 @ rs1 + imm TileLink TileLink TileLink Adding a new memory op type M_T in D$. L2 & L2 & L2 & No change in core pipeline. Coherence Coherence Coherence Manager Manager Manager Allocator Tag Cache Multiple trackers (transaction handlers) to serve Data multiple memory access in parallel. Tracker & Array Tracker & Converter Converter MetaData Array Non-intrusive to current Rocket chip. Easy to implement. Arbiter But not efficient. Memory 7 Controller

  8. Function and Performance Tests • Function tests: – Inline assembly to use LTAG/STAG – Bare metal assembly test cases (riscv-tests) – Larger C programs (proxy kernel) to memory sweep with tags – Boot Linux with separated tag region – SystemVerilog unit test for the tag cache (random package generation) • Performance tests: – SPECInt 2006 benchmark (9 out of 12) 8

  9. SPECInt 2006 Result (1) I$ D$ L2 Mem Traffic Tag $ Traffic Tag $ Traffic Tag $ Traffic Tag $ Traffic 8 KiB 16 KiB 256 KiB No Tag 16 KiB Ratio 32 KiB Ratio 64 KiB Ratio 128 KiB Ratio (MPKI) (MPKI) (MPKI) (TPKI) (MPKI) (MPKI) (MPKI) (MPKI) perlbench 20 5 <1 2 <1 1.289 <1 1.089 <1 1.025 <1 1.011 bzip2 <1 14 10 16 10 1.941 7 1.688 3 1.281 <1 1.007 gcc 15 11 4 6 2 1.497 <1 1.240 <1 1.072 <1 1.023 mcf <1 168 104 136 67 1.651 40 1.409 11 1.128 3 1.040 gobmk 24 8 3 6 1 1.368 <1 1.146 <1 1.073 <1 1.046 sjeng 11 5 1 3 1 1.673 <1 1.482 <1 1.383 <1 1.316 h264ref 1 3 2 3 <1 1.480 <1 1.265 <1 1.109 <1 1.028 omnetpp 40 5 <1 <1 <1 1.653 <1 1.415 <1 1.190 <1 1.042 astar <1 21 5 9 4 1.750 2 1.471 <1 1.173 <1 1.009 average 12 27 14 20 10 1.589 6 1.356 2 1.159 <1 1.058 MPKI: misses per 1000 instructions TPKI: transactions per 1000 instructions 9

  10. SPECInt 2006 Result (2) 1.8 mcf mcf sjeng sjeng 200 average average 1.6 Memory Traffic (MPKI) Memory Traffic Ratio 150 1.4 100 1.2 50 1.0 0 0 32 64 96 128 0 32 64 96 128 Tag Cache Size (KiB) Tag Cache Size (KiB) Memory traffic ratio Memory Traffic (MPKI) Tagged/no tag 10

  11. Future Work (1) • Optimizing the tag cache – Identify non-tag pages – Automatic check for non-tag (zero tags) cache line – Write back only revised tags • Further ISA support – Atomic data + tag load/store – I$, trap instructions lack of permissions in tags – Set/reset tags for a whole cache line 11

  12. Future Work (2) • General tag interpretation – Propagate tags through core pipeline – General tag interpretation/check/operation – Rule configuration • Static table • Controlled by minion cores 12

  13. Conclusion • Add tagged memory in Rocket chip – Augment cache lines with tag bits – Add a tag cache to reduce memory traffic – New instructions for tag load/store – More optimization in the future Fro more information and get in touch: 1. Talk to Alex or me. 2. http://www.lowrisc.org/ 3. E-Mail to lowrisc-dev@lists.lowrisc.org 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend