Constructive Computer Architecture: FIFO Lab Comments Revisiting CF FIFOs Andy Wright 6.175 TA October 20, 2014http://csg.csail.mit.edu/6.175L14-1.

Slides:



Advertisements
Similar presentations
Elastic Pipelines and Basics of Multi-rule Systems Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February.
Advertisements

An EHR based methodology for Concurrency management Arvind (with Asif Khan) Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.
Constructive Computer Architecture: Multirule systems and Concurrent Execution of Rules Arvind Computer Science & Artificial Intelligence Lab. Massachusetts.
March 2007http://csg.csail.mit.edu/arvindSemantics-1 Scheduling Primitives for Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts.
 Balancing Symbols 3. Applications
Ordering and Consistent Cuts Presented By Biswanath Panda.
ADT Stacks and Queues. Stack: Logical Level “An ordered group of homogeneous items or elements in which items are added and removed from only one end.”
Superscalar SMIPS Processor Andy Wright Leslie Maldonado.
Concurrency Recitation – 2/24 Nisarg Raval Slides by Prof. Landon Cox.
Asynchronous Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology October 13, 2009http://csg.csail.mit.edu/koreaL12-1.
Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 22, 2011L07-1
March, 2007http://csg.csail.mit.edu/arvindIPlookup-1 IP Lookup Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.
September 24, L08-1 IP Lookup: Some subtle concurrency issues Arvind Computer Science & Artificial Intelligence Lab.
IP Lookup: Some subtle concurrency issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 22, 2011L06-1.
Constructive Computer Architecture Tutorial 5: Programming SMIPS: Single-Core Assembly Andy Wright TA October 10, 2014http://csg.csail.mit.edu/6.175T04-1.
Stacks and queues Basic operations Implementation of stacks and queues Stack and Queue in java.util Data Structures and Algorithms in Java, Third EditionCh04.
CS 350 – Software Design An Introduction to Design Patterns – Chapter 5 A proposition behind design patterns is that quality of software systems can be.
December 12, 2006http://csg.csail.mit.edu/6.827/L24-1 Scheduling Primitives for Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts.
Pipelining combinational circuits Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology February 20, 2013http://csg.csail.mit.edu/6.375L05-1.
Consensus and Its Impossibility in Asynchronous Systems.
Contracts for Concurrency - Contracts & Inheritance Aryabrata Basu University of Georgia.
Constructive Computer Architecture Tutorial 3 Debugging BSV Andy Wright TA September12, 2014http://csg.csail.mit.edu/6.175T01-1.
Cousin of the Stack.  An abstract data type (container class) in which items are entered at one end and removed from the other end  First In First.
Constructive Computer Architecture: Guards Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology September 24, 2014.
Constructive Computer Architecture Tutorial 2 Advanced BSV Sizhuo Zhang TA Oct 9, 2015T02-1http://csg.csail.mit.edu/6.175.
Constructive Computer Architecture Tutorial 2 Advanced BSV Andy Wright TA September 26, 2014http://csg.csail.mit.edu/6.175T02-1.
September 22, 2009http://csg.csail.mit.edu/koreaL07-1 Asynchronous Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab.
Elastic Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 28, 2011L08-1http://csg.csail.mit.edu/6.375.
Constructive Computer Architecture Tutorial 4: Running and Debugging SMIPS Andy Wright TA October 10, 2014http://csg.csail.mit.edu/6.175T04-1.
Constructive Computer Architecture: Control Hazards Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology October.
February 20, 2009http://csg.csail.mit.edu/6.375L08-1 Asynchronous Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts.
Constructive Computer Architecture Tutorial 6: Five Details of SMIPS Implementations Andy Wright 6.S195 TA October 7, 2013http://csg.csail.mit.edu/6.s195T05-1.
Page 1 8/29/2001 Reachability Analysis CFSM: Communicating Finite State Machines C1 C2 +A+A Sender 2 1 -R-R +R+R -A-A Receiver 2 1 CFSM Communicating Finite.
October 20, 2009L14-1http://csg.csail.mit.edu/korea Concurrency and Modularity Issues in Processor pipelines Arvind Computer Science & Artificial Intelligence.
Elastic Pipelines: Concurrency Issues
EHRs: Designing modules with concurrent methods
EHRs: Designing modules with concurrent methods
Concurrency properties of BSV methods and rules
Bluespec-6: Modeling Processors
Scheduling Constraints on Interface methods
Sequential Circuits: Constructive Computer Architecture
Constructive Computer Architecture Tutorial 6: Discussion for lab6
Pipelining combinational circuits
Multirule Systems and Concurrent Execution of Rules
Constructive Computer Architecture: Lab Comments & RISCV
Constructive Computer Architecture: Guards
Constructive Computer Architecture Tutorial 7 Final Project Overview
Pipelining combinational circuits
EHR: Ephemeral History Register
Constructive Computer Architecture: Well formed BSV programs
Lab 4 Overview: 6-stage SMIPS Pipeline
Control Hazards Constructive Computer Architecture: Arvind
Modeling Processors: Concurrency Issues
Modules with Guarded Interfaces
Pipelining combinational circuits
Elastic Pipelines: Concurrency Issues
Multirule systems and Concurrent Execution of Rules
Computer Science & Artificial Intelligence Lab.
Elastic Pipelines: Concurrency Issues
Elastic Pipelines and Basics of Multi-rule Systems
Constructive Computer Architecture: Guards
Elastic Pipelines and Basics of Multi-rule Systems
Control Hazards Constructive Computer Architecture: Arvind
Pipelined Processors Constructive Computer Architecture: Arvind
Multirule systems and Concurrent Execution of Rules
Stacks and Queues.
Tutorial 4: RISCV modules Constructive Computer Architecture
Modeling Processors Arvind
Control Hazards Constructive Computer Architecture: Arvind
Constructive Computer Architecture: Well formed BSV programs
Presentation transcript:

Constructive Computer Architecture: FIFO Lab Comments Revisiting CF FIFOs Andy Wright TA October 20, 2014http://csg.csail.mit.edu/6.175L14-1

Notes The FIFO lab has been graded Everyone did a great job on the conflicting, pipeline, and bypass FIFOs All difficulties came from the Conflict-Free FIFO and the discussion questions October 20, 2014L14-2http://csg.csail.mit.edu/6.175

What is a Conflict-Free FIFO? Is it a FIFO with a conflict matrix filled with CFs? Not really... Is it a FIFO that, in its typical use, doesn’t impose any more conflicts than necessary? Yes! October 20, 2014L14-3http://csg.csail.mit.edu/6.175

Typical FIFO use Enqueuing: check notFull and call enq(x) Dequeuing: check notEmpty and call first and deq Clearing: call clear These are the methods that commonly appear in the same rule A CF FIFO says enqueuing and dequeuing rules will have no scheduling conflict imposed by the FIFO. {notFull, enq} CF {notEmpty, first, deq} October 20, 2014L14-4http://csg.csail.mit.edu/6.175

Sequential FIFO Execution 1. enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq October 20, 2014L14-5http://csg.csail.mit.edu/6.175 What is the state of the fifo here? Assume FIFO is empty initially What does first return? How many elements are in the FIFO at the end? How many clock cycles does this take? Should that change the answer to these questions?

Concurrent FIFO Execution With Clock Cycles 1. enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq October 20, 2014L14-6http://csg.csail.mit.edu/6.175 Clock cycle boundary 1. enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq If these are both valid executions for a given FIFO, they should produce the same results.

Concurrent FIFO Execution Clear-Enq Interactions 1. enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq October 20, 2014L14-7http://csg.csail.mit.edu/ enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq What should clear and enq do when they happen in the same cycle? If both executions are valid, then the action has to be dynamic based on the order.

Can we detect the order of methods firing? In order for a method to know if it fired after another method fired, it has to always be scheduled after that method If you want two methods to be able to tell if either of them came after the other, they have to conflict They will never fire in the same cycle making this problem of who fired first trivial... October 20, 2014L14-8http://csg.csail.mit.edu/6.175

Concurrent FIFO Execution CF FIFO solution 1. enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq October 20, 2014L14-9http://csg.csail.mit.edu/ enq(1) 2. first 3. deq 4. enq(2) 5. clear 6. enq(3) 7. enq(4) 8. first 9. deq Invalid Execution Force enq < clear

What does a CF FIFO do? It allows the most flexible scheduling constraints possible while still requiring all valid concurrent executions to match the expected result from sequential execution. That is why {enq, deq} < clear and not {enq, deq} CF clear October 20, 2014L14-10http://csg.csail.mit.edu/6.175

What about the canonicalize rule? What happens if you have: {enq, deq} < canonicalize < clear  If deq and clear occur in the same rule, that rule conflicts with canonicalize. This may or may not be a problem depending on the exact use. {enq, deq} < clear < canonicalize  canonicalize can always fire at the end of the cycle independent of how enq, deq, and clear are used in rules October 20, 2014L14-11http://csg.csail.mit.edu/6.175