User Guide

Who is this for?

This is written for someone who knows basic computer skills and wishes to tryout SystemC, VHDL and Verilog without having to install it. It may take a bit of work, but this distribution makes it really easy.

What is SCLive?

This is a Linux-live distro which allows you to use SystemC, VHDL and Verilog on Linux without having to install anything. It is under 270MB and can be burned to a CD or a USB key. Once you burn it, you can boot off of it and have a great SystemC,VHDL and Verilog based Linux distro, for free and without commitment! It is also possible to run this distro off a USB Flashdrive, by using a very simple script available on the CD for both the Windows and Linux environments. This  distro is based on the original slax 6.x distribution which in turns is based on the slackware distribution.

How good a computer must I have?

The SCLive 3.0 can be used with older or even obsolete hardware.

i486 processor or better is good, both Pentium and AMD should work.
CD-ROM drive, a USB drive, Virtual Machine, or a hard drive to boot from. Using a CD drive or Virtual Machine is best for beginners

BIOS capable of booting from CD-ROM or a floppy drive to use Smart Boot Manager
To load SCLive 3.0 with just text you need 30 MB of RAM. To run KDE, you need 512 MB of RAM on your computer.
A keyboard and PS/2 (mouse with a green connector; standard), or a USB Mouse will be auto-detected by SCLive 3.0.
If you have a serial (COM mouse) it will not be automatically recognized but it is possible to use it with a bit of work.
No hard disk is required.

What is in SCLive version 3.0?

The SCLive version 3.0 has been released. As well as a fully featured Linux environment this new version features:
OSCI SystemC 2.2 beta Simulator
SystemC Verification Library SCV 1.0p2
SystemC Transaction Level Modeling Library TLM 2.0.1
SystemC / C++ tutorial, VHDL Tutorial, Verilog Tutorial
Compiler gcc g++ 3.4.6
Ghdl VHDL Simulator 0.27
Icarus Verilog-0.8
Debugger gdb 6.5
Debugger User Interface ddd 3.3.11
Waveform Viewer gtkwave 3.1.13-1
Editor vim 7.1
Kate 2.5.8
Integrated Development Environment geany 0.17.1
Browser opera 10.x (install script)
Adobe pdf reader 9.x (install script)
Foxit PDF Reader 1.1
Windows Manager KDE 3.5.8

You will find SCLive 3.0 to be a more integrated, complete and slicker distribution with tools that will facilitate SystemC, VHDL and Verilog development (gdb, ddd, icarus, ghdl, kate).

What can this distribution do?

With this distro, you can do many things. You can use SystemC, VHDL and Verilog without any operating system installed. You can evaluate, develop and test SystemC/C++, VHDL and Verilog programs. You are able to surf the web on it if you are connected to the internet. You also can copy the whole CD to RAM which makes the whole thing go even faster.

Intro to Linux

A Brief history including different distros

Linux was started by Linus Torvalds in 1991. It is open-source software which means everybody can see what’s in it, and change it. If you don’t like something and you know what you are doing, you can change it. There are many different versions of Linux. They are called distributions, or distros for short. Each includes the kernel, and a variety of programs chosen by the creator. Distros come in many different shapes and sizes. Some are so small they can fit on a floppy disk. Others are a couple gigabytes large. Some of the more popular distros are Slackware, Mandrake, and Red Hat. Slax is based on Slackware.
Some distros, called Live-CDs, can run from a CD, without the need to be installed to a hard drive. Some of these Live-CDs can also be run from USB Keys. Linux is very flexible, which is why so many people love it.

Window Managers

You may have seen a couple different screenshots of Linux and wondered why some looked so different. That is because different distros use different window managers. A window manager controls the way things look. Some are small, and consume few resources. A few examples of these are Fluxbox, Blackbox, and IceWM. There are a few that are in the middle. One of these is XFCE. Some are very large, and consume many resources. These include KDE and Gnome. The large, heavy ones generally look better, though it is a matter of preference.

How do I get started?

1. Creating the boot media

There are numerous ways to create boot media. The choise of one method over an other is usualy a tradeoff between ease of use and flexibility. We will cover three solutions: LiveCD, Virtualization, Persistant USB stick installation.

Burning a live CD

Once you’ve downloaded the SCLive 3.0 Linux distro, you have to burn it to a CD. The .iso that you download is a copy of what should be on the disc. You can’t just burn it to a disc as a file, as you normally would. To burn ISO files, use your favorite burning software and burn the .iso to the CD by using a special feature in your software. You should be able to find a “Burn image to CD” option or “Burn CD iso image” option. Check the programs help files if you can’t find the option.
If you do not have a CD burning software on your operating system, you can use:

Alternatively you can use the Linux command line :
First find the address of the CD writer :
cdrecord-scanbus

This will show the devices connected to your system.The SCSI address of device is the three numbers in the left most column, say 0,3,0.

Now you can burn the CD with :
cdrecord dev=0.3.0 –v SCLive3xx.iso

Using a Virtual Machine

A more flexible solution for running SCLive 3.0 is to use a virtual machine. Virtualization allows you to run a guest operating system (SCLive 3.0) onto a completely unrelated host operating system; therefore you do not need to use a CD at all. For instance you can run SCLive 3.0 in a separate window under a Windows , MacOS or Linux Operating System.
There are numerous Virtualization software available for free. Some are open source some aren’t. The main ones are VirtualBox, Vmware player / server, Qemu. You can download them from their respective websites and install them on you chosen host OS.
When creating a virtual machine with a virtualization software, we can choose option “Installer disc image file(iso)” and browse the SCLive3xx.iso from downloaded location. After finishing some steps of creating virtual machine, virtual machine started to boot from this SCLive3xx.iso image file. It is an easy way to use SCLive design environment or let say distro without any hardware like CD or USB Flash. Additionaly Virtual machines can be suspended (paused) and resumed wich give them a great advantage over a LiveCD solution. You can have a look at easyvmx: http://www.easyvmx.com/ to create your own configuration files with a web interface.

Using a persistant USB installation

The better alternative to running a LiveCD is to create a persistant installation of SCLive 3.0 onto a USB stick. The benefit of this method is that it has all of the flexibility of a LiveCD and additionally all the changes made (system and data) are kept on the USB stick hence persistant.
To create a persitant installation, Windows and linux scripts are provided in the Live CD image.
The first step consists in extacting the SCLive3xx.iso file and copy it’s content onto your USB stick. To extract the iso file:

Under Windows you can use: 7-zip available at: http://sourceforge.net/projects/sevenzip/

Under Linux you can do:
mkdir mountpoint
sudo mount -o loop SCLive3xx.iso mountpoint
ls mountpoint/
Copy the content of the unpacked SCLive3xx.iso file to the USB stick. The USB stick should be using a FAT filesystem (most likely the default one). When Sclive is copied to your device, you will have a /boot/ and a /slax/ directories there. Only one step is needed to make SCLive 3.0 boot from you USB device. You will have to make DOUBLE SURE (obviously if you overwrite you main disk MBR, you are in trouble) you are selecting the correct devices when prompted by the script! Navigate to the /boot/ directory and run either bootinst.sh script (for Linux) or bootinst.bat (for windows).
The method metioned above will simply install syslinux bootloader to your device MBR.
This should be it, you should now be able to boot your PC directly from the USB stick providing your BIOS allows it.

2. Set up your BIOS to boot from CD/USB

After burning image file on to CD ,you have to enter the BIOS, you need to hit a certain key right away when your computer starts. This key should be found in your manual. Otherwise, you can try common ones such as the Delete key, or F1, F12, or a bunch of other of the Function keys.
Another way of booting from the CD is by using something called Smart Boot Manager. This goes onto a floppy which boots and allows you to choose where to boot from. This is probably the easiest way for a beginner or someone who can’t find out how to enter the BIOS. You can choose to boot the CD through this way. You can download Smart Boot Manager at: http://sourceforge.net/projects/btmgr/
Once you’ve downloaded it, extract it and then use rawrite in Windows/DOS to write to a floppy. In Linux, use the dd command. Insert the boot floppy into your computer and restart. Make sure the SCLive 3.0 CD is in your CD drive and select it from the boot menu.

3. Put the CD in the drive and restart your computer

As your computer starts, (if all goes well), you should have SCLive 3.0  start. When it begins, you will see screen that shows the SCLive 3.0 logo also words at the bottom that say boot. Here, you can wait and the SCLive 3.0 CD will load for you, or you can add extra things to change stuff. For now, since it’s your first time just hit enter or wait 5 seconds. Finally it will get to a screen  that says login.
Type root as the username and toor as the password.This will get you logged in.At time you are running full featured operating system directly from the CD.It is nice, isn’t it? And it can be even nicer.You can start Linux commands from the command line you see on the screen, or you can start graphical user environment KDE:  Type startx .

4. Congratulations!

You’re now running Linux!

How do I…

Shutdown

Quit the KDE windows manager. Once linux has returned to a terminal window type: poweroff

Booting differently

If you want to boot with higher graphics resolutions choose the “Graphic mode” boot option. If you want the distro to load and run faster and have at least 300 MB of RAM you can choose the “Graphic mode, copy to RAM” option.

Mount a USB flashdrive

Mounting a USB Flashdrive is easy.
Typically you will find it automatically mounted in:
/mnt/sda1

If not you can try to mount it dynamically by typing:
mount -rw /dev/sda1 /mnt/sda1

Access a public network folder (samba)

Invoque the konqueror navigator either though the graphical interface or through a command line : konqueror&
Type inside the location bar the text: remote:/
There you should find your samba shares currently available on the network.

Customize SCLive 3.0

One of the greatest features any Slax based distribution (such as SCLive 3.0) is the fact that it is modular That means if it doesn’t have something you want, you can easily add it. These additions are called modules. A module is a something you can create or download which has a .lzm extension. For example, you can add OpenOffice.org or a variety of games which weren’t  included in this SCLive 3.0 CD for size reasons. Many different modules can be found at http://www.slax.org/modules.php .
There are two ways to use a module either loading it in a live session (as you are running SCLive 3.0) or adding it to the ISO file:

Under windows you can use an ISO editor such as doISO available at:
http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/DoISO.shtml

Under Linux you can use  an ISO editor such as ISO Master available at:
http://linux.softpedia.com/get/Desktop-Environment/File-managers/ISO-Master-16676.shtml

Using those tools, add the required modules (.lzm) file inside the directory  /slax/modules .
Once done, recreate the ISO file and burn a new CD with your own customizations!

Alternatively for Linux users you can try slax konfigurator and slax module kreator tools designed to create modules and custom ISO images:
http://kmlinux.fjfi.cvut.cz/~jaryvlad/slaxtools.html

The alternative to creating a new ISO file consists in loading modules dynamically as you are using SCLive 3.0. This is done via the activate command. The command expects one argument which is a full path to the image file you wish to insert  into the live file system. It doesn’t mater where the module is, you can download it while running SCLive 3.0 to /root (root’s home directory) or anywhere else. Lets assume that you have downloaded a module called: piklab.lzm
Now, to load the module, open a console, and type:
activate /root/piklab.lzm

If all goes well, the computer will pause for a second and display no error. To use the program, go to the console and use a command to start it.
Similarly if you want to remove a previously loaded module type:
deactivate piklab.lzm

To start your first customization you can run the included script :
cd /root/scripts
./add_opera_flash_pdf.sh

Make modules

Making modules is really quite easy. However, it can take up some of your valuable time. Sometimes, if you’re lucky, there will already be a Slackware package for the program you want. (Slackware packages end in .tgz) If you find the one you want, download it, and use the command:
tgz2lzm /directory/file.tgz /directory/file.lzm

You now have an module that can be used with the activate command, or by inserting the module into the ISO.
The harder way to make a module is to use the dir2lzm command to do so. This command creates a module from an existing directory. Similarly modules can be unpacked with the command lzm2dir .

Appendix A- Links

Here are a couple links to various places:
www.esperan.com The esperan website from where you can download this ISO file and find numerous tutorials
https://sclive.wordpress.com/ The community supported development site for SCLive
http://sclive.sourceforge.net The sourceforge project home where you can file the different releases.
www.systemc.org The OSCI SystemC website
www.slax.org The Slax website
www.linux-live.org The website for the Linux-Live scripts
www.slackware.org Slax is based on Slackware, created by Patrick Volkerding
www.linuxpackages.net A place to find many .tgz which can be converted to modules
www.linuxquestions.org A great place to ask general Linux questions
www.kernel.org The home of the Linux kernel

Appendix B- Thanks

First of all, Tomas Matejicek, for making Slax, and Dustin Wielenga for creating the original user guide from which this document was derived.
Thanks to Muhammet Mustafa Kaya for his contribution in the creation of the SCLive 3.0 documentation and valuable feedback.

Appendix C- Contact

David Cabanis davidcabanis at gmail dot com – Creator of the SCLive distributions.
Dustin Wielenga dustin32@gmail.com – Original writer of this guide.
Muhammet Mustafa Kaya  mmkaya@gmail.com – Contributor of this guide.
Tomas Matejicek website – Creator of Slax and Linux-Live scripts.

Appendix D– Licenses

Most of the software in SCLive is under one of those 3 Licenses:

BSD:          http://www.opensource.org/licenses/bsd-license.php
Boost:        http://www.opensource.org/licenses/bsl1.0.html
GPL:          http://www.opensource.org/licenses/gpl-2.0.php

Additionally the OSCI simulator has it own license
OSCI:        http://www.systemc.org/about/org_docs/license/

%d bloggers like this: