Planet LUG-Jaipur

July 21, 2010

Kapil Acharya (kapzi)

Rise till you fall

I stand on the edge of the shore
Watching the waves gliding by
They rise and fall
As does my mind and fate
They come close to me
And caress my feet slightly
Then  retreat back
They stand all alone
Through their fate
Though they encounter
Many a support at the shore
But they always leave alone
They ask me, why you stand here?
Don’t wait for us waves
To come and hold you
‘coz we can’t do so
Go fall and then stand up
Again on your own
And keep rising till you fall
‘coz otherwise you waste
This life of yours in vain

by kapzi at July 21, 2010 05:04 PM

July 20, 2010

Shakthi Kannan (mbuf)

Computational Fluid Dynamics General Notation System

The Computational Fluid Dynamics General Notation System (CGNS) library is now available in Fedora under the zlib license. Install it using:
  $ yum install cgnslib
It provides a general, portable, and extensible standard for the storage and retrieval of computational fluid dynamics (CFD) analysis data. It consists of a collection of conventions, and free and open software implementing those conventions. It is self-descriptive, machine-independent, well-documented, and administered by an international Steering Committee.

July 20, 2010 01:00 PM

July 01, 2010

Shakthi Kannan (mbuf)

Chalmers Lava2000

Chalmers Lava2000, a hardware description library in Haskell is now available for Fedora. Thanks to Emil Axelsson and Jens Peterson for their feedback, and package review. You can install the same using:
$ sudo yum install ghc-chalmers-lava2000       \
                   ghc-chalmers-lava2000-devel \
                   ghc-chalmers-lava2000-doc
To illustrate a half adder example with the use of the Lava library, create a Test.hs file:
import Lava

halfAdd (a, b) = (sum, carry)
  where
    sum   = xor2 (a, b)
    carry = and2 (a, b)
Load it with ghci (Glasgow Haskell Compiler):
$ ghci Test.hs

GHCi, version 6.12.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 1] Compiling Main             ( Test.hs, interpreted )
Ok, modules loaded: Main.
Test half adder with low, high inputs using:
*Main> simulate halfAdd(low, high)
Loading package syb-0.1.0.2 ... linking ... done.
Loading package base-3.0.3.2 ... linking ... done.
Loading package array-0.3.0.0 ... linking ... done.
Loading package filepath-1.1.0.3 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.3 ... linking ... done.
Loading package unix-2.4.0.0 ... linking ... done.
Loading package directory-1.0.1.0 ... linking ... done.
Loading package process-1.0.1.2 ... linking ... done.
Loading package time-1.1.4 ... linking ... done.
Loading package random-1.0.0.2 ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package chalmers-lava2000-1.1.1 ... linking ... done.
(high,low)
*Main> 
Testing half adder with high, high inputs gives:
*Main> simulate halfAdd(high, high)
(low,high)
You can also generate vhdl file using:
*Main> writeVhdl "halfAdd" halfAdd

Loading package syb-0.1.0.2 ... linking ... done.
Loading package base-3.0.3.2 ... linking ... done.
Loading package array-0.3.0.0 ... linking ... done.
Loading package filepath-1.1.0.4 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.4 ... linking ... done.
Loading package unix-2.4.0.1 ... linking ... done.
Loading package directory-1.0.1.1 ... linking ... done.
Loading package process-1.0.1.2 ... linking ... done.
Loading package time-1.1.4 ... linking ... done.
Loading package random-1.0.0.2 ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package chalmers-lava2000-1.1.1 ... linking ... done.
Writing to file "halfAdd.vhd" ... Done.
Copy /usr/share/chalmers-lava2000-1.1.1/Vhdl/lava.vhd to your project directory, and you can verify the generated halfAdd.vhd with it using ghdl:
$ ghdl -a lava.vhd
$ ghdl -a halfAdd.vhd 
$
You are encouraged to read the "Slightly Revised Tutorial on Lava" by Koen Claessen, and Mary Sheeran for more detailed documentation on using the library.

July 01, 2010 11:00 AM