Skip to content

Core library

Lucas Wojciechowski edited this page Nov 8, 2013 · 5 revisions

whdl

  • whdl.series ()
  • whdl.parallel ()
  • whdl.assert (whdl.bit.Bit) -> null

Metaprogramming

  • whdl.getType (T variable) -> T

Bits

  • whdl.Bit ()

  • whdl.on

  • whdl.off

  • whdl.not (whdl.Bit) -> whdl.Bit

  • whdl.xor (whdl.Bit, whdl.Bit) -> whdl.Bit

  • whdl.or (whdl.Bit, whdl.Bit) -> whdl.Bit

  • whdl.and (whdl.Bit, whdl.Bit) -> whdl.Bit

  • whdl.equals (whdl.Bit, whdl.Bit) -> whdl.Boolean

Tuples

  • whdl.Tuple

  • whdl.

Array

  • whdl.Array (whdl.Type, whdl.Integer)
  • whdl.reduce (Array(Type T, width: whdl.Integer width), (T, T) -> T) -> T
  • whdl.map (Array(Type T, width: whdl.Integer width), (T, U)) -> Array(U, width)

Number

  • whdl.Integer (whdl.Bit...width, width: whdl.#whdl.Integer)

  • whdl.Number (whdl.Bit...width, width: whdl.#whdl.Integer, position: whdl.#whdl.Integer)

  • whdl.equals (Number, Number) -> whdl.Boolean

  • whdl.add (Number, Number) -> Number

  • whdl.subtract (Number, Number) -> Number

  • whdl.multiply (Number, Number) -> Number

  • whdl.divide (Number, Number) -> Number

  • whdl.integer_divide (whdl.Integer, whdl.Integer) -> whdl.Integer

  • whdl.modulus (whdl.Integer, whdl.Integer) -> whdl.Integer

  • whdl.power (base: Number, power: Number) -> Number

  • whdl.root (Number, index: whdl.Integer = 2) -> Number

  • whdl.log (Number, base: whdl.Integer = 2) -> Number

  • whdl.gcd (base: whdl.Integer, power: whdl.Integer) -> whdl.Integer

  • whdl.lcm (base: whdl.Integer, power: whdl.Integer) -> whdl.Integer

Recall

  • whdl.recall (T, default: T) -> T

Clock

  • whdl.Clock

  • whdl.count (whdl.Clock, min: whdl.Integer min = 0, max: whdl.Integer max = 2^20, default: whdl.Integer = min) -> whdl.Integer(width: whdl.log(max - min))

  • whdl.divide (whdl.Clock, whdl.Integer) -> whdl.Clock