- Capsim® Text Mode Kernel (TMK) Getting Started.
- Capsim Text Mode User Guide

- Capsim Customization

- Blocks Documentation

- Setup Linux for C/C++ Development and TIFF Image Support
- IIPPlot Interactive Java Plotting Package
- Java Program to Draw Topologies
Getting Started in Capsim® Text Mode Kernel (TMK).
CAPSIM® Text Mode Kernel (TMK) is a hierarchical interactive block diagram simulation and design system for digital signal processing and communications. All Capsim TMK models are written in C with provisions for parameters, input /output buffers, internal state maintenance, and three phases of execution: initialization, run-time and wrap-up. Capsim® Blocks are written in C embedded in XML for modular/re-usable design. Capsim® includes a built in TCL interpreter for support of iterative simulation and design optimization.
Capsim® TMK has been the basis for advanced research projects and undergraduate and graduate courses in communications and signal processing. Capsim® TMK based designs have resulted in the rapid introduction of new products into the market. Start your projects with Capsim TMK's built in models and extensive DSP and communications applications. Then easily incorporate your own custom C models into Capsim® TMK . Capsim® TMK is provided with extensive documentation.
Capsim® TMK has built in IIR and FIR filter design blocks. It also incorporates LMS and fast RLS adaptive filters and block LMS adaptive filters. More and more DSP and communication applications will be added to the Capsim® TMK release. Capsim® models end to end OFDM systems with acquistion, timing recovery, and carrier offset estimation with channel modeling. Capsim® also models MIMO OFDM systems for both closed loop and open loop systems.
Capsim® with its flexible buffer connection management can handle mixed synchronous and asynchronous simulations. One key advantage of Capsim® is that the blocks run at their natural sampling rate using the unique buffer connection architecture.
Note: This repository supports the Text Mode Kernel version of Capsim®. The graphical block diagram is from the soon to be released Capsim® Version 7 which uses Qt® for interactive graphical interface. However, the topology in this Repository are the same. You can use the block names in the screen shot and then use the Capsim® command "to blockname" to go the the block, change parameters and run the simulation. Or directly edit the topology.There is a lot of benefit to the non graphical mode in portability and flexibility. The graphical version also supports the text mode operation.
An updated link to Capsim® Version 7 using Qt® will be provided in the Repostory on GitHub. Stay tuned.
The new model for block C code generation is illustrated below, Blocks are written in embedded C code in XML and transformed to C code and incorporated into Capsim®. The XML code is transformed using XSLT (Extensible Stylesheet Language for Transformation) to C code and HTML for documentation. Tools are provided that automatically do the conversion from XML to C code when adding models to Capsim®. Capsim® was originaly developed by XCAD Corporation. All XCAD Open Source projects have been transferred to and taken over by Silicon DSP Corporation. Silicon DSP Corporation has since 2006 added major enhancements to Capsim® and Capsim® TMK. The predecessor and original model of CAPSIM® was BLOSIM. BLOSIM is a block diagram signal processing simulation program, originally developed at the University of California, Berkeley, 1985. The primary authors were D. G. Messerschmitt and D. J. Hait. For papers on BLOSIM visit this link. Since arrival at NCSU in November 1987, the program has been extensively debugged. Capsim® was completely remodeled, enhanced with new commands, and improved by XCAD Corporation and later by Silicon DSP Corporation. The person-hours spent on this task have made Capsim a vast improvement over the original in user convenience, capability and reliability and the complete elimimation of memory leaks allowing for unlimited simulation runs ( for example for BER in optical links).The latest version changes the block models to full XML support with the capability to transform the C embedded in XML code to C/C++, SystemC, and HTML or stand alone C subroutines. A major enhancement has been the integration of TCL scripting capability where TCL scripts control the blocks in a block diagram and can change parameters and retrieve results from the blocks after a simulation completes.
The principal authors for the enhancements to BLOSIM are Professor Sasan Ardalan formerly with the Dept. of Electrical and Computer Engineering, North Carolina State Univertsity, Raleigh, NC and Jim Faber, Ph.D.
David G. Messerschmitt, "A Tool for Structured Functional Simulation", IEEE Journal on Selected Areas in Communications, Vol. SAC-2, NO.1, January 1984, pp.137-147![]()
![]()
David G. Messerschmitt, "Structured Interconnection of Simulation Programs",1984 IEEE GlobeComm. pp. 808-811 ![]()
![]()
Many features have been added to improve simulation design and run-time efficiency.
- program re-organization, saving 20% on executable size
- improved scheduling algorithm:Before a simulation is run, blocks are "scheduled" or put into an appropriate order of execution by the controller. The new algorithm selects a more efficient ordering.
- improved run-time control of data buffer size. Previously, certain buffers could grow abnormally large, requiring excessive memory usage. Buffer size is now balanced throughout the topology via an improved visitation algorithm.
- data buffer de-allocation, allowing multiple runs. Previously, multiple runs would overflow available memory.
- internal block (both block and hierarchical block) parameter model storage, specification, and definition. This provides consistency checking and prevents run-time errors. Additionally, the block author now specifies parameter default values and definitions.
- parameter broadcast (via "args") is possible even from the highest topology level.
- buffer signals can be named. These signal names are accessible by the block operational code, for printing, labeling, etc, and are displayed for reference.
- Argument numbers may be noncontiguous. However, when stored they become contiguous.
- Plugged all memory leaks so that unlimited size simulations can be run with bounded memory foot print.
CAPSIM® Convenience Improvements
Many features have been added or improved to aid the user in creating, editing and running simulations.
- on-line parameter changes with prompting; automatic type checking and compatibility enforcement for hierarchical block referenced parameters (args).
- on-line help descriptions for all commands.
- on-line review of block/hierarchical block source files.
- command history: repeat/review of previous commands.
- command alias mechanism allows shortened commands.
- new movement command "to": accepts full or partial name for a block or hierarchical block
- change checking: prevents inadvertent exit or re-loading before saving a modification.
- run a simulation from any location in the topology
- improved information display format:block modification status, parameter descriptions, signal names,/hierarchical block argument values and descriptions.
- improved error reporting: full block path names used; complete messages from block errors.
- simplified block creation: automatic instance name, default parameter creation.
- simplified block connection/disconnection: automatic default port numbering.
- re-loading of any sub-topology is possible.
- Buffer growth monitoring. This facility allows the user to monitor the growth of buffers during simulations.
- new command "replace": pin-for-pin block substitution.
- Galaxies(Hierarchical Blocks) can be substituted for blocks, etc. Connections are saved, and parameters are modified automatically.
- new command "insert": put a block into an existing connection.Useful for temporary measurement blocks, etc.
- new command "delete": remove a block, but restore connections.
- Single command to make buffer numbers contiguous.
- Incorporation of TCL interpreter for iterative simulation support and design optimization
- Conversion from AWK to PERL and XSLT.
- Changed block code to embedded C in XML
- Using XSLT to transform block XML to C code
- Development and addition of Open Source Tools for Block Code Generation, and Block Database Maintenance.
- Single make command to add new blocks to Capsim® executable.
This document shows how to install C/C++ development Tools needed to build Capsim.
Author: Sasan Ardalan
Date: December 2018
You will need to be able to run 'sudo' in your Linux environemt.
From a terminal run the following commands:
sudo apt-get update
sudo apt-get install binutils-gold
sudo apt-get install g++ cmake
sudo apt-get install build-essential
sudo apt-get install zlib1g-dev
sudo apt-get install freeglut3-dev
sudo apt-get install glew1.5-dev libglm-dev
sudo apt-get install libtiff-dev
sudo apt-get install zlib1g-dev
sudo apt-get install lzma
Capsim® uses LAPACK via CLAPACK.
Anderson, E. and Bai, Z. and Bischof, C. and Blackford, S. and Demmel, J. and Dongarra, J. and Du Croz, J. and Greenbaum, A. and Hammarling, S. and McKenney, A. and Sorensen, D., LAPACK Users' Guide,Third Edition,Society for Industrial and Applied Mathematics, Philadelphia, PA, ISBN = 0-89871-447-8, 1999
Silicon DSP Corporation
1988-2025