How to install SystemC on Fedora
This may not apply to other Linux distributions.
Because SystemC’s OSCI license restricts the distribution of SystemC™’s sources, Fedora cannot ship the RPM. You can learn more about the effort we’ve put to solve this license issue, but in vain. SystemC is even not compatible with RPMFusion repositories.
This tutorial also points out to some complementary tools that Fedora provides which will make your Electronic System Level(ESL) experience more exciting.
License for SRPM and patches
The following files are all under the MIT feh variant license:
- systemc.spec
- systemc-2.2.0-utils.patch
- systemc-2.2.0-fx_utils.patch
- systemc-2.2.0-fxnum.patch
- systemc-2.2.0-proxy.patch
- systemc-2.2.0-fx_rep.patch
Special thanks to TomCallaway and Red Hat lawyers who helped me during that licensing process.
Advantages of using this tutorial
This tutorial focusses on creating an RPM for systemc. Thus it makes it portable to install on other computers. The RPM is created from the systemc.spec spec file. The spec file applies the respective patches automatically. It also incorporates:
- fixes for the Fedora supported GCC version (F-11: gcc-4.4.0)
- a shared library instead of a static library, with executable-stack rpmlint warning fixed
- proper compilation flags
- parallel installations of different versions of SystemC
The main intention of this tutorial is to spend less time on compiling SystemC, but to get the most of it while using it for ESL design.
Preparing your Fedora box
As root,
# yum install fedora-packager
Install the build requirements:
# yum install gcc-c++ autoconf automake16 prelink
As a normal user (non root),
$ rpmdev-setuptree
(this will create a directory rpmbuild under your home directory)
Building the RPM
As mentioned above, I can not distribute the sources of SystemC. You will have to download it from its website, and copy the sources to the $HOME/rpmbuild/SOURCES.
Download the required files needed to build the RPM from here.
Copy the patches and systemc-SRPM.license to $HOME/rpmbuild/SOURCES.
Copy the spec file to $HOME/rpmbuild/SPECS/systemc.spec.
$ rpmbuild -ba systemc.spec
The generated RPMs are
- systemc-2.2.0-8.fc11.src.rpm (source rpm: SRPM)
- systemc-2.2.0-8.fc11.i586.rpm
- systemc-debuginfo-2.2.0-8.fc11.i586.rpm (debug RPM)
Installing the RPM
# rpm -Uvh systemc-2.2.0-8.fc11.i586.rpm
(as root)
Parallel installations
The generated RPM will automatically install SystemC into the /usr/lib/systemc/2.2.0/ directory(SYSTEMC_HOME).
If you want to install other versions of SystemC, update (on the spec file) the
- %{name} tag to systemc-v1 and
- %{version} tag
This %{version} tag will set the installation directory to /usr/lib/systemc/%{version}. It may happen that the patches will fail if the SystemC version you want is not 2.2.0.
If you are using this installation process, you can therefore determine the installed parallel installations of SystemC with
$ rpm -qa | grep systemc
Complementary tools
Fedora Electronic Lab is not only about shipping EDA tools, but to enhance electronic hardware design. Below are some tools which may be very useful to you.
- Automatic indentation of C files
$ man indent
- Fedora Eclipse IDE with version controlled support
# yum install eclipse-cdt
SVN support: eclipse-subclipse
GIT support: eclipse-egit
- EMAC addons
# yum install emacs-systemc-mode emacs-vregs-mode
- SystemPerl
It is designed to expand text so that needless repetition in the language is minimized. By using sp_preproc, SystemPerl files can be expanded into C++ files at compile time, or expanded in place to make them valid stand-alone SystemC files.
# yum install perl-SystemPerl
If you are using Fedora-Eclipse, eclipse-epic will add Perl support to your eclipse.
# yum install eclipse-epic
- SystemC-Vregs
Utility routines used by vregs
# yum install SystemC-Vregs
- Verilator
(coming soon on Fedora)
It compiles Verilog code into C++/SystemC Code.
# yum install verilator
- Automating documentation generation
$ yum install doxygen
$ man doxygen
Soon, Fedora will ship an eclipse plugin for doxygen.
Disclaimer
I personally use this installation process. I don’t represent any company and I don’t have any hard feelings against any company. This installation process works for me and while sharing this with you, I’m hoping you will get a better design experience with Fedora Electronic Lab. However I am not responsible if it does not work for you, but I’ll be glad to hear from you if it didn’t work so that we can fix it.
.
It’s only now that I noticed that you changed address since I was on holiday … I added the wordpress site to the Mauritius Blog List. Cheers
Thanks, yes, I was being spammed on blogger, hence switch to wordpress
What about https://www-asim.lip6.fr/trac/systemcass/ ?
Thanks Samuel,
I’ve created a ticket for it
https://fedorahosted.org/fedora-electronic-lab/ticket/37
Would you like to help us package it please ?
thanks, that was helpful in installing sys-2.2 on fedora 10. But failed to install the scv package (scv-1.0p2-sysc2.2.12jun06.tgz).
Have you tried installing scv lib on Fedora 10 with gcc-4.3.x? Is there anything else I could try?
Thanks in advance,
krishna
——
% ../configure –with-systemc=/usr/lib/systemc/2.2.0
:
% checking “for working C++ compiler”… configure: error: A bad C++ compiler or library or linker found.
Please check your C++ installation.
—-