2010年5月15日 星期六
2009年6月24日 星期三
Installing Snet
1. Install OpenMPI (openmpi-1.3.2)
$> ./configure --prefix=/the/location/you/want --enable-mpi-threads
$> make; make install
2. Install Snet
a. put the following lines in your bash shell
export MPIROOT=where the OpenMPI is located
export SNETBASE=where the snet is located
export LD_LIBRARY_PATH=$MPIROOT/lib:$SNETBASE/lib:$LD_LIBRARY_PATH
export PATH=$MPIROOT/bin:$SNETBASE/bin:$PATH
b. In the $SNETBASE directory, type "./configure; make"
c. In the $SNETBASE/demo/interface/C directory, type "make mpi"
3. Run an example code: factorial_mpi
a. In the $SNETBASE/demo/snets/factorial_mpi/Makefile,
change line 8:
LIBS = -lpthread -lC4SNet -lC4SNetc -lmpich -lsnetmpi -lsnetutil
to
LIBS = -lpthread -lC4SNet -lC4SNetc -lmpi -lsnetmpi -lsnetutil
b. type "make"
c. $> mpirun -n 4 ./factorial
$> ./configure --prefix=/the/location/you/want --enable-mpi-threads
$> make; make install
2. Install Snet
a. put the following lines in your bash shell
export MPIROOT=where the OpenMPI is located
export SNETBASE=where the snet is located
export LD_LIBRARY_PATH=$MPIROOT/lib:$SNETBASE/lib:$LD_LIBRARY_PATH
export PATH=$MPIROOT/bin:$SNETBASE/bin:$PATH
b. In the $SNETBASE directory, type "./configure; make"
c. In the $SNETBASE/demo/interface/C directory, type "make mpi"
3. Run an example code: factorial_mpi
a. In the $SNETBASE/demo/snets/factorial_mpi/Makefile,
change line 8:
LIBS = -lpthread -lC4SNet -lC4SNetc -lmpich -lsnetmpi -lsnetutil
to
LIBS = -lpthread -lC4SNet -lC4SNetc -lmpi -lsnetmpi -lsnetutil
b. type "make"
c. $> mpirun -n 4 ./factorial
2008年11月21日 星期五
Qt Example範例
Example.pro
TEMPLATE += app
CONFIG += qt warn_on
SOURCES += main.cpp form.cpp
HEADERS += form.h ui_Form.h
TARGET = Example
win32:debug:CONFIG += console
INCLUDEPATH += C:\Programs\systemc-2.2.0\src
LIBS += C:\Programs\systemc-2.2.0\msvc71\SystemC\Debug\SystemC.lib
win32 {
QMAKE_CFLAGS_DEBUG -= -MDd
QMAKE_CXXFLAGS_DEBUG -= -MDd
QMAKE_CFLAGS_DEBUG += -MTd -vmg
QMAKE_CXXFLAGS_DEBUG += -MTd -vmg
}
main.cpp
#include <QtGui/QApplication>
#include "form.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Form w;
w.show();
return a.exec();
}
form.cpp
#include "form.h"
//#include "systemc.h"
Form::Form(QWidget *parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
ui.setupUi(this);
ui.horizontalSlider->setRange(0, 130);
ui.spinBox->setRange(0, 130);
connect(ui.spinBox, SIGNAL(valueChanged(int)), ui.horizontalSlider, SLOT(setValue(int)));
connect(ui.horizontalSlider, SIGNAL(valueChanged(int)), ui.spinBox, SLOT(setValue(int)));
ui.spinBox->setValue(35);
}
Form::~Form()
{
}
form.h
#ifndef FORM_H
#define FORM_H
#include <QtGui/QWidget>
#include "ui_Form.h"
class Form : public QWidget
{
Q_OBJECT
public:
Form(QWidget *parent = 0, Qt::WFlags flags = 0);
~Form();
private:
Ui::Form ui;
};
#endif // FORM_H
ui_Form.h
Generated by Qt Designer
Qt + SystemC on VS2005
.pro file
TEMPLATE += app
CONFIG += qt warn_on
SOURCES += main.cpp
TARGET = QtSysC
win32:debug:CONFIG += console
INCLUDEPATH += C:\Programs\systemc-2.2.0\src
LIBS += C:\Programs\systemc-2.2.0\msvc71\SystemC\Debug\SystemC.lib
win32 {
QMAKE_CFLAGS_DEBUG -= -MDd
QMAKE_CXXFLAGS_DEBUG -= -MDd
QMAKE_CFLAGS_DEBUG += -MTd -vmg
QMAKE_CXXFLAGS_DEBUG += -MTd -vmg
}
2008年11月13日 星期四
2008年10月23日 星期四
Installing OpenRisc1k on Fedora8
1. The following tools are important for building the OpenRisc SDK:
3. Type the following commands:
yum -y install autoconf automake bison flex2. Change to the top level directory (binutils-2.16.1)
3. Type the following commands:
mkdir b-bNote: make sure you have created the target directory before installing the package.
cd b-b
../configure --prefix=/cad/or32-uclinux
make all install
2008年10月22日 星期三
Installing Fedora8 on VirtualBox 1.6.6
1. Please install the build and header files for your current Linux kernel.
yum -y install gcc gcc-c++ kernel-devel
訂閱:
文章 (Atom)