Reference 1
Reference 1 Connectable The Connectable type class defines the module mkConnection, which is used to connect a pair of related types. typeclass Connectable#(type a, type b); module mkConnection#(a x1, b x2)(Empty); endtypeclass Instances of typeclass to be connectable Get and Put instance Connectable#(Get#(a), Put#(a)); One put and another will get the element. Tuples instance Connectable#(Tuple2#(a, c), Tuple2#(b, d)) provisos (Connectable#(a, b), Connectable#(c, d)); This is used by ClientServer to connect the Get of Client to the Put of the Server and visa-versa.
Reference 1 Strong, static type-checking. Every variable and every expression in BSV has a type. Convention: first char uppercase. (except for int and bit for backward compatibility with Verilog) Type expression Type expression/paramterized types: X#(t1,…,tn). X is the type constructor and x1,…,xn are parameters of X. // Type Expression Examples Tuple2#(int, Bool) // pair of items, an int and a Bool Tuple3#(int, Bool, String) List#(Bool) List#(List#(Bool)) RegFile#(Integer, String) //paraeter can be natural numbers (numeric types) Bit#(16) // 16-bit wide bit-vector (16 is a numeric type) bit[15:0] // synonym for Bit#(16) Vector#(16, Int#(29)) // Vector of size 16, containing Int#(29)'s bit[m:n] –> n must be 0.
Reference 1 Type classes (overloading groups) and provisos predefined type classes: Bits, Eq. reference ↩
Reference 1 Overview Modules and interfaces form the heart of BSV. Modules and interfaces turn into actual hardware. An interface for a module m mediates between m and other, external modules that use the facilities of m, i.e. clients of m. Module definition vs instantiation A single module definition of a FIFO, and multiple instantiations of this FIFOs in a design. Pure hierarchy. In a module definition, mkM, one can specify instantiations of other modules.
The TLM library package allows users to create bus-based protocol-independent designs. This package is provided as part of the Bluespec Foundation library, and is available to all users 1. FoundationIP Lib ↩
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?