Lecture 09: More on Module Interfaces

Size: px
Start display at page:

Download "Lecture 09: More on Module Interfaces"

Transcription

1 Bluespec SystemVerilog Training Lecture 09: More on Module Interfaces Copyright Bluespec, Inc., Lecture 09: More on Module Interfaces Packages and Libraries Interfaces: raising the level of abstraction The Get and Put interfaces Nested interfaces. E.g., Client/Server The Connectable typeclass Interfaces: lowering the level of abstraction Motivation: matching an external port list/protocol spec Making implicit conditions explicit Removing READY and ENABLE signals Unguarded methods Driving in and out buses to/from a module s rules with zero latency L09-2 Bluespec SystemVerilog TM Training 1 Lecture 09: Interfaces II

2 Packages SystemVerilog introduces the concept of a package to organize related definitions into a name space BSV libraries are organized in packages Need to import library packages explicitly package Foo; typedef T1; typedef T2; T1 x = ; interface I1 interface I2 module mkm1 module mkm2 endpackage: Foo package Baz; import Foo :: *; import ; can use T1, T2, x, I1, I2, mkm1, mkm2 endpackage: Baz L09-3 BSV general library conventions Module names typically begin with mk, pronounced make e.g., mkreg, mkfifo, mkregfile Types (and Interfaces, because they are types) begin with an uppercase letter- e.g., Action, ActionValue#(t), Vector#(Bool), Put#(Tin) Functions and other identifiers begin with a lowercase letter, e.g., min, max, map, foldl, fifotoput L09-4 Bluespec SystemVerilog TM Training 2 Lecture 09: Interfaces II

3 The Standard Prelude Package The only package that is automatically imported (no need for explicit import package :: * ) A built in library of primitive instances, types, and typeclasses Typeclasses: Bits, Eq, Ord, Bitwise, Arith, Bounded, Literal Defining all the built-in operators (==, +, &&,, >, ) Types: Action, Bit, Bool, int, Maybe, Empty, Registers (initialized, uninitialized, asynch reset, ) Documented in the Reference Guide L09-5 Bluespec Libraries Bluespec provides an extensive library with parameterized modules, interfaces, functions, types, etc. Register Files, FIFOs and variations, RWire and variations, RAM models Complex, fixedpoint, one-hot, Wallace adder, population count, random number generator FSM generators, rigid pipelines Get/Put and variations, Client/Server, Connectables Localbus (Control/Status regs) Clock synchronizers, Tri-state models The Reference Guide (in the SW release) contains documentation Most of the libs are written in BSV itself; very few are built-in Users can create their own libraries L09-6 Bluespec SystemVerilog TM Training 3 Lecture 09: Interfaces II

4 Interfaces: raising the level of abstraction Recall: Interfaces contain methods Interfaces can also contain other interfaces We use this to build a hierarchy of interfaces Get/Put Client/Server These capture common interface design patterns There is no HW overhead to such abstraction Connections between standard interfaces can be packaged (and used, and reused) The Connectable typeclass L09-7 Get and Put Interfaces Provides simple handshaking mechanism for ting from a module or ting into it Easy to connect toher interface Get#(type t); method ActionValue#(t) (); : Get // polymorphic interface Put#(type t); method Action (t x); : Put L09-8 Bluespec SystemVerilog TM Training 4 Lecture 09: Interfaces II

5 Get and Put Interfaces Example: interface provided by a cache (c) to a processor (p) interface CacheIfc; interface Put#(Req_t) p2c_request; interface Get#(Resp_t) c2p_ response; module mkcache (CacheIfc); FIFO#(Req_t) p2c <- mkfifo; FIFO#(Resp_t) c2p <- mkfifo; rules expressing cache logic interface p2c_request; method Action (Req_t req); p2c.enq (req); interface c2p_response; method ActionValue#(Resp_t) (); let resp = c2p.first; c2p.deq; return resp; ; mkcache L09-9 Get and Put Interfaces Example: interface provided by a cache (c) to a processor (p) function Put#(Req_t) toput(fifo#(req_t) fifo); return ( interface Put; interface method CacheIfc; Action (a); interface fifo.enq Put#(Req_t) (a); p2c_request; interface Get#(Resp_t) c2p_ response; ); endfunction mkcache module mkcache (CacheIfc); FIFO#(Req_t) p2c <- mkfifo; FIFO#(Resp_t) c2p <- mkfifo; rules expressing cache logic interface p2c_request; method Action (Req_t req); p2c.enq (req); interface c2p_response; method ActionValue#(Resp_t) (); let resp = c2p.first; c2p.deq; return resp; ; L09-10 Bluespec SystemVerilog TM Training 5 Lecture 09: Interfaces II

6 Get and Put Interfaces Example: interface provided by a cache (c) to a processor (p) function interface Get#(Resp_t) CacheIfc; toget(fifo#(resp_t) fifo); module mkcache (CacheIfc); return interface ( Put#(Req_t) p2c_request; FIFO#(Req_t) p2c <- mkfifo; interface interface Get; Get#(Resp_t) c2p_ response; FIFO#(Resp_t) c2p <- mkfifo; method ActionValue#(Resp_t) (); let a = fifo.first; rules expressing cache logic fifo.deq; return a; ; ); endfunction mkcache interface p2c_request; method Action (Req_t req); p2c.enq (req); interface c2p_response; method ActionValue#(Resp_t) (); let resp = c2p.first; c2p.deq; return resp; ; L09-11 Converting FIFOs to Get/Put The BSV library provides functions to convert FIFO interfaces to Get/Put. interface CacheIfc; interface Put#(Req_t) p2c_request; interface Get#(Resp_t) c2p_ response; module mkcache (CacheIfc); FIFO#(Req_t) p2c <- mkfifo; FIFO#(Resp_t) c2p <- mkfifo; rules expressing cache logic interface p2c_request = toput (p2c); interface c2p_response = toget (c2p); mkcache Absolutely no difference in the HW! Note: toget and toput are overloaded functions from ToPut and ToGet typeclasses. Instances are supplied for many FIFO-like interfaces. L09-12 Bluespec SystemVerilog TM Training 6 Lecture 09: Interfaces II

7 Client/Server interfaces Get/Put pairs are very common, and duals of each other, so the library defines Client/Server interface types for this purpose interface Client #(req_t, resp_t); interface Get#(req_t) request; interface Put#(resp_t) response; interface Server #(req_t, resp_t); interface Put#(req_t) request; interface Get#(resp_t) response; req_t resp_t L09-13 Client/Server interfaces interface CacheIfc; interface Server#(Req_t, Resp_t) ipc; interface Client#(Req_t, Resp_t) icm; mkprocessor mkcache module mkcache (CacheIfc); FIFO#(Req_t) p2c <- mkfifo; FIFO#(Resp_t) c2p <- mkfifo; FIFO#(Req_t) c2m <- mkfifo; FIFO#(Resp_t) m2c <- mkfifo; rules expressing cache logic interface Server ipc interface Put (a); method Action (a); p2c.enq(a); mkmem interface Get ; method ActionValue#(Resp_t) ; c2p.deq; return c2p.first; // Server L09-14 Bluespec SystemVerilog TM Training 7 Lecture 09: Interfaces II

8 Client/Server interfaces interface CacheIfc; interface Server#(Req_t, Resp_t) ipc; interface Client#(Req_t, Resp_t) icm; mkprocessor mkcache interface Client ipc interface Put (a); method Action (a); m2c.enq(a); interface Get ; method ActionValue#(Resp_t) ; c2m.deq; return c2m.first; // Client mkmem L09-15 Client/Server interfaces interface CacheIfc; interface Server#(Req_t, Resp_t) ipc; interface Client#(Req_t, Resp_t) icm; module mkcache (CacheIfc); // from / to processor FIFO#(Req_t) p2c <- mkfifo; FIFO#(Resp_t) c2p <- mkfifo; mkprocessor // to / from memory FIFO#(Req_t) c2m <- mkfifo; FIFO#(Resp_t) m2c <- mkfifo; mkcache rules expressing cache logic interface ipc = fifostoserver (p2c, c2p); interface icm = fifostoclient (c2m, m2c); mkmem L09-16 Bluespec SystemVerilog TM Training 8 Lecture 09: Interfaces II

9 Connecting Get and Put A module m1 providing a Get interface can be connected to a module m2 providing a Put interface with a simple rule module mktop () Get#(int) m1 <- mkm1; Put#(int) m2 <- mkm2; rule connect; let x <- m1.(); m2. (x); endrule // note implicit conditions rule connect L09-17 Connectables typeclass Connectable #(type t1, type t2); module mkconnection (t1 m1, t2 m2, Empty i); endtypeclass There are many pairs of types that are duals of each other Get/Put, Client/Server, YourTypeT1/YourTypeT2, The BSV library defines an overloaded module mkconnection which encapsulates the connections between such duals The BSV library predefines the implementation of mkconnection for Get/Put, Client/Server, etc. Because overloading in BSV is extensible, you can overload mkconnection to work on your own interface types T1 and T2 The BSV library also recursively defines mkconnection for tuples and vectors of interfaces that are al individually connectable (including your own interface types) L09-18 Bluespec SystemVerilog TM Training 9 Lecture 09: Interfaces II

10 mkconnection Using these interface facilities, assembling systems becomes very easy mkprocessor mkcache mkmem interface CacheIfc; interface Server#(Req_t, Resp_t) ipc; interface Client#(Req_t, Resp_t) icm; module mktoplevel () // instantiate subsystems Client #(Req_t, Resp_t) p <- mkprocessor; Cache_Ifc #(Req_t, Resp_t) c <- mkcache; Server #(Req_t, Resp_t) m <- mkmem; // instantiate connects mkconnection (p, c.ipc); // Server connection mkconnection (c.icm, m); // Client connection L09-19 Interfaces: lowering the level of abstraction Why? When a BSV module m must connect to a non-bsv environment with a pre-specified port list and protocol, m s interface needs to be matched exactly to the environment Example: connecting to AMBA AHB Example: in an existing IP subsystem, replacing a block with a new one written in BSV This usually means that we can t use BSV s Action, ActionValue and value method protocols and signaling L09-20 Bluespec SystemVerilog TM Training 10 Lecture 09: Interfaces II

11 Interfaces: exposing method conditions A method s implicit condition can always be exposed as a Bool method The examples below are from the BSV library Note: in the lib FIFOF, enq, first and deq are still guarded by their implicit conditions; the notfull and notempty methods are just additional methods interface FIFO#(type t); // enq has implicit notfull condition method Action enq(t x); // first/deq have implicit notempty condition method t first; method Action deq; method Action clear; : FIFO interface FIFOF#(type t); // enq has implicit notfull condition method Action enq(t x); // first/deq have implicit notempty condition method t first; method Action deq; method Action clear; method Bool notempty; method Bool notfull; : FIFOF L09-21 Interfaces: exposing method conditions Implementing exposed conditions is trivial: just replicate the implicit condition E.g., below, enq() s implicit condition canenque is returned explicitly as a Boolean in notfull() Don t worry: the generated code will share a single instance of the condition logic Or, share it explicity by writing let x = canenque and using x twice module mkfifof (FIFO#(type (FIFOF#(type t)); t)); method Action enq(t x) if (canenque); method t first if (candeque); method Action deq if (candeque); method Bool notfull; return canenque; method Bool notempty; return candeque; : mkfifof L09-22 Bluespec SystemVerilog TM Training 11 Lecture 09: Interfaces II

12 Interfaces: removing READY signals The always_ attribute can be applied to a method to indicate that it is always (the compiler will flag an error if it is not true) that the READY signal must be removed from the generated Verilog (* always_ = add, result *) module mkadder (Adder); Reg#(int) acc <- mkrega(0); method Action add(a, b); acc <= a + b; method int result; return acc; interface Adder; method Action add(int a, int b); method int result; The compiler will check that add and result are always to be invoked, i.e. their implicit and explicit conditions are always True The compiler will not generate any READY signal for add and result L09-23 Interfaces: removing ENABLE signals The always_d attribute can be applied to a method (Action, ActionValue) to indicate that it is assumed True, i.e., the in signals (args) are driven by the environment on every cycle This implies the method s implicit condition must be always True that the ENABLE signal must be removed from the generated Verilog (* always_d = add *) module mkadder (Adder); Reg#(int) acc <- mkrega(0); method Action add(a, b); acc <= a + b; method int result; return acc; interface Adder; method Action add(int a, int b); method int result; The compiler will check that add can be always invoked, i.e. its implicit and explicit conditions are always True The compiler will not generate any ENABLE signal for add L09-24 Bluespec SystemVerilog TM Training 12 Lecture 09: Interfaces II

13 Interfaces: unguarded methods Suppose a module must read a 34-bit decoded instruction bus on EVERY CYCLE, of which the lower 3 bits are an opcode, with opcode == 0 indicating IDLE, and we want to capture the (non-idle) instructions in an in FIFO typedef enum {Idle, Bz, Add, Sub} OpCode deriving(bits, Eq); typedef struct { Bit#(32) operands; OpCode opcode; } Cmd deriving(bits, Eq); (* always_d = instr *) module mkfoo (IfcFoo#(Cmd)); FIFO#(Cmd) cmds <- mkfifo; method Action instr(bus); if (bus.opcode!= Idle) cmds.enq(bus); interface IfcFoo#(type t); method Action instr(t bus); The compiler will signal an error, since the enq() method may not be (the fifo may be full). It cannot verify that instr is always, so it cannot allow the always_d spec L09-25 Interfaces: unguarded methods What if we use FIFOF and test for the fifo being notfull? typedef enum {Idle, Bz, Add, Sub} OpCode deriving(bits, Eq); typedef struct { Bit#(32) operands; OpCode opcode; } Cmd deriving(bits, Eq); (* always_d = instr *) module mkfoo (IfcFoo#(Cmd)); FIFOF#(Cmd) cmds <- mkfifof; method Action instr(bus); if (bus.opcode!= Idle && cmds.notfull) cmds.enq(bus); interface IfcFoo#(type t); method Action instr(t bus); This will still not work, because The compiler doesn t know that (notfull == True) implies enq is Ready L09-26 Bluespec SystemVerilog TM Training 13 Lecture 09: Interfaces II

14 Interfaces: unguarded methods Answer: use unguarded methods, i.e., methods with no implicit conditions, relying on you to guard them explicitly The BSV library provides FIFOs with unguarded methods Warning: these are dangerous! Use with care, only in these impedance matching situations typedef enum {Idle, Bz, Add, Sub} OpCode deriving(bits, Eq); typedef struct { Bit#(32) operands; OpCode opcode; } Cmd deriving(bits, Eq); (* always_d = instr *) module mkfoo (IfcFoo#(Cmd)); FIFOF#(Cmd) cmds <- mkugfifof; method Action instr(bus); if (bus.opcode!= Idle && cmds.notfull) cmds.enq(bus); interface IfcFoo#(type t); method Action instr(t bus); This will work. It is possible always to enq in a mkugfifof Warning: effect of using enq without checking notfull is unspecified! L09-27 Interfaces: summary on matching an external port spec Any external port spec can be matched exactly, using one or more of the following techniques Expose implicit conditions into explicit Bool methods Use always_ attributes to remove out READY signals from any value, Action or ActionValue method Compiler will check that this is legal Use always_d attributes to remove in ENABLE signals from any Action of ActionValue method Implies always_, and the compiler will check this, i.e, method bodies cannot use other methods that have implicit conditions Use components with unguarded methods, if necessary Tip: when defining a component with unguarded methods, remove guards only where necessary. E.g., a fifo with unguarded enq but guarded first/deq What remains are pure in and out buses (Verilog ports) L09-28 Bluespec SystemVerilog TM Training 14 Lecture 09: Interfaces II

15 Driving in buses into rules with zero latency If an in bus is registered, the method body just assigns the value to a register or fifo. 1 cycle later, it s available to all rules in the module. rule r1 (reg_a == 1 fifo_b.first == 9); method Action m1 (int bus1, int bus2); endrule reg_a <= bus1; fifo_b.enq (bus2); changes in reg_a and fifo_b visible to r1 one clock cycle later Sometimes, one or more in buses must be made available directly (zero latency) to a rule for combining/arbitration/ In this case, use an RWire The Prelude also contains a variation on RWire called Wire Instead of the wset() and w() RWire methods, respectively, it has a _write() method (same as a Reg, therefore can use <= assignment) a _read() method (same as a Reg, therefore can read it implicitly) Instead of a separate Valid bit, it s encoded in the implicit cond of _read L09-29 Driving in buses into rules with zero latency (* always_d = m1, m2 *) module mkfoo (IfcFoo); Wire#(int) w1 <- mkwire; Wire#(int) w2 <- mkwire; FIFO#(int) f1 <- mkfifo; FIFO#(int) f2 <- mkfifo; rule r1 (w1[9:5] > w2[9:5]); f1.enq(w1); f2.enq(w2); endrule rule r2 (w1[9:5] <= w2[9:5]); f1.enq (w2); f2.enq (w1); endrule w1 and w2 read implicitly. Rules Can Fire only if both wires are being driven. interface IfcFoo; method Action m1 (int bus1); method Action m2 (int bus2); method Action m1 (bus1); if (bus1[2:0]!= 0) w1 <= bus1; method Action m2 (bus2); if (bus2[2:0]!= 0) w2 <= bus2; bus1 and bus2 driven onto wires w1and w2 directly L09-30 Bluespec SystemVerilog TM Training 15 Lecture 09: Interfaces II

16 Driving out buses from rules with zero latency If an out bus is registered, the method body just reads the value from a register or fifo. 1 cycle earlier, it was there by some rule or method. rule r1 (conda); reg_a <= 3; endrule rule r2 (condb) fifo_b.enq(9); endrule method int m1; return reg_a; method int m2; return fifo_b.first; changes in reg_a and fifo_b driven one clock cycle later Sometimes, an out bus must be driven directly (zero latency) from a rule. In this case, use an RWire or a Wire L09-31 Driving out buses from rules with zero latency (* always_ = m1, m2 *) module mkfoo (IfcFoo); interface IfcFoo; RWire#(int) rw <- mkrwire; method int m1; DWire#(int) dw <- mkdwire(22); method int m2; Reg#(int) valuea <- mkrega(0); rule r1 (write_rw); rw.wset (valuea); If write_rw then the RWire is set to valuea endrule rule r2 (write_dw); dw <= valuea; endrule If write_dw then the DWire is set to valuea method int m1; return frommaybe (0, rw1.w()); m1 outs valuea if rw is set otherwise 0 method int m2; return dw; m2 outs valuea if dw is set otherwise 22 L09-32 Bluespec SystemVerilog TM Training 16 Lecture 09: Interfaces II

17 Summary BSV programs are organized into packages. The standard BSV libraries provide many useful packages (documented in the Reference Guide) Interfaces: raising the level of abstraction We can very quickly, succinctly and correctly define very complex interfaces, and connect them, using interface abstraction, and BSV library elements Get/Put, Client/Server, Connectables, etc. Interfaces: lowering the level of abstaction We can precisely interface to any external port list/protocol spec, by exposing implicit conditions, using always_ and always_d attributes, using Unguarded methods, and using RWires/Wires for zero-latency (unregistered) communication L09-33 End of Lecture Copyright Bluespec, Inc., Bluespec SystemVerilog TM Training 17 Lecture 09: Interfaces II

BSV 1 for ESL 2 Design. SoCs: complex assemblies of many application specific blocks (IPs)

BSV 1 for ESL 2 Design. SoCs: complex assemblies of many application specific blocks (IPs) BSV 1 for ESL 2 Design Rishiyur S. Nikhil, PhD. CTO, Bluespec, Inc. Lecture in 6.375, MIT March 10, 2008 1: Bluespec SystemVerilog 2: Electronic System Level Bluespec, Inc., 2008 SoCs: complex assemblies

More information

6.375 Tutorial 1 BSV. Ming Liu. Overview. Parts of a BSV module Lab 2 topics More types in BSV

6.375 Tutorial 1 BSV. Ming Liu. Overview. Parts of a BSV module Lab 2 topics More types in BSV 6.375 Tutorial 1 BSV Ming Liu T01-1 Overview Parts of a BSV module Lab 2 topics More types in BSV T01-2 1 Modules Interfaces Methods provide a way for the outside world to interact with the module State

More information

Bluespec SystemVerilog TM Training. Lecture 05: Rules. Copyright Bluespec, Inc., Lecture 05: Rules

Bluespec SystemVerilog TM Training. Lecture 05: Rules. Copyright Bluespec, Inc., Lecture 05: Rules Bluespec SystemVerilog Training Copyright Bluespec, Inc., 2005-2008 Rules: conditions, actions Rule Untimed Semantics Non-determinism Functional correctness: atomicity, invariants Examples Performance

More information

Bluespec. Lectures 3 & 4 with some slides from Nikhil Rishiyur at Bluespec and Simon Moore at the University of Cambridge

Bluespec. Lectures 3 & 4 with some slides from Nikhil Rishiyur at Bluespec and Simon Moore at the University of Cambridge Bluespec Lectures 3 & 4 with some slides from Nikhil Rishiyur at Bluespec and Simon Moore at the University of Cambridge Course Resources http://cas.ee.ic.ac.uk/~ssingh Lecture notes (Power Point, PDF)

More information

The Pipeline Lab Copyright Bluespec Inc

The Pipeline Lab Copyright Bluespec Inc The Pipeline Lab Hello Bluespec! This lab will lead you through basic aspects of the BSV (Bluespec SystemVerilog) language and the usage of the Bluespec compiler (bsc) for Bluesim and Verilog simulations.

More information

A Parameterized Model of a Crossbar Switch In Bluespec SystemVerilog (TM) June 30, Copyright Bluespec, Inc., 2005, All Rights Reserved

A Parameterized Model of a Crossbar Switch In Bluespec SystemVerilog (TM) June 30, Copyright Bluespec, Inc., 2005, All Rights Reserved Introduction A Parameterized Model of a Crossbar Switch In Bluespec SystemVerilog (TM) June 30, 2005 Copyright Bluespec, Inc., 2005, All Rights Reserved This document describes the design of a highly parameterized,

More information

Sequential Circuits as Modules with Interfaces. Arvind Computer Science & Artificial Intelligence Lab M.I.T.

Sequential Circuits as Modules with Interfaces. Arvind Computer Science & Artificial Intelligence Lab M.I.T. Sequential Circuits as Modules with Interfaces Arvind Computer Science & Artificial Intelligence Lab M.I.T. L07-1 Shortcomings of the current hardware design practice Complex hardware is viewed as a bunch

More information

VHDL vs. BSV: A case study on a Java-optimized processor

VHDL vs. BSV: A case study on a Java-optimized processor VHDL vs. BSV: A case study on a Java-optimized processor April 18, 2007 Outline Introduction Goal Design parameters Goal Design parameters What are we trying to do? Compare BlueSpec SystemVerilog (BSV)

More information

Sizhuo Zhang TA

Sizhuo Zhang TA Constructive Computer Architecture Tutorial 2 Advanced BSV Sizhuo Zhang 6.175 TA T02-1 EHR and Scheduling Design example Up/down counter interface Counter; Bit#(8) read; Action increment(bit#(8) x); Action

More information

Bluespec-5: Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Bluespec-5: Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Bluespec-5: Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Based on material prepared by Bluespec Inc, January 2005 L12-1 Some New Types

More information

Elastic Pipelines and Basics of Multi-rule Systems. Elastic pipeline Use FIFOs instead of pipeline registers

Elastic Pipelines and Basics of Multi-rule Systems. Elastic pipeline Use FIFOs instead of pipeline registers Elastic Pipelines and Basics of Multi-rule Systems Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L05-1 Elastic pipeline Use FIFOs instead of pipeline registers

More information

Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L07-1 The Plan Non-pipelined processor Two-stage synchronous pipeline Two-stage asynchronous

More information

Simple Inelastic and

Simple Inelastic and Simple Inelastic and Folded Pipelines Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L04-1 Pipelining a block C f1 f2 f3 Combinational P f1 f2 f3 Pipeline FP

More information

Bluespec-5: Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Bluespec-5: Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Bluespec-5: Modeling Processors (revised after the lecture) Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Based on material prepared by Bluespec Inc, January

More information

Lab 4: N-Element FIFOs 6.175: Constructive Computer Architecture Fall 2014

Lab 4: N-Element FIFOs 6.175: Constructive Computer Architecture Fall 2014 Lab 4: N-Element FIFOs Due: Wednesday October 8, 2014 1 Introduction This lab focuses on the design of various N-element FIFOs including a conflict-free FIFO. Conflict-free FIFOs are an essential tool

More information

6.175: Constructive Computer Architecture. Tutorial 1 Bluespec SystemVerilog (BSV) Sep 30, 2016

6.175: Constructive Computer Architecture. Tutorial 1 Bluespec SystemVerilog (BSV) Sep 30, 2016 6.175: Constructive Computer Architecture Tutorial 1 Bluespec SystemVerilog (BSV) Quan Nguyen (Only crashed PowerPoint three times) T01-1 What s Bluespec? A synthesizable subset of SystemVerilog Rule-based

More information

Multiple Clock Domains

Multiple Clock Domains Multiple Clock Domains Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Based on material prepared by Bluespec Inc L13-1 Why Multiple Clock Domains Arise naturally

More information

Transmitter Overview

Transmitter Overview Multiple Clock Domains Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Based on material prepared by Bluespec Inc L12-1 802.11 Transmitter Overview headers Controller

More information

Verification with Bluespec SystemVerilog Bluespec, Inc., All Rights Reserved

Verification with Bluespec SystemVerilog Bluespec, Inc., All Rights Reserved Verification with Bluespec SystemVerilog 2005 2006 Bluespec, Inc., All Rights Reserved 1 Abstract Bluespec SystemVerilog (BSV) is an advanced high-level Hardware Description Language that can increase

More information

Lecture 06: Rule Scheduling

Lecture 06: Rule Scheduling Bluespec SystemVerilog Training Lecture 06: Rule Scheduling Copyright Bluespec, Inc., 2005-2008 Lecture 06: Rule Scheduling A rule has no internal sequencing Untimed rule semantics are one-rule-at-a-time

More information

Well formed BSV programs

Well formed BSV programs Constructive Computer Architecture: Well formed BSV programs Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology http://csg.csail.mit.edu/6.175 L07-1 Are these

More information

Hardware Synthesis from Bluespec

Hardware Synthesis from Bluespec Hardware Synthesis from Bluespec Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology Happy! Day! L11-1 Guarded interfaces Modules with guarded interfaces

More information

Successive refinement & Modular Structure. Bluespec-8: Modules and Interfaces. Designing a 2-Stage Processor with GAA. A 2-Stage Processor in RTL

Successive refinement & Modular Structure. Bluespec-8: Modules and Interfaces. Designing a 2-Stage Processor with GAA. A 2-Stage Processor in RTL Bluespec-8: Modules and Interfaces Successive refinement & Modular Structure rf fetch decode memory writeback Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

More information

Constructive Computer Architecture. Tutorial 1 BSV Types. Andy Wright TA. September12, 2014

Constructive Computer Architecture. Tutorial 1 BSV Types. Andy Wright TA. September12, 2014 Constructive Computer Architecture Tutorial 1 BSV Types Andy Wright 6.175 TA T01-1 Bit#(numeric type n) The most important type in BSV We ll go into the details later L03-2 Bit#(numeric type n) Literal

More information

Super Advanced BSV* Andy Wright. October 24, *Edited for Tutorial 6. Andy Wright Super Advanced BSV* October 24, / 25

Super Advanced BSV* Andy Wright. October 24, *Edited for Tutorial 6. Andy Wright Super Advanced BSV* October 24, / 25 Super Advanced BSV* Andy Wright October 24, 2014 *Edited for 6.175 Tutorial 6 Andy Wright Super Advanced BSV* October 24, 2014 1 / 25 Super Advanced BSV Scheduling! Andy Wright Super Advanced BSV* October

More information

Bluespec for a Pipelined SMIPSv2 Processor

Bluespec for a Pipelined SMIPSv2 Processor Bluespec for a Pipelined SMIPSv2 Processor 6.375 Laboratory 2 February 14, 2008 The second laboratory assignment is to implement a pipelined SMIPSv2 in Bluespec SystemVerilog. As with Lab One, your deliverables

More information

Well formed BSV programs

Well formed BSV programs Constructive Computer Architecture: Well formed BSV programs Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology September 17, 2014 http://csg.csail.mit.edu/6.175

More information

Constructive Computer Architecture. September 9, T01-1. Was everyone added to the class?

Constructive Computer Architecture. September 9, T01-1. Was everyone added to the class? Constructive Computer Architecture Tutorial 1 Andy Wright 6.S195 TA T01-1 Administrative Stuff Piazza Was everyone added to the class? Lab 1 (Due Friday) Has everyone tried logging onto vlsifarm? What

More information

Small Router Design Using. Bluespec SystemVerilog

Small Router Design Using. Bluespec SystemVerilog Small Router Design Using Bluespec SystemVerilog Daian Sova M. Filip Master AAC SBT Router Design 1 1. SBT Router Block Description The SBT Router is a simple router which has one input port (8 bits wide)

More information

Using RTL Models in Bluespec SystemVerilog

Using RTL Models in Bluespec SystemVerilog Using RTL Models in Bluespec SystemVerilog October 11, 2009 Existing RTL modules can be used as part of a Bluespec SystemVerilog (BSV) design. The BSV import "BVI" statement defines a Bluespec module wrapper

More information

Extending SystemVerilog Data Types to Nets

Extending SystemVerilog Data Types to Nets Extending SystemVerilog Data Types to Nets SystemVerilog extended Verilog by adding powerful new data types and operators that can be used to declare and manipulate parameters and variables. Extensions

More information

Pipelining combinational circuits

Pipelining combinational circuits Pipelining combinational circuits Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology February 20, 2013 http://csg.csail.mit.edu/6.375 L05-1 Combinational IFFT

More information

Simple Inelastic and

Simple Inelastic and Simple Inelastic and Folded Pipelines Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology For taking noted during the lecture L3-1 Pipelining a block C inq f1 f2

More information

IP Lookup block in a router

IP Lookup block in a router P Lookup: Some subtle concurrency issues Arvind Computer Science & Artificial ntelligence Lab Massachusetts nstitute of Technology L06-1 P Lookup block in a router Packet Processor S (lookup table) P Lookup

More information

Multiple Clock Domains

Multiple Clock Domains Multiple Clock Domains (MCD) Arvind with Nirav Dave Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology March 15, 2010 http://csg.csail.mit.edu/6.375 L12-1 Plan Why Multiple

More information

Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L07-1 Instruction set typedef enum {R0;R1;R2; ;R31} RName; typedef union tagged { struct

More information

Lab 6: RISC-V Pipeline with Caches Spring 2016

Lab 6: RISC-V Pipeline with Caches Spring 2016 Lab 6: RISC-V 6-stage Pipeline with Caches Due: 11:59:59pm, Fri Mar 18, 2016 This lab is your introduction to realistic RISC-V pipelines and caches. In the first part of the lab, you will implement a six-stage

More information

IP Lookup: Some subtle concurrency issues. IP Lookup block in a router

IP Lookup: Some subtle concurrency issues. IP Lookup block in a router IP Lookup: Some subtle concurrency issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology ebruary 22, 2016 http://csg.csail.mit.edu/6.375 L07-1 IP Lookup block

More information

IP Lookup block in a router

IP Lookup block in a router P Lookup Arvind Computer Science & Artificial ntelligence Lab Massachusetts nstitute of Technology L07-1 P Lookup block in a router Packet Processor S (lookup table) P Lookup Line Card (LC) Control Processor

More information

Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Modeling Processors. Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L08-1 Instruction set typedef enum {R0;R1;R2; ;R31} RName; typedef union tagged { struct

More information

Module Interfaces and Concurrency

Module Interfaces and Concurrency Module Interfaces and Concurrency Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L12-1 Design Alternatives: Latency and Throughput Combinational (C) Pipeline (P) Folded: Reuse a

More information

Architecture exploration in Bluespec

Architecture exploration in Bluespec Architecture exploration in Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Guest Lecture 6.973 (lecture 7) L-1 Chip design has become too risky a business

More information

System Verilog Tagged Unions and Pattern Matching

System Verilog Tagged Unions and Pattern Matching System Verilog Tagged Unions and Pattern Matching (An extension to System Verilog 3.1 proposed to Accellera) Bluespec, Inc. Contact: Rishiyur S. Nikhil, CTO, Bluespec, Inc. 200 West Street, 4th Flr., Waltham,

More information

Modular Refinement - 2. Successive refinement & Modular Structure

Modular Refinement - 2. Successive refinement & Modular Structure Modular Refinement - 2 Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L10-1 Successive refinement & Modular Structure pc rf fetch decode execute memory writeback

More information

Pipelining combinational circuits

Pipelining combinational circuits Constructive Computer Architecture: Pipelining combinational circuits Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology September 18, 2013 http://csg.csail.mit.edu/6.s195

More information

Combinational Circuits and Simple Synchronous Pipelines

Combinational Circuits and Simple Synchronous Pipelines Combinational Circuits and Simple Synchronous Pipelines Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L061 Bluespec: TwoLevel Compilation Bluespec (Objects,

More information

Complex Combinational circuits in Bluespec

Complex Combinational circuits in Bluespec Complex Combinational circuits in Bluespec Arvind Computer Science & Artificial Intelligence Lab M.I.T. L05-1 2-bit Ripple-Carry Adder cascading full adders x[1] y[1] x[0] y[0] c[2] fa c[1] fa 0 Use fa

More information

Sequential Circuits. Combinational circuits

Sequential Circuits. Combinational circuits ecoder emux onstructive omputer Architecture Sequential ircuits Arvind omputer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology L04-1 ombinational circuits A 0 A 1 A n-1 Sel...

More information

Bluespec TM SystemVerilog Reference Guide

Bluespec TM SystemVerilog Reference Guide Bluespec TM SystemVerilog Reference Guide Revision: 6 September 2013 Copyright c 2000 2013 Bluespec, Inc. All rights reserved 1 Reference Guide Bluespec SystemVerilog Trademarks and copyrights Verilog

More information

Multicycle processors. Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology

Multicycle processors. Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology Multicycle processors Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology L12-1 Single-Cycle RISC Processor As an illustrative example, we use a subset of RISC-V

More information

Non-pipelined Multicycle processors

Non-pipelined Multicycle processors Non-pipelined Multicycle processors Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology Code for the lecture is available on the course website under the code tab

More information

Arvind (with the help of Nirav Dave) Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Arvind (with the help of Nirav Dave) Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology Stmt FSM Arvind (with the help of Nirav Dave) Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology March 10, 2010 http://csg.csail.mit.edu/snu L9-1 Motivation Some common

More information

Background Type Classes (1B) Young Won Lim 6/28/18

Background Type Classes (1B) Young Won Lim 6/28/18 Background Type Classes (1B) Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2

More information

VHDL Sample Slides Rev Sample Slides from the 2-day and 4-day VHDL Training Courses

VHDL Sample Slides Rev Sample Slides from the 2-day and 4-day VHDL Training Courses VHDL Sample Slides from the 2-day and 4-day VHDL Training Courses Rev. 4.7 VHDL 2011 TM Associates, Inc. 1-1 These sample slides are taken from the 4-day basic VHDL training course. They are from a variety

More information

Extending SystemVerilog Data Types to Nets

Extending SystemVerilog Data Types to Nets Extending SystemVerilog Data Types to Nets Revision 3 This document proposes a set of SystemVerilog extensions to allow data types to be used to declare nets. The Overview section provides some rationale

More information

Introduction to Bluespec

Introduction to Bluespec Introduction to Bluespec Andy Wright acwright@mit.edu Updated: December 30, 2013 1 Combinational Logic 1.1 Primitive Types definition: Bool This is a basic type for expressing true-false values with a

More information

Superscalar SMIPS Processor

Superscalar SMIPS Processor Superscalar SMIPS Processor Group 2 Qian (Vicky) Liu Cliff Frey 1 Introduction Our project is the implementation of a superscalar processor that implements the SMIPS specification. Our primary goal is

More information

Binary Arithmetic Circuits

Binary Arithmetic Circuits Binary Arithmetic Circuits Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology L04-1 Building blocks for an Adder A full adder adds two one-bit numbers and a carry

More information

Chapter 3 (Cont III): Exploiting ILP with Software Approaches. Copyright Josep Torrellas 1999, 2001, 2002,

Chapter 3 (Cont III): Exploiting ILP with Software Approaches. Copyright Josep Torrellas 1999, 2001, 2002, Chapter 3 (Cont III): Exploiting ILP with Software Approaches Copyright Josep Torrellas 1999, 2001, 2002, 2013 1 Exposing ILP (3.2) Want to find sequences of unrelated instructions that can be overlapped

More information

Bluespec SystemVerilog Known Problems and Solutions

Bluespec SystemVerilog Known Problems and Solutions Bluespec SystemVerilog Known Problems and Solutions Revision: 17 January 2012 Copyright c 2000 2012 Bluespec, Inc. All rights reserved 1 Contents Table of Contents 2 Problem #001: Mutually-exclusive uses

More information

Elastic Pipelines: Concurrency Issues

Elastic Pipelines: Concurrency Issues Elastic Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L08-1 Inelastic vs Elastic Pipelines In a Inelastic pipeline: pp typically

More information

Multicycle processors. Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology

Multicycle processors. Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology Multicycle processors Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology L14-1 Single-Cycle RISC Processor As an illustrative example, we use a subset of RISC-V

More information

SystemVerilog Essentials Simulation & Synthesis

SystemVerilog Essentials Simulation & Synthesis SystemVerilog Essentials Simulation & Synthesis Course Description This course provides all necessary theoretical and practical know-how to design programmable logic devices using SystemVerilog standard

More information

SystemVerilog Lecture 3. Prof. Gerald E. Sobelman Dept. of Electrical and Computer Engineering University of Minnesota Minneapolis, MN USA

SystemVerilog Lecture 3. Prof. Gerald E. Sobelman Dept. of Electrical and Computer Engineering University of Minnesota Minneapolis, MN USA SystemVerilog Lecture 3 Prof. Gerald E. Sobelman Dept. of Electrical and Computer Engineering University of Minnesota Minneapolis, MN 55455 USA 1 Outline Design Example: Booth Multiplier Design Example:

More information

Overview. BSV reviews/notes Guard lifting EHRs Scheduling Lab Tutorial 2 Guards and Scheduling. Ming Liu

Overview. BSV reviews/notes Guard lifting EHRs Scheduling Lab Tutorial 2 Guards and Scheduling. Ming Liu 6.375 Tutorial 2 Guards and Scheduling Ming Liu T02-1 Overview BSV reviews/notes Guard lifting EHRs Scheduling Lab 3 T02-2 1 Expressions vs. Actions Expressions Have no side effects (state changes) Can

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

L12: I/O Systems. Name: ID:

L12: I/O Systems. Name: ID: L12: I/O Systems Name: ID: Synchronous and Asynchronous Buses Synchronous Bus (e.g., processor-memory buses) Includes a clock in the control lines and has a fixed protocol for communication that is relative

More information

6.175: Constructive Computer Architecture. Tutorial 3 RISC-V and Debugging. Oct 14, 2016

6.175: Constructive Computer Architecture. Tutorial 3 RISC-V and Debugging. Oct 14, 2016 6.175: Constructive Computer Architecture Tutorial 3 RISC-V and Debugging Quan Nguyen (Moonlights as an amateur instruction set evangelist) T02-1 Outline RISC-V processor (from lab 5 onwards) Debugging

More information

Memories: a practical primer

Memories: a practical primer Memories: a practical primer The good news: huge selection of technologies Small & faster vs. large & slower Every year capacities go up and prices go down New kid on the block: high density, fast flash

More information

IBM Power Multithreaded Parallelism: Languages and Compilers. Fall Nirav Dave

IBM Power Multithreaded Parallelism: Languages and Compilers. Fall Nirav Dave 6.827 Multithreaded Parallelism: Languages and Compilers Fall 2006 Lecturer: TA: Assistant: Arvind Nirav Dave Sally Lee L01-1 IBM Power 5 130nm SOI CMOS with Cu 389mm 2 2GHz 276 million transistors Dual

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

Martin Kruliš, v

Martin Kruliš, v Martin Kruliš 1 Optimizations in General Code And Compilation Memory Considerations Parallelism Profiling And Optimization Examples 2 Premature optimization is the root of all evil. -- D. Knuth Our goal

More information

Haskell Types, Classes, and Functions, Currying, and Polymorphism

Haskell Types, Classes, and Functions, Currying, and Polymorphism 1 CSCE 314: Programming Languages Dr. Flemming Andersen Haskell Types, Classes, and Functions, Currying, and Polymorphism 2 Types A type is a collection of related values. For example, Bool contains the

More information

Chap 4 Connecting the Testbench and. Design. Interfaces Clocking blocks Program blocks The end of simulation Top level scope Assertions

Chap 4 Connecting the Testbench and. Design. Interfaces Clocking blocks Program blocks The end of simulation Top level scope Assertions Chap 4 Connecting the Testbench and Interfaces Clocking blocks Program blocks The end of simulation Top level scope Assertions Design 1 4 Connecting the Testbench and Design Testbench wraps around the

More information

BSV by Example. The next-generation language for electronic system design. Rishiyur S. Nikhil and Kathy R. Czeck

BSV by Example. The next-generation language for electronic system design. Rishiyur S. Nikhil and Kathy R. Czeck BSV by Example The next-generation language for electronic system design Rishiyur S. Nikhil and Kathy R. Czeck 2 Copyright c 2010 Bluespec, Inc. All rights reserved. No part of this publication may be

More information

Programming with Bluespec SystemVerilog: Design Methodologies, Styles, Patterns and Examples

Programming with Bluespec SystemVerilog: Design Methodologies, Styles, Patterns and Examples Programming with Bluespec SystemVerilog: Design Methodologies, Styles, Patterns and Examples Preliminary Draft Please do not circulate without permission from Bluespec, Inc. Revision: 3 March 2009 Copyright

More information

System Verilog Tagged Unions and Pattern Matching

System Verilog Tagged Unions and Pattern Matching System Verilog Tagged Unions and Pattern Matching (An extension to System Verilog 3.1 proposed to Accellera) Bluespec, Inc. Contact: Rishiyur S. Nikhil, CTO, Bluespec, Inc. 200 West Street, 4th Flr., Waltham,

More information

Outline. In-Order vs. Out-of-Order. Project Goal 5/14/2007. Design and implement an out-of-ordering superscalar. Introduction

Outline. In-Order vs. Out-of-Order. Project Goal 5/14/2007. Design and implement an out-of-ordering superscalar. Introduction Outline Group IV Wei-Yin Chen Myong Hyon Cho Introduction In-Order vs. Out-of-Order Register Renaming Re-Ordering Od Buffer Superscalar Architecture Architectural Design Bluespec Implementation Results

More information

Architectures & instruction sets R_B_T_C_. von Neumann architecture. Computer architecture taxonomy. Assembly language.

Architectures & instruction sets R_B_T_C_. von Neumann architecture. Computer architecture taxonomy. Assembly language. Architectures & instruction sets Computer architecture taxonomy. Assembly language. R_B_T_C_ 1. E E C E 2. I E U W 3. I S O O 4. E P O I von Neumann architecture Memory holds data and instructions. Central

More information

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent

More information

271/469 Verilog Tutorial

271/469 Verilog Tutorial 271/469 Verilog Tutorial Prof. Scott Hauck, last revised 8/14/17 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

Course Topics - Outline

Course Topics - Outline Course Topics - Outline Lecture 1 - Introduction Lecture 2 - Lexical conventions Lecture 3 - Data types Lecture 4 - Operators Lecture 5 - Behavioral modeling A Lecture 6 Behavioral modeling B Lecture 7

More information

Constrained Random Data Generation Using SystemVerilog

Constrained Random Data Generation Using SystemVerilog Constrained Random Data Generation Using SystemVerilog Tim Pylant, Cadence Design Systems, Inc. 1 Ideal Stimulus Generation Need a way to generate stimulus without long, manual process Data should be random

More information

Elastic Pipelines: Concurrency Issues

Elastic Pipelines: Concurrency Issues Elastic Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L09-1 Inelastic vs Elastic Pipelines In a Inelastic pipeline: pp typically

More information

CS250 VLSI Systems Design Lecture 4: Chisel Introduction, Part 2. Fall Krste Asanovic, John Wawrzynek with John Lazzaro and Brian Zimmer (TA)

CS250 VLSI Systems Design Lecture 4: Chisel Introduction, Part 2. Fall Krste Asanovic, John Wawrzynek with John Lazzaro and Brian Zimmer (TA) CS250 VLSI Systems Design Lecture 4: Chisel Introduction, Part 2 Fall 2011 Krste Asanovic, John Wawrzynek with John Lazzaro and Brian Zimmer (TA) Chisel was principally designed and created by Jonathan

More information

Synthesis of Combinational and Sequential Circuits with Verilog

Synthesis of Combinational and Sequential Circuits with Verilog Synthesis of Combinational and Sequential Circuits with Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two

More information

Memory System Implementation

Memory System Implementation Memory System Implementation Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology L14-1 Best Wishes from Japan October 25, 2018 MIT 6.004 Fall 2018

More information

D7020E. The dynamic evolution of a system Robust and Energy-Efficient Real-Time Systems. blocked Lecture 2: Components & the Timber language.

D7020E. The dynamic evolution of a system Robust and Energy-Efficient Real-Time Systems. blocked Lecture 2: Components & the Timber language. Recall The dynamic evolution of a system Robust and Energy-Efficient Real-Time Systems with offset asynchronous calls synchronous call T T blocked Lecture 2: Components & the Timber language buffered??

More information

D7020E. Robust and Energy-Efficient Real-Time Systems D7020E. Lecture 2: Components & the Timber language

D7020E. Robust and Energy-Efficient Real-Time Systems D7020E. Lecture 2: Components & the Timber language Robust and Energy-Efficient Real-Time Systems Lecture 2: Components & the Timber language 1 1 Recall The dynamic evolution of a system... with offset asynchronous calls synchronous call T T blocked buffered

More information

CS 360: Programming Languages Lecture 12: More Haskell

CS 360: Programming Languages Lecture 12: More Haskell CS 360: Programming Languages Lecture 12: More Haskell Geoffrey Mainland Drexel University Adapted from Brent Yorgey s course Introduction to Haskell. Section 1 Administrivia Administrivia Homework 5 due

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Branden Ghena University of Michigan Lecture 4: Memory-Mapped I/O, Bus Architectures September 11, 2014 Slides developed in part by Mark Brehob & Prabal

More information

SystemVerilog For Design Second Edition

SystemVerilog For Design Second Edition SystemVerilog For Design Second Edition A Guide to Using SystemVerilog for Hardware Design and Modeling by Stuart Sutherland Simon Davidmann Peter Flake Foreword by Phil Moorby 4y Spri ringer Table of

More information

Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis

Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis Synthesis of Language Constructs 1 Nets Nets declared to be input or output ports are retained Internal nets may be eliminated due to logic optimization User may force a net to exist trireg, tri0, tri1

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Ron Dreslinski University of Michigan Lecture 4: Bit of assembly, Memory-mapped I/O, APB January 16, 2018 1 Admin HW2 Due Thursday. HW1 answers posted as

More information

Bypassing and EHRs. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L23-1

Bypassing and EHRs. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L23-1 Bypassing and EHRs Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L23-1 Bypassing F D RF bypass E/WB Bypassing is a technique to reduce the number of stalls (that is, the number

More information

Programming in the Brave New World of Systems-on-a-chip

Programming in the Brave New World of Systems-on-a-chip Programming in the Brave New World of Systems-on-a-chip Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology The 25th International Workshop on Languages and Compilers

More information

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016 CS 31: Intro to Systems Digital Logic Kevin Webb Swarthmore College February 2, 2016 Reading Quiz Today Hardware basics Machine memory models Digital signals Logic gates Circuits: Borrow some paper if

More information

CSE 140 Lecture 16 System Designs. CK Cheng CSE Dept. UC San Diego

CSE 140 Lecture 16 System Designs. CK Cheng CSE Dept. UC San Diego CSE 140 Lecture 16 System Designs CK Cheng CSE Dept. UC San Diego 1 System Designs Introduction Methodology and Framework Components Specification Implementation 2 Introduction Methodology Approach with

More information