|
|
 |
FPGA design from scratch. Part 49
I started my company ZooCad Consulting more than one year ago. Now I finally have my website up and running.

Posted at 12:16 pm by svenand
Permalink
SystemC from scratch. Part 3
Our first example
The best way to learn a new tool or language is to look at some examples already available. The SystemC installation includes a number of examples. Let's take a look at one of them. Here is the example directory.

The FIR filter
We will start with the FIR example. But before we do let's find out a little bit more about FIR filter design. Here is a good place to start: http://www.dspguru.com/info/faqs/firfaq.htmFIR (Finite Impulse Response) filters are one of two primary types of digital filters used in Digital Signal Processing (DSP) applications (the other type being IIR). Compared to IIR filters, FIR filters offer the following advantages: - They can easily be designed to be "linear phase" (and usually are). Put simply, linear-phase filters delay the input signal, but don't distort its phase.
- They are simple to implement. On most DSP microprocessors, the FIR calculation can be done by looping a single instruction.
- They are suited to multi-rate applications. By multi-rate, we mean either "decimation" (reducing the sampling rate), "interpolation" (increasing the sampling rate), or both. Whether decimating or interpolating, the use of FIR filters allows some of the calculations to be omitted, thus providing an important computational efficiency. In contrast, if IIR filters are used, each output must be individually calculated, even if it that output will discarded (so the feedback will be incorporated into the filter).
- They have desireable numeric properties. In practice, all DSP filters must be implemented using "finite-precision" arithmetic, that is, a limited number of bits. The use of finite-precision arithmetic in IIR filters can cause significant problems due to the use of feedback, but FIR filters have no feedback, so they can usually be implemented using fewer bits, and the designer has fewer practical problems to solve related to non-ideal arithmetic.
- They can be implemented using fractional arithmetic. Unlike IIR filters, it is always possible to implement a FIR filter using coefficients with magnitude of less than 1.0. (The overall gain of the FIR filter can be adjusted at its output, if desired.) This is an important considertaion when using fixed-point DSP's, because it makes the implementation much simpler.
SystemC FIR exampleThe SystemC example implements the following program structure:

Running a SystemC simulation
We will start by running a complete SystemC simulation to verify that everything is working. First we goto to the FIR simulation directory: -> cd /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/fir We will start by removing all object files: -> rm *.o
Now we can use the makefile that comes with the installation to compile and run the FIR simulation: -> make check Here is the result:
==> make check make fir fir_rtl make[1]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/fir' g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o stimulus.o `test -f 'stimulus.cpp' || echo '../../../../examples/sysc/fir/'`stimulus.cpp g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o display.o `test -f 'display.cpp' || echo '../../../../examples/sysc/fir/'`display.cpp g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o fir.o `test -f 'fir.cpp' || echo '../../../../examples/sysc/fir/'`fir.cpp g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o main.o `test -f 'main.cpp' || echo '../../../../examples/sysc/fir/'`main.cpp g++ -Wall -DSC_INCLUDE_FX -O3 -o fir stimulus.o display.o fir.o main.o -L/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/lib-linux -lsystemc -lm g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o fir_fsm.o `test -f 'fir_fsm.cpp' || echo '../../../../examples/sysc/fir/'`fir_fsm.cpp g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o fir_data.o `test -f 'fir_data.cpp' || echo '../../../../examples/sysc/fir/'`fir_data.cpp g++ -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -I. -I../../../../examples/sysc/fir -I/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include -Wall -DSC_INCLUDE_FX -O3 -c -o main_rtl.o `test -f 'main_rtl.cpp' || echo '../../../../examples/sysc/fir/'`main_rtl.cpp g++ -Wall -DSC_INCLUDE_FX -O3 -o fir_rtl stimulus.o display.o fir_fsm.o fir_data.o main_rtl.o -L/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/lib-linux -lsystemc -lm make[1]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/fir' make check-TESTS make[1]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/fir'
SystemC 2.2.0 --- Jun 8 2008 12:54:47 Copyright (c) 1996-2006 by all Contributors ALL RIGHTS RESERVED Stimuli : 0 at time 9000 Display : 0 at time 10000 Stimuli : 1 at time 19000 Display : -6 at time 20000 Stimuli : 2 at time 29000 Display : -16 at time 30000 Stimuli : 3 at time 39000 Display : -13 at time 40000 Stimuli : 4 at time 49000 Display : 6 at time 50000 Stimuli : 5 at time 59000 Display : 7 at time 60000 Stimuli : 6 at time 69000 Display : -33 at time 70000 Stimuli : 7 at time 79000 Display : -50 at time 80000 Stimuli : 8 at time 89000 Display : 87 at time 90000 Stimuli : 9 at time 99000 Display : 446 at time 100000 Stimuli : 10 at time 109000 Display : 959 at time 110000 Stimuli : 11 at time 119000 Display : 1495 at time 120000 Stimuli : 12 at time 129000 Display : 1990 at time 130000 Stimuli : 13 at time 139000 Display : 2467 at time 140000 Stimuli : 14 at time 149000 Display : 2960 at time 150000 Stimuli : 15 at time 159000 Display : 3466 at time 160000 Stimuli : 16 at time 169000 Display : 3968 at time 170000 Stimuli : 17 at time 179000 Display : 4470 at time 180000 Stimuli : 18 at time 189000 Display : 4972 at time 190000 Stimuli : 19 at time 199000 Display : 5474 at time 200000 Stimuli : 20 at time 209000 Display : 5976 at time 210000 Stimuli : 21 at time 219000 Display : 6478 at time 220000 Stimuli : 22 at time 229000 Display : 6980 at time 230000 Stimuli : 23 at time 239000 Display : 7482 at time 240000 Simulation of 24 items finished at time 240000 SystemC: simulation stopped by user. PASS: fir
Congratulations! We have run our first SystemC simulation.
Posted at 11:21 am by svenand
Permalink
SystemC from scratch. Part 2
Hardware and software platform We will use our Ubuntu Linux installation to run all the SystemC simulations. For more information see Installing Ubuntu 7.04 with VMware.
Downloading SystemC libraries
Before we can download the SystemC C++ class libraries from the OSCI web page we must register as a member. After that we can use the OSCI download page: http://www.systemc.org/downloads/standards/ and download the file systemc-2.2.0.tgz. 
SystemC 2.2 installation
After unzipping and unpacking (tar zxvf systemc-2.2.0.tgz) the downloaded file (systemc-2.2.0.tgz) we have the following file structure.

SystemC documentation In the docs directory we find the following documents: FuncSpec20.pdf IEEE1666_specification License.pdf SystemS_2_1_features.pdf SystemC_2_1_overview.pdf UserGuide20.pdf WhitePaper.pdf Install and configure SystemC We will start by reading the INSTALL file. To build, install and use SystemC we need the GNU c++ compiler (gcc) and the GNU make program (gmake). If you don't have gcc installed on your system use the following command to install everything you need: sudo apt-get install build-essential To install SystemC on a Linux system, do the following steps: 1. Change to the top level directory (systemc-2.2) 2. Create a temporary directory, e.g., > mkdir objdir 3. Change to the temporary directory, e.g.,
> cd objdir 4. Set the following environment variable(s): > set CXX=g++ > export CXX 5. Configure the package for your system. > ../configure While the 'configure' script is running, which takes a few moments, it prints messages to inform you of the features it is checking. It also detects the platform. 6. Compile the package. For an optimized SystemC library, enter: > gmake (or you can use make which is actually the same as gmake in Ubuntu)
For a debug SystemC library, enter: > gmake debug 7. Install the package. > gmake install 8. At this point you may wish to verify the installation by testing the example suite. > gmake check this will compile and run the examples in the subdirectory examples. Let's start to configure the system
> ../configure
checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/config/missing: Unknown `--run' option Try `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/config/missing --help' for more information configure: WARNING: `missing' script is too old or missing checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c configure: creating ./config.status
.......... config.status: creating examples/sysc/2.1/Makefile config.status: creating examples/sysc/2.1/dpipe/Makefile config.status: creating examples/sysc/2.1/forkjoin/Makefile config.status: creating examples/sysc/2.1/reset_signal_is/Makefile config.status: creating examples/sysc/2.1/sc_export/Makefile config.status: creating examples/sysc/2.1/sc_report/Makefile config.status: creating examples/sysc/2.1/scx_barrier/Makefile config.status: creating examples/sysc/2.1/scx_mutex_w_policy/Makefile config.status: creating examples/sysc/2.1/specialized_signals/Makefile config.status: executing depfiles commands
Now let's compile everything. >gmake
Making all in src gmake[1]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src' Making all in sysc gmake[2]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src/sysc' Making all in kernel gmake[3]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src/sysc/kernel' g++ -I. -I. -I../../../../src/sysc/kernel -I../../../../src -Wall -DSC_INCLUDE_FX -O3 -c -o sc_attribute.o `test -f '../../../../src/sysc/kernel/sc_attribute.cpp' || echo '../../../../src/sysc/kernel/'`../../../../src/sysc/kernel/sc_attribute.cpp g++ -I. -I. -I../../../../src/sysc/kernel -I../../../../src -Wall -DSC_INCLUDE_FX -O3 -c -o sc_cor_fiber.o `test -f '../../../../src/sysc/kernel/sc_cor_fiber.cpp' || echo '../../../../src/sysc/kernel/'`../../../../src/sysc/kernel/sc_cor_fiber.cpp g++ -I. -I. -I../../../../src/sysc/kernel -I../../../../src -Wall -DSC_INCLUDE_FX -O3 -c -o sc_cor_pthread.o `test -f '../../../../src/sysc/kernel/sc_cor_pthread.cpp' || echo '../../../../src/sysc/kernel/'`../../../../src/sysc/kernel/sc_cor_pthread.cpp
.........
To compile and run this example type make check gmake[4]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/2.1/specialized_signals' gmake[4]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/2.1' gmake[4]: Nothing to be done for `all-am'. gmake[4]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/2.1' gmake[3]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc/2.1' gmake[3]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc' gmake[3]: Nothing to be done for `all-am'. gmake[3]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc' gmake[2]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples/sysc' Making all in . gmake[2]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples' gmake[2]: Nothing to be done for `all-am'. gmake[2]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples' gmake[1]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/examples' Making all in . gmake[1]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir' gmake[1]: Nothing to be done for `all-am'. gmake[1]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir'
> and last we install everything.
>gmake install
Making install in src gmake[1]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src' Making install in sysc gmake[2]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src/sysc' Making install in kernel gmake[3]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src/sysc/kernel' gmake[4]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir/src/sysc/kernel' gmake[4]: Nothing to be done for `install-exec-am'. /bin/sh ../../../../config/mkinstalldirs /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include/sysc/kernel mkdir /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include mkdir /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include/sysc mkdir /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include/sysc/kernel for file in sc_attribute.h sc_boost.h sc_cmnhdr.h sc_constants.h sc_cor.h sc_dynamic_processes.h sc_event.h sc_except.h sc_externs.h sc_join.h sc_kernel_ids.h sc_macros.h sc_module.h sc_module_name.h sc_object.h sc_process.h sc_process_handle.h sc_reset.h sc_runnable.h sc_sensitive.h sc_spawn.h sc_spawn_options.h sc_simcontext.h sc_time.h sc_ver.h sc_wait.h sc_wait_cthread.h ; do /usr/bin/install -c -m 644 ../../../../src/sysc/kernel/$file /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/include/sysc/kernel/$file; done
.............................
Making install in . gmake[1]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir' gmake[2]: Entering directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir' gmake[2]: Nothing to be done for `install-exec-am'. for file in AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README RELEASENOTES docs; do d=..; if test -d $d/$file; then test -d /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/$file || cp -pr $d/$file /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0 || :; else test -f /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/$file || cp -p $d/$file /home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/$file || :; fi; done gmake[2]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir' gmake[1]: Leaving directory `/home/svenand/root/projects/SystemC/libraries/systemc-2.2.0/objdir'
To compile and run all examples we execute the following command:
> gmake check
We are now ready to start exploring all features of SystemC. We will do that by looking closer to some of the examples that came with the installation.
Posted at 12:22 pm by svenand
Permalink
SystemC from scratch. Part 1
I have been struggling with Verilog and VHDL for more than 15 years. It is time to take a step up on the abstraction ladder. You are welcome to join me, I have decided to learn SystemC.

SystemC
SystemC is a single, unified design and verification language that expresses architectural and other system-level attributes in the form of open-source C++ classes. It enables design and verification at the system level, independent of any detailed hardware and software implementation, as well as enabling co-verification with RTL design. This higher level of abstraction enables considerably faster, more productive architectural trade-off analysis, design, and redesign than is possible at the more detailed RT level. Furthermore, verification of system architecture and other system-level attributes is orders of magnitude faster than that at the pin-accurate, timing-accurate RT level.
More information can be found here: http://www.systemc.org C++
C or C++ are the language choice for software algorithm and interface specifications because they provide the control and data abstractions necessary to develop compact and efficient system descriptions. Most designers are familiar with these languages and the large number of development tools associated with them. The SystemC Class Library provides the necessary constructs to model system architecture including hardware timing, concurrency, and reactive behavior that are missing in standard C++. Adding these constructs to C would require proprietary extensions to the language, which is not an acceptable solution for the industry. The C++ object-oriented programming language provides the ability to extend the language through classes, without adding new syntactic constructs. SystemC provides these necessary classes and allows designers to continue to use the familiar C++ language and development tools.
Starting from scratch
I hope you are not to confused after reading this text. We will start from scratch and use as many examples as possible to illustrate all the features of SystemC. I have done some C programming but I have no experience from C++ or SystemC, I promise you. But first some history.
SystemC evolution
The SystemC Class Library has been developed to support system level design. It runs on both PC and UNIX platforms, and is freely downloadable from the web.
The class library is being released in stages. The first stage, release 1.0 (presently at version 1.0.2) provides all the necessary modelling facilities to describe systems similar to those which can be described using a hardware description language, such as VHDL. Version 1.0 provides a simulation kernel, data types appropriate for fixed point arithmetic, communication channels which behave like pieces of wire (signals), and modules to break down a design into smaller parts.
In Release 2.0 (presently at version 2.2.0), the class library has been extensively re-written to provide an upgrade path into true system level design. Features that were "built-in" to version 1.0, such as signals, are now built upon an underlying structure of channels, interfaces, and ports. Events have been provided as a primitive means of triggering behaviour, together with a set of primitive channels such as FIFO and mutex. Version 2.0 allows much more powerful modeling to be achieved by modeling at the level of transactions.
Version 2.1 added a number of features including the ability to spawn processes after simulation has started, and extra callbacks into the operation of the simulation kernel. In 2005 the language was standardized as IEEE 1666-2005. Version 2.2 of the reference implementation of the class library is currently available and has been updated to comply with the IEEE standard.
In future, Version 3.0 of the class library will be extended to cover modeling of operating systems, to support the development of models of embedded software. It is also possible to provide additional libraries to support a particular design methodology. Examples of this include the SystemC Verification Library (SCV). The SystemC Class Library has been developed by a group of companies forming the Open SystemC Initiative (OSCI). For more information, and to download the freely available source code, visit OSCI.
Tutorials
Esperan http://www.esperan.com/pdf/Esperan_SystemC_tutorial.pdf Doulos http://www.doulos.com/knowhow/systemc/tutorial/ ASIC World http://www.asic-world.com/systemc/tutorial.html HT-Lab http://www.ht-lab.com/howto/vh2sc_tut/vh2sc_tut.html Electrosoft http://electrosofts.com/systemc/index.html SCLive http://sclive.wordpress.com/2008/01/10/systemc-tutorial-threads-methods-and-sc_spawn/
Books
• Bhasker, Jayram. A SystemC Primer. Star Galaxy Publishing, 2002. • Grotker, Thorsten, Stan Liao, Grant Martin, and Stuart Swan. System Design with SystemC. Kluwer Academic Publishers, 2002. • SystemC Golden Reference Guide. Doulos, 2002. • SystemC 2.2 Library. This document is available at http://www.systemc.org of the Open SystemC Initiative (OSCI). • IEEE Standard SystemC Language Reference Manual. This document is also available at http://www.systemc.org of the Open SystemC Initiative (OSCI).
More books can be found at Amazon.
This was all for to today. I'll be back.
Posted at 10:51 pm by svenand
Permalink
Bed and Breakfast 4trappor
There is more to life than ASIC and FPGA design. That's why me and my wife have opened a bed and breakfast accommodation in the house where we live. The house is over 100 years old and is located in Södermalm close to the heart of Stockholm. Find out more here.

Posted at 03:15 pm by svenand
Permalink
FPGA design from scratch. Part 48
One day before Christmas a guy from DHL knocked on my door and handed me a parcel from Xilinx. I hadn't order anything from them so I was a bit surprised. I opened the box and found a new development board. Then I realized it was a present from Xilinx. It gave me the idea to continue this story and this time we are going to learn more about the XtremeDSP Spartan 3A development board.
The Spartan 3A Starter Platform

The Spartan-3A Starter Platform provides a platform for engineers designing with the Xilinx Spartan-3A DSP FPGA. The board provides the necessary hardware to not only evaluate the advanced features of the Spartan-3A DSP but also to implement complete user applications using peripherals on the Spartan-3A DSP Starter Platform and/or EXP modules plugged into EXP expansion connectors on the Spartan-3A DSP Starter Platform.
EXP connectors
The new EXP specification defines a versatile expansion interface to FPGA baseboards, allowing designers to add application-specific daughter cards and easily connect to the FPGA I/Os. With an EXP-enabled board, you can add functions from a growing list of off-the-shelf EXP modules or you can focus your efforts on building your own add-on module(s) while leveraging the existing baseboard functions. The EXP specification was developed exclusively for the unique requirements of FPGA development boards.
Posted at 10:35 pm by svenand
Permalink
Tour skating in Sweden and around the world
What's New
2009-03-06 Bothnialoppet will take place Saturday the 7th March.
2009-02-11 Vikingarännet will take place on Sunday the 15th February.
2009-01-04 The winter is here. Today it is -12 C outside my window. All the lakes around Stockholm are now covered with thick ice. Yesterday I made a skating tour together with SSSK from Skarholmen Uppsala to Sigtuna. Here is the tour track recorded on my Garmin Forerunner 301.
2008-04-19 Let's forget this winter a look forward to the next winter. Hopefully much colder and much more ice.
Wild skating on frozen water around Stockholm
Every winter hundreds of lakes around Stockholm will freeze and if there is no snow on the ice this is a perfect surface for skating. February 10th, 2007 was one of those days. The last week had been cold, below -10 C most of the time and no snow had fallen. On Friday evening I called and listened to the answering machine at SSSK (Stockholms Skridskoseglarklubb) to find out about the ice conditions. It said that Lake Mälaren had frozen and that the ice looked like a mirror. You can also find out about ice conditions and coming tours from Isnytt (SSSK members only).

Every weekend during the winter if there is skateable ice, SSSK will arrange tours to the best places for skating around Stockholm. Many times you can use public transportation to get you to the starting point and home from the finish point. When skating in more remote places they will arrange bus transportation. These tours are only open to members but you can join as guest if know someone who is a member.
SSSK
Stockholms skridskoseglarklubb, SSSK, founded in 1901, is the largest and oldest skating association in Scandinavia and the largest skating organization outside The Netherlands. It has about 13,000 members. In the beginning, ice skate sailing dominated, but today tour skating is the main activity. Here is more information about SSSK.
Other tour organizers
You can also go wild skating together with Friskis&Svettis and Friluftsfrämjandet or you can organize a private tour together with friends. Here you will find more tour arrangements.
Wild skating
Wild skating on ice (also called trip skating, tour skating, long-distance skating or Nordic skating, in Swedish "långfärdsskridskoåkning") is now a popular sport in Sweden. Maybe the best conditions in the world are those found around Stockholm with a considerable number of both large and small lakes plus the extensive nearby archipelago in the Baltic Sea. The smallest lakes may freeze normally in November, although the main season usually starts in December and lasts until March or April. Snow is not a major problem in this part of Sweden because in cold periods there are often areas of unfrozen water that can still freeze, and in mild periods the snow melts down to slush in the daytime and freezes to ice during the night. Watch this video (Ice is nice) to find out what it is all about.
Links
I have collected a number of links to informations about wild skating. Photos films and videos
Here are links showing you the beauty of wild skating.
Tour day
Saturday morning at 9 am all the tour skaters meet at Centralen to take a commuter train to Kungsängen a suburb North West of Stockholm close to Lake Mälaren. From the train station at Kungsängen there is a short walk to the lake and the ice. At 10 am there are about 185 people on the ice getting ready for the tour. Now it's time to decide which group to join. You can choose between 5 groups. Group 1 is for the strongest and fittest skaters. They will cover more than 100km during one day. I went for group 3 and we gather around our tour leader for a last safety check before we leave. We are 16 expectant skaters in my group. Before we start our tour let's talk about safety.
Before you can join SSSK as a member you have to attend the "Welcome Program" where you will be introduced to SSSK and learn about ice conditions and how to skate safely. You will have two mentors (old members) who will introduce you to the club and follow you on the first tours. In this program you also have to jump in to the icy water and get out of the cut out hole using your ice claws.
Skating on natural ice is risky and safety issues are of great importance. The golden rules are never skate alone, never skate without at least one person in the group with proper experience, and never skate without safety equipment.
Safety Equipment
Safety equipment you always should have with you: - A floating aid. A backpack with spare clothes in waterproof bags. The backpack should have a waist belt.
- A complete set of spare clothes. In case the ice breaks and you end up in the water.
- Ice claws or ice-prods (Swedish "isdubbar"). These are a pair of screwdriver-like spikes. They are used to get a good grip when pulling yourself back on to the ice and they should be fastened high around your neck and secured with lines to prevent loss.
- A whistle to attract attention.
- An ice-pike (Swedish "ispik"). Used to check if the ice is strong enough. It looks like a heavy ski stick. Usually comes in pair and can also be used as poles when you need extra support.
- A rescue rope in a weighted throwing bag (Swedish "räddningslina"). Very useful in helping to pull people out of the water.
- To prevent injuries when falling it is also good to wear a helmet, knee and elbow protection.
After we passed the safety check the group is ready to skate out on Lake Mälaren.

It is the most perfect day for a skating tour. The temperature is -10 C (14 F) and after a short time the clouds disappear and the sun shines over a mirrorlike ice field that never seems to end. The only sound you hear is the ritsch-ratsch from skates moving forward at a speed of 20 km/h (12.5 miles/h) almost without effort.
The tour leader is always in front of the group. No one is allowed to skate ahead of her/him. She or he has to decide when the ice is not safe and if we have to take another route or maybe take off the skates and walk on land. Before you can be a tour leader you have to have many years experience and take part in the tour leader courses. The tour leader is recognized by the red SSSK flag.
After two hours of skating it is time for a lunch break. We find a sunny place along the shore and unpack our lunch packages. This is the best time of the tour, relaxing in the sunshine with hot coffee and some good sandwiches together with a group of people you enjoy.

Tour description
Here is the tour description taken from the tour report:
Straight cross Görväln towards and through Klintsundet South of Landholmen. Crossing Näsfjärden aiming for Rönnskär, thereafter Broknapparna, and then Lagnö reaching Ormudden - turned back - over to the other side, short walk at Färjudden to pass Ormsundet - towards Smidö, walk over Granudden to Smidösundet - first break at Lagnö before Måskär - continuing along Smidö West side - to Gullhäll, 300 m walk - East of Svalgarn - big circle North of Fagerön - then returning the same way but only a 100 m walk at Gullhäll this time - second break at Ringudden, Smidö. At Ormsundet continuing South and rounding Dävensö via Skeppsbackasundet and Norrsundet - Näsfjärden - Älghorn - Lövstafjärden - North Lambarön and finishing at Hässelby Strand. The tour took a full day and the sun starts to set before we reach our final aim, Hässelby Strand from where we can take the Metro back to Stockholm City. There is always someone in the group carrying a GPS receiver to record the tour and measure the exact distance covered. The tour started at 10:10 AM and finished at 16:30 PM and was 72 km (48 miles) long and it was one of my best skating tours ever.

Tour report
Already the same evening you can read the tour report written by the tour leader on your computer. Login to SSSKs member pages and click "Färdrapporter" and find your tour (Tokfina ytor på norra N Björkfjärden). There you will also find the tour track downloaded from one of the GPS receivers. One week later the tour report is open for non-members to read. Here are some photos from the tour. Show tour track in Google Earth (you must have Google Earth installed in your computer).
Top A look at the equipment you need
First of all, a pair of skates. Touring skates (or Nordic skates) are long blades that can be attached, via bindings, to hiking or cross-country ski boots and are used for tour skating or long distance skating on natural ice. The blades are approximately 50 cm long with a radius of curvature (or rocker) of about 25 m. The blades are about 1 mm wide, with a flat cross-section. The length of the blades makes touring skates more stable on uneven natural ice than skates with shorter blades. Since tour skating often involves walking between lakes or around unskateable sections, the fact that the blades can be easily removed from one's boots is an asset. Although mainly used for non-competitive touring, touring skates are sometimes used in marathon speed skating races on natural ice (from Wikipedia). There are two different systems to choose from, skates with a loose heel and skates with a fixed heel. I have been skating for more than 25 years using skates with a fixed heel but after talking to people who switched to loose heel I will buy a new pair of skates with a loose heel. The loose heel skates uses the same type of binding as used on skis; Salomon or Rottefella.

Here are some manufacturer of skates. Manufacturer of bindings. The boots must fit to the skates. For loose heel skates you use one type of boots and for fixed heel skates you use another type of boot.

Manufacturer of boots

The backpack acts as a lifejacket, and so needs to be firmly attached to your body by a waistbelt and leg straps, and gets its bouyancy from the sealed bags that contain the dry clothes. It should also have an outside pocket where the rescue rope can be easily reached in case of an emergency situation. Here is a list of things you should pack (in Swedish).
Manufacturer of backpacks
Safety equipmentIce claws Rescue rope Ice-pikes (pair)

Whistle Knee/elbow pads Wrist protection Helmet
Fully equipped
Hello, here I am fully equipped and ready for a wild skating tour. Let's go through my equipment, starting from the top.
A helmet to protect my head from injuries when falling. Will also keep my head warm.
Ice claws around my neck as high up as possible, easy to grab when in water.
A whistle attached to the ice claws. Easy to find.
A carabiner (snap hook) attached to the rescue rope, placed on my shoulder so it can be easily found. Will be used to secure the rescue rope I will receive from my friends on the ice when I am in the water.
 Elbow pads.
The yellow rescue rope is fixed to waist belt of the backpack. A pair of ice-pikes. Used to check if the ice is strong enough. Can also be used as poles when I need extra support. Knee pads. I use the same equipment when doing inline skating.
Boots and skates.

A backpack firmly attached to my body with a waist belt and leg straps.
The rescue rope throwing bag placed in an open pocket of the backpack, easy to find and easy to throw to my friends on the ice trying to rescue me.
SSSK equipment guidelines (in Swedish).
Where to skate
In the winter time there are frozen waters all over Sweden. You can use the SSSK atlas to find a water close to where you are. There is no guarantee the ice is skateable, it can be covered by half a meter of snow but at least you know where to look. It is all in Swdish but it is easy to understand and you can show it all in Google Earth. Here is a link to Mälardalens Isguide from an article in Utemagasinet. The book På skridskor i östra Svealand describes 75 tours in a radius of 150 km around Stockholm. Even when all lakes are covered with deep snow you can go skating on all the plowed tracks around Stockholm.
Ice reporting
How can you find out where there is skateable ice. Here are a few places to look. Worlds's longest plowed wild skating track
Every winter the 80 km (50 miles) wild skating race Vikingarännet will take place between Uppsala and Stockholm (map). The start is in Skarholmen at Lake Ekoln just south of Uppsala. The finish changes depending of the ice conditions. One year it can be Hässelby, the next year Rålambshovsparken downtown Stockholm and yet another year Kungsängen. More than 2000 skaters will participate every year and they come from all over the world.
A part of this track (Vikingaslingan 60 km) will be plowed the whole winter as long as the ice is at least 15 cm thick. You can choose to start in Hässelby and skate north or start in Uppsala and skate south, it all depends on the wind. You don't have to skate the whole distance, you can stop in Sigtuna, a small cosy town where you can have a cup of hot chocolate at Tant Bruns Kaffestuga and then take the bus back to Stockholm or Uppsala
Here is the history of Vikingarännet.
To know where you are
When skating on large lakes or in the Stockholm archipelago you need to bring a map and a compass. If you don't know the area you can easily get lost among all islands and narrow passages. The weather can change fast and a snow storm or fog can make it impossible to find the way without a compass or GPS.
 SSSK's anniversary map (1:50 000) is a set of twelve maps covering Eastern Svealand with Lake Mälaren and the Stockholm archipelago. It is printed on synthetic paper (Tyvek) and is 100% water resistent and can be folded 1000 times without falling a part.
The Green map (Gröna kartan 1:50 000) covers all of Sweden and can be bought in book stores and in outdoor equipment stores. Lantmäteriverket is responsible for printing all the official maps in Sweden. Here you can find out which one of the 625 maps you need.
Here are links to places where you can find maps.
Skate maintenance
For a good skating experience it is important to have sharp blades on your skates. At least once a year you should have them sharpened by a professional skate sharpener. But in between you can sharpened the blades yourself using the proper sharpening stone. You can also use a hand-held Skatemate or Gnidde for a quick sharpening before you start the tour. Here is description on how to use Gnidde.
More information
Photo: Sture Homström
You are invited
Write about a subject I missed or add more information to subjects already written about. All contributions are welcomed.

Sven-Åke Andersson
Top
Posted at 08:31 am by svenand
Permalink
FPGA design from scratch. Part 47
EDK 9.2i has been released
I got an email from Xilinx:
Dear Valued Customer,
Thank you for choosing the Xilinx Embedded Development Kit (EDK) as your embedded hardware and software development solution for Virtex(tm)-5, Virtex-4, Virtex-II Pro and Spartan(tm) Series PowerPC(tm) and MicroBlaze(tm) processing systems. Your Xilinx EDK 9.2i software is now available for download!*
The Xilinx EDK software is built from much the same core technology as the industry's favorite FPGA design environment, Xilinx ISE(™). The graphical user interface for EDK, DesignVision Award winning Xilinx Platform Studio(tm)(XPS), is the technology that integrates all the processes from design entry to debug and verification, helping you quickly get started with your embedded designs.
Please be aware that EDK 9.2i requires a valid installation of ISE 9.2i, including ISE Service Pack 2, to function properly.
To download your software update, select the following link and use your Xilinx login to access your personalized Xilinx Electronic Fulfillment (XEF) site:
http://www.xilinx.com/xlnx/xil_entry2.jsp?sMode=login&group=esd_oms
What is new in this release
Xilinx Platform Studio (XPS) Enhancements
This release includes the following XPS enhancements: • Higher-performance processing systems due to: o New optimized processor bus infrastructure based on CoreConnect PLB v4.6. o Integration of MultiPort Memory Controller (MPMC3), complete with XPS configuration wizard,to easily configure high-performance memory interfaces. o MicroBlaze version 7, which supports the optional Memory Management Unit (MMU). o Updated processor IP catalog containing 50 new or redesigned IP cores, with IP optimized for new PLB v4.6 interconnect. • Full-access support for Spartan-3A, Spartan-3AN, and Spartan-3A DSP. • 64-bit Linux support. • EDK project file (.xmp) support in ISE. An .xmp file can now be the top-level source file in ISE. • Simpler Clock Generation. • Improved timing on reset signals in embedded design. • Support for 3rd party text editors. • Multi-processor support with mutex and mailbox pcores.
Software Development Kit Improvements
This release includes the following improvements to Platform Studio SDK: • Xilkernel support for run-time memory protection on MicroBlaze using the MMU • 64-bit Linux Support • Support for Remote Debug • Support for Initialization of Debug Session with Data files • Support for Watchpoints • MicroBlaze GNU tools have been upgraded to new versions as follows: o GCC upgraded from 3.4.1 to 4.1.1 o GDB upgraded from 5.3 to 6.5 o Support for new MicroBlaze floating point instructions and MMU instructions o GCC support for DWARF2 debug format
Let's install EDK 9.2i
Before we can start to install EDK 9.2i we should have already installed ISE 9.2i. We must always use the same version of ISE and EDK.

We click on the link EDK 9.2i - Embedded Development Kit (All Platforms) to start the download. The EDK92.zip file is almost 1.5Gb.

Read part 14 for more information about installing EDK.

Running EDK 9.2i
This wizard will help us upgrade the cores and drivers in our project.

We have to go through a number of updates.


Some of the new cores are not compatible with the older versions we are using. We will not update to these new versions.

The software device drivers have also been updated.

After we upgraded everything the ETC_system.mhs and ETC-system.mss files will be modified.

We are are ready to use EDK 9.2
When we start the bitstream generation the following error occurs:
At Local date and time: Wed Nov 7 17:55:10 2007 make -f ETC_system.make bits started... ********************************************* Running Xilinx Implementation tools.. ********************************************* xilperl /home/svenand/cad/edk92i/data/fpga_impl/manage_fastruntime_opt.pl -reduce_fanout no xilperl: error while loading shared libraries: libdb-4.1.so: cannot open shared object file: No such file or directory make: *** [__xps/ETC_system_routed] Error 127 Done!
We are missing the libdb-4.1.so library. The easy fix is to link to the libdb-4.2.so library.
sudo ln -s /usr/lib/lib-4.2.so /usr/lib/libdb-4.1.so
Top Next Previous
Posted at 10:12 pm by svenand
Permalink
After more than one year of playing around with this blog I have got a real job. I have started to work for a company called ORSoC.
ORSoC is an electronic development company. We are specialized in FPGA/ASIC development and SoC (System on Chip) design based on open source, license free IPs. This technology offers many important advantages to developers – cost reduction is just one of many.
One of the fundamental IPs within the technology is the 32 bits RISC processor, the OR1200, which is very similar to the ARM9. The technology offers over 400 different IPs, including peripherals, crypto, processors, arithmetic IPs, etc.
Based on the technology ORSoC may design a unique SoC that includes all functionality required for a special product. In many designs we use a multi processor solution to divide different algorithms to different processors. The flexibility in the technology makes it possible to 100% fulfill the unique requirements for a special product (extreme low power consumption, high performance, accuracy, etc).
Another great advantage with the technology is that the designs are technology independent. You may port it between FPGAs, structured ASICs, standard ASICs. The technology also reduces the "end-of-life problems".
ORSoC are experts within the OpenCores technology, offering turn-key designs and support for the technology. ORSoC has a special design tool to our disposal which guaranties reliable and flexible design as well as very rapid development cycles.
Posted at 02:38 pm by svenand
Permalink
|