Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9000))

  • 1084 Accesses

Abstract

We finally are able to specify a multi-core MIPS machine, build it, and show that it works. Clearly the plan is to take pipelined MIPS machines from Chap. 7 and connect them to the shared memory system from Chap. 8. Before we can do this, however, we have to address a small technical problem: the pipelined machine was obtained by a transformation from a sequential reference implementation, and that machine does not have a compare-and-swap operation. Thus, we have to add an introductory Sect. 9.1, where we augment the sequential instruction set with a compare-and-swap instruction. This turns out to be an instruction with 4 register addresses, where we accommodate the fourth address in the sa field of an R-type instruction. In order to process such instructions in a pipelined fashion we now also need in the sequential reference implementation the ability to read three register operands and to write one register operand in a single hardware cycle. If we would have treated interrupts here, we would have a special purpose register file as in [12], and we could take the third read operand from there. Here, we simply add a third read port to the general purpose register file using technology from Chap. 4.

In Sect. 9.2 we specify the ISA of multi-core MIPS and give a reference implementation with sequential processors. Like the hardware, ISA and reference implementation can be made completely deterministic, but in order to hide implementation details they are modelled for the user in a nondeterministic way: processors execute instructions one at a time; there is a stepping function s specifying for each time n the processor s(n) executing an instruction at step n. We later derive this function from the implementation, but the user does not know it; thus, programs have to work for any such stepping function. Specifying multi-core ISA turns out to be very easy: we split the sequential MIPS configuration into i) memory and ii) processor (everything else). A multi-core configuration has a single (shared) memory component and multiple processor components. In step n an ordinary sequential MIPS step is executed with processor s(n) and the shared memory.

In the multi-core reference implementation, we hook the sequential reference processors to a memory (which now has to be able to execute compare-and-swap operations). We do not bother to give a hardware construction for this memory; it suffices to use the specification from Sect. 8.2. Note, however, that for this reference implementation of multi-core MIPS we have to generalize the hardware model: we have to partition hardware into portions which are selectively clocked under the control of a stepping function s.

In Sect. 9.3 we “simply” hook pipelined implementations of the sequential MIPS processors into the shared memory system from Sect. 8. The generation of processor inputs to the caches and the consumption of the answers of the memory system are completely straightforward to implement. Unifying the correctness proofs for pipelined processors from Chap. 7 with the lemmas about the shared memory system from Chap. 8 is not terribly difficult any more. It does however require the development of some technical machinery permitting to couple local scheduling functions for the pipelined processors with local instruction numbers of the multi-core reference implementation. Liveness is finally shown using the machinery from Sect. 7.4.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    An alternative would be to take this value from a dedicated SPR (special purpose register file), but we do not consider SPRs in this book.

  2. 2.

    For practical reasons, such a construction would be inefficient. We use it here just to construct a “reference” machine which we use for the simulation proof of the multi-core processor with a shared memory system.

  3. 3.

    Turning our construction into a real sequential implementation would require a scheduler and a number of multiplexors connecting the shared memory to the processors.

  4. 4.

    Note that this situation never occurs if the reference hardware computation is simulated by an ISA computation and disjointness of data and code regions holds. The only reason why we consider it possible here, is because we want to specify the multi-core reference hardware before we show that it is simulated by a multi-core ISA. Hence, at that point we cannot yet assume that there are no writes to the ROM portion of the hardware memory.

  5. 5.

    Here, i is the local index of the instruction.

  6. 6.

    Note that, due to the fact that we keep the request signal to the instruction cache active until the stall signal from the previous stage is removed, there may be several accesses acc(2q,r 1), acc(2q,r 2), … corresponding to the access iacc(q,i). Fortunately, all these accesses are reads which don’t modify the state of the memory abstraction. As a result, we don’t care about the exact reconstruction of the access sequence to the instruction cache and talk only about the existence of an access, which ends in the same cycle when we activate signal ue 1.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Kovalev, M., Müller, S.M., Paul, W.J. (2014). A Multi-core Processor. In: A Pipelined Multi-core MIPS Machine. Lecture Notes in Computer Science, vol 9000. Springer, Cham. https://doi.org/10.1007/978-3-319-13906-7_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-13906-7_9

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-13905-0

  • Online ISBN: 978-3-319-13906-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics