[[tutorial]]

HDCaml tutorial

Remember - HDCaml is embedded into OCaml! This tutorial is a quick introduction into OCaml followed by a presentation of HDCaml main features. It builds heavily upon the OCaml user manual, this OCaml tutorial, David Matuszek’s Notes on OCaml and the Confluence tutorial. Due to the similarities of HDCaml with OCaml and Confluence, some sections have even been directly copied from these sources.

During the tutorial, many code examples will be shown, all of them beginning with the symbol #. You are strongly adviced to TEST them in the interpreter, such that you can follow the explanations easily. All the codes have been tested with version 0.2.9 of HDCaml.

This tutorial has been originally started, written and compiled in July 2006 by Daniel Sánchez Parcerisa, with the very valuable help of Manfred Muecke and Karl Flicker. Please feel free to correct, modify or add as many things as you want in order to improve the tutorial. You can also contact me by email.

Contents

  1. Introduction
  2. Basic elements of the language
    1. Types
    2. Values
    3. Modules
    4. References
    5. Comments
    6. The Unit()
    7. Operators
    8. Functions
    9. Control Structures
    10. Errors and Exceptions
  3. Data types
    1. Integers
    2. Floating point numbers
    3. Booleans
    4. Chars & Strings
    5. Lists
    6. Arrays
    7. Tuples & Records
    8. Functions as types
    9. Signals
    10. Circuits
  4. Logic and hardware design
    1. How to design a circuit using HDCaml
    2. What you can't do
    3. Using recursion to design circuits
    4. Combinational logic
    5. Sequential logic
    6. Output generation
  5. Using the simulator
  6. HDCaml programs from the command line
  tutorial.txt · Last modified: 2006/08/29 05:58
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki