Current Status

Currently Cyclicity CDL is released in source code only; this was originally a choice, and now is the default mechanism for SourceForge.net, so there we go.

The releases do include build scripts. But it does not include scripts for installing on a Linux or Unix system under /usr/bin or similar locations.

CDL is has been tested under Linux (specifically RedHat 8, although the build scripts are quite agnostic) and under Cygwin. It is used regularly on both Windows and Linux installations.

The source code is C, C++, Makefiles, shell scripts, and PERL scripts, with the GUI (when it is rebuilt) running with Python and Tk.

Editing of the source code is down with Emacs, and outlining is used to improve code readability and accessibility. The coding style is no tabs, 4 spaces per indent; most files include these options for emacs as local editor variables.


Downloading

The best approach is to download the latest file release. This is accessible from the SourceForge file list for the project.Put the tarball anywhere you like.

Untar the tarball; the tarball should contain a single directory. Do this in a working directory. (Note: if you cannot untar a tarball, then CDL is not ready for you)


Building

Go to the directory cyclicity/bin

Under cygwin set an environment variable 'arch' to be 'cygwin'; under Linux, nothing is required (but setting it to 'linux' will not hurt)

Type 'make'

This should build all the libraries and binaries


Testing

To test it a little, run the CDL regression:

Enter cyclicity/cdl_frontend/test, and type 'make'. This will build some models from CDL files into C++, and then compile those C++ files for simulation.

Ensure (i.e. add) the simulation engine is on your dynamic library path. The easiest method for those running csh or tcsh for the shell is to go to the scripts directory and run 'setup'; this adds the correct path to LD_LIBRARY_PATH.

Now type './regress'. This runs a batch simulation of some of the regression tests for the Cyclicity CDL tool, and it produces a summary of the simulations at the end. All should pass.

To be honest, if you get as far as running 'regress', the tests are extremely likely to pass, as the major hurdles will already have been cleared. The main failure reason would be a bad LD_LIBRARY_PATH.


Writing and building CDL models

The release builds binaries in cyclicity/bin, and libraries in cyclicity/lib, either under 'linux' or under 'cygwin', depending on your machine choice.

The first important binary is 'cdl'; this is the CDL compiler, which can produce C++ models, verilog models, or both (or neither). Althoug verilog output does work, at this point (for playing with CDL) the C++ models should be the focus.

Look at some of the sample CDL files, under cycliclity/cdl_frontend/test/tests, preferably in the simple or vector subdirectories.

Take one of these files, and modify it, play with it, whatever; then you can run 'cdl' on it, and that will parse your file. To create a C model you need to tell CDL to do so:

cdl --model new_model --cpp new_model.cpp <file.cdl>

This C++ model can be build with gcc; however, it needs to include files from cyclicity/simulation_engine and from cyclicity/support_libraries, so include those in the build.

Finally (for now), the model has to be linked with the simulation engine code, for simulations to be run, together with a structure that tells the engine which hardware modules to register so that you can use them in a simulation. The best approach to achieving this (for now) is to look more closely at the tests that the cdl_frontend includes. There is a very good basic make file in the cdl_frontend/test/build directory; basically this utilizes a common make file template in the scripts directory, and it allows a simple file of models (the 'model_list' file) to describe what modules need to be built from what kind of sources, and it will build a batch mode simulation which dynamically links with the simulation engine library.

Main links

SourceForge.net Logo

Site map