[Bug 546376] Review Request: ghc-chalmers-lava2000 - Haskell hardware description library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=546376

--- Comment #18 from Shakthi Kannan <shakthimaan@xxxxxxxxx> 2010-05-21 22:07:01 EDT ---
Install ghc-chalmers-lava2000-devel package and try the following example with
ghdl:

1. In a working directory, create a file:

=== First.hs ===

import Lava

halfAdd (a, b) = (sum, carry)
  where
    sum   = xor2 (a, b)
    carry = and2 (a, b)

=== END ===

2. Load it with ghci:

  $ ghci First.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             ( First.hs, interpreted )
  Ok, modules loaded: Main.

3. Write the 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.

4. Install ghdl:

  $ sudo yum install ghdl

5. Copy the lava.vhd to the working directory, and then analyze the files with
ghdl:

  $ cp cp /usr/share/doc/ghc-chalmers-lava2000-devel-1.1.1/lava.vhd .
  $ ghdl -a lava.vhd
  $ ghdl -a halfAdd.vhd 
  $

If there are no errors/warnings in the output, it means the output is clean,
and that there are no problems with the entity definitions.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review

[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]