#!/bin/csh

######################################################################
####                                                              ####
#### File    : SIM.csh                                            ####
#### Date    : January 12 2010                                    ####
#### Version : 1.2                                                ####
#### Author  : Bazargan Pirouz                                    ####
####                                                              ####
#### Origin  : This description has been developed at LIP6        ####
####           University Paris 6 - Pierre et Marie Curie         ####
####           4 Place Jussieu 75252 Paris Cedex 05 - France      ####
####                                                              ####
######################################################################

  source ENV.csh
  echo "==== $1 ===="

  if ! ( -f ../asm/$1.mem ) then
    echo ""
    echo "No memory image available. Run the Assembler on : $1"
    echo ""
    exit
  endif

  sed -e '/=/d' -e 's/ / : /' ../asm/$1.mem > ram.ini
  /users/enseig/pirouz/archi/Linux/bin/simulad -l 1 -p 100  -zerodelay -nocheckdriver -nostrict -bdd -nowarning -nores -silentex pi_cpu pi_cpu
