scrc(l)                                                                scrc(l)
 
 
 
NAME
       scrc - SpecC Reference Compiler
 
SYNOPSIS
       scrc -h
 
       scrc design [ command ] [ options ]
 
DESCRIPTION
       scrc  is the compiler for the SpecC language.  The main purpose of scrc
       is to compile a SpecC source program into  an  executable  program  for
       simulation.  Furthermore,  scrc  serves  as a general tool to translate
       SpecC code from various input to various output formats  which  include
       SpecC source text, or compiler intermediate files.
 
       Using  the first command syntax as shown in the synopsis above, a brief
       usage information and the compiler version are printed to standard out-
       put and the program exits.  Using the second command syntax, the speci-
       fied design is compiled. By default, scrc reads a  SpecC  source  file,
       performs  preprocessing  and  builds the internal data structure. Then,
       C++ code is generated, compiled and linked into an executable  file  to
       be  used  for  simulation.  However, the subtasks performed by scrc are
       controlled by the given command so that, for example, only partial com-
       pilation is performed with the specified design.
 
       On  successful  completion,  the  exit value 0 is returned.  In case of
       errors during processing, an error code with a brief diagnostic message
       is  written to standard error and the program execution is aborted with
       the exit value 10.
 
       For preprocessing and C++ compilation, scrc relies on the  availability
       of  an  external  C++ compiler which is used automatically in the back-
       ground. By default, the GNU compiler gcc/g++ is used.
 
ARGUMENTS
       design specifies the name of the design; by default, this name is  used
              as base name for the input file and all output files;
 
COMMAND
       The  command has the format - suffix1 2 suffix2, where suffix1 and suf-
       fix2 specify the format of the main  input  and  output  file,  respec-
       tively.   This  command  also  implies the compilation steps being per-
       formed.  By default, the command -sc2out is used which specifies  read-
       ing  a  SpecC source file (e.g. design.sc) and generating an executable
       file (e.g. a.out) for  simulation.  All  necessary  intermediate  files
       (e.g.  design.cc, design.o) are generated automatically.
 
       Legal command suffixes are:
 
       sc     SpecC source file (default: design.sc)
 
       si     preprocessed SpecC source file (default: design.si)
 
       cc     C++ simulation source file (default: design.cc)
 
       h      C++ simulation header file (default: design.h)
 
       cch    both,  C++  simulation source file and C++ header file (default:
              design.cc and design.h)
 
       o      linker object file (default: design.o)
 
       out    executable file for simulation (default: design)
 
OPTIONS
       -v | -vv | -vvv
              increase the verbosity level so that  all  tasks  performed  are
              logged  to  standard  error  (default:  be  silent); at level 1,
              informative messages for each task performed are  displayed;  at
              level 2, additionally input and output file names are listed; at
              level 3, very detailed information about each executed  task  is
              printed;
 
       -w | -ww | -www
              increase  the warning level so that warning messages are enabled
              (default: warnings are  disabled);  four  levels  are  supported
              ranging from only important warnings (level 1) to pedantic warn-
              ings (level 4); for most cases, warning level 2  is  recommended
              (-ww);
 
       -g     enable  debugging  of the generated simulation code (default: no
              debugging code); this option disables optimization;
 
       -O     enable optimization of the generated simulation  code  (default:
              no optimization); this option disables debugging;
 
       -sl    suppress  source line information (preprocessor directives) when
              generating SpecC or C++ source  code  (default:  include  source
              line directives);
 
       -sn    suppress  all  annotations  when  generating  SpecC  source code
              (default: include annotations);
 
       -st tabulator stepping
              set the tabulator stepping for SpecC/C++ code  generation;  this
              setting  is used for code indentation; a value of 0 will disable
              the indentation of the generated code (default: 4);
 
       -sT system tabulator stepping
              set the system tabulator stepping (\t) for SpecC/C++ code gener-
              ation; if set, tab characters will be used for indentation; if a
              value of 0 is specified, only spaces will be used  for  indenta-
              tion (default: 8);
 
       -sw line wrapping
              set  the  column for line wrapping; in code generation, any line
              longer than this value is subject to line wrapping; if  a  value
              of  0 is specified, no line wrapping will be performed (default:
              70);
 
       -i input file
              specify  the  name  of  the  input  file  explicitly   (default:
              design.suffix1);  the  name  '-'  can be used to specify reading
              from standard input;
 
       -o output file
              specify the name of the final output file  explicitly  (default:
              design.suffix2);  the name '-' can be used to specify writing to
              standard output;
 
       -D     do not  define  any  standard  macros;  by  default,  the  macro
              __SPECC__  is  defined  automatically (it is set to 1); further-
              more, implementation  dependent  macros  may  be  defined;  this
              option suppresses the definition of all these macros;
 
       -Dmacrodef
              define  the preprocessor macro macrodef to be passed to the pre-
              processor;
 
       -U     do not undefine any macros; by default, few macros are undefined
              automatically  (in order to allow C/C++ standard header files to
              be used); this option is implementation dependent;
 
       -Uundef
              undefine the preprocessor macro undef which will  be  passed  to
              the  preprocessor  as  being  undefined; the macro undef will be
              undefined after the definition of all command-line macros;  this
              allows  to selectively suppress macros from being defined in the
              preprocessing stage;
 
       -I     clear the  standard  include  path;  by  default,  the  standard
              include  path  consists of the directory $SPECC/inc; this option
              suppresses the default include path;
 
       -Idir  append dir to the include path (extend the list  of  directories
              to  be searched for including source files); include directories
              are searched in the order of their  specification;  unless  sup-
              pressed by option -I, the standard include path is automatically
              appended to this list; by default,  only  the  standard  include
              directories are searched;
 
       -L     clear  the  standard  library  path;  by  default,  the standard
              library path consists of the directory $SPECC/lib;  this  option
              suppresses the default library path;
 
       -Ldir  append  dir  to the library path (extend the list of directories
              to be searched  for  linker  libraries);  the  library  path  is
              searched in the specified order; unless suppressed by option -L,
              the standard library path  is  automatically  appended  to  this
              list; by default, only the standard library path is searched;
 
       -l     when  linking,  do  not  use any standard libraries; the default
              libraries are displayed when calling the compiler  with  the  -h
              option; the -l option suppresses linking against theses standard
              libraries;
 
       -llib  pass lib as a library to the linker so that  the  executable  is
              linked against lib; libraries are linked in the specified order;
              unless suppressed by option -l, the standard libraries are auto-
              matically  appended  to  this  list;  by  default, only standard
              libraries are used;
 
       -P     reset the import path; clear  the  list  of  directories  to  be
              searched  for importing files; by default, the current directory
              is searched first, followed by  the  standard  import  directory
              $SPECC/import; this option suppresses this standard import path;
 
       -Pdir  append dir to the import path (extend the list of directories to
              be   searched  for  importing  files);  import  directories  are
              searched in the order of their specification; unless  suppressed
              by option -P, the standard search path is automatically appended
              to this list; by default,  only  the  standard  import  path  is
              searched;
 
       -xpp preprocessor_call
              redefine  the  command to be used for calling the C preprocessor
              (default: "g++ -E -x c %p %i -o %o"); in the  specified  string,
              every  occurence  of  %p  will  be  replaced with a preprocessor
              option; additional options will be appended;  also,  %i  and  %o
              will  be replaced automatically with the actual input and output
              filename, respectively;
 
       -xcc compiler_call
              redefine the command to be used for calling the  C/C++  compiler
              (default:  "g++ -c %c %i -o %o"); in the specified string, every
              occurence of %c will be replaced with a compiler  option;  addi-
              tional  options  will  be  appended;  also,  %i  and  %o will be
              replaced automatically with the actual input  and  output  file-
              name, respectively;
 
       -xld linker_call
              redefine the command to be used for calling the linker (default:
              "g++ %i -o %o %l"); in the specified string, every occurence  of
              %l  will  be  replaced  with a linker option; additional options
              will be appended; also, %i and %o will be replaced automatically
              with the actual input and output filename, respectively;
 
       -xp preprocessor_option
              pass  an option directly to the C/C++ preprocessor; for every %p
              in the preprocessor call (see above), an option has to be speci-
              fied (default: none);
 
       -xc compiler_option
              pass  an  option directly to the C/C++ compiler; for every %c in
              the compiler call (see above), an option  has  to  be  specified
              (default: none);
 
       -xl linker_option
              pass  an  option  directly  to  the  linker; for every %l in the
              linker call (see above), an option has to be specified (default:
              none);
 
ENVIRONMENT
       SPECC  is  used  to  determine  the installation directory of the SpecC
              environment  where  SpecC  standard  include  files   (directory
              $SPECC/inc),    SpecC    standard    import   files   (directory
              $SPECC/import),   and   SpecC   system   libraries    (directory
              $SPECC/lib) are located.
 
VERSION
       The SpecC reference compiler scrc is version 2.2.
 
AUTHOR
       Rainer Doemer 
 
COPYRIGHT
       (c) 1997-2014 CECS, University of California, Irvine
 
SEE ALSO
       gcc(1), g++(1),
 
BUGS, LIMITATIONS
       Variables of enumerator type cannot be initialized at the time of their
       declaration. The SpecC compiler issues a (false) error message in  this
       case.   As  a  simple work-around, however, enumerator variables can be
       initialized by use of standard assignment statements at  the  beginning
       of their lifetimes.
 
 
 
                              September 27, 2006                       scrc(l)





Last modification date: Monday, 15-Dec-2014 16:09:09 PST