Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages | Examples

acsim.c File Reference

The ArchC pre-processor. More...

#include "acsim.h"
#include "stdlib.h"
#include "string.h"

Include dependency graph for acsim.c:

Include dependency graph

Go to the source code of this file.

Classes

struct  option_map
 This structure describes one command-line option mapping. More...


Defines

#define PRINT_TRACE   "%strace_file << hex << decode_pc << dec <<\"\\n\";\n"
#define PRINT_DASM   "%sdasmfile << hex << decode_pc << dec << \": \" << *instr << *format <<\"\t\t(\" << instr->get_name() << \",\" << format->get_name() << \")\" <<endl;\n"

Functions

int ExpandInstrBuffer (int index)
 External function that updates the instruction buffer pointer, the quantity and the relative index.

int main (argc, argv) int argc

Variables

int ACABIFlag = 0
 Indicates whether an ABI was provided or not.

int ACDasmFlag = 0
 Indicates whether disassembler option is turned on or not.

int ACDebugFlag = 0
 Indicates whether debugger option is turned on or not.

int ACDecCacheFlag = 1
 Indicates whether the simulator will cache decoded instructions or not.

int ACDelayFlag = 0
 Indicates whether delay option is turned on or not.

int ACDDecoderFlag = 0
 Indicates whether decoder structures are dumped or not.

int ACStatsFlag = 0
 Indicates whether statistics collection is enable or not.

int ACVerboseFlag = 0
 Indicates whether verbose option is turned on or not.

int ACVerifyFlag = 0
 Indicates whether verification option is turned on or not.

int ACVerifyTimedFlag = 0
 Indicates whether verification option is turned on for a timed behavioral model.

int ACEncoderFlag = 0
 Indicates whether encoder tools will be included in the simulator.

int ACGDBIntegrationFlag = 0
 Indicates whether gdb support will be included in the simulator.

char * ACVersion = "1.0.0"
 Stores ArchC version number.

char ACOptions [500]
 Stores ArchC recognized command line options.

char * ACOptions_p = ACOptions
 Pointer used to append options in ACOptions.

char * arch_filename
 Stores ArchC arquitecture file.

int ac_host_endian
 Indicates the endianess of the host machine.

int ac_tgt_endian
 Indicates the endianess of the host machine.

int ac_match_endian
 Indicates whether host and target endianess match on or not.

ac_decoder_full * decoder
ac_sto_listload_device = 0
option_map option_map []
char ** argv


Detailed Description

The ArchC pre-processor.

This file contains functions to control the ArchC to emit the source files that compose the behavioral simulator.

Definition in file acsim.c.


Function Documentation

int ExpandInstrBuffer int  index  ) 
 

External function that updates the instruction buffer pointer, the quantity and the relative index.

Function for decoder that updates the instruction buffer pointer, the bytes quantity available and the old relative index.

Definition at line 138 of file acsim.c.

References AC_ERROR.

int main argc  ,
argv 
 

Main routine of ArchC pre-processor.


Variable Documentation

ac_decoder_full* decoder
 

Decoder object pointer

Definition at line 87 of file acsim.c.

Referenced by DecodeAsInstruction().

ac_sto_list* load_device = 0
 

Storage device used for loading applications

Definition at line 90 of file acsim.c.

struct option_map option_map[]
 

Initial value:

 {
  {"--abi-included"  , "-abi"        ,"Indicate that an ABI for system call emulation was provided." ,"o"},
  {"--disassembler"  , "-dasm"       ,"Dump executing instructions in assembly format (Not completely implemented)." ,"o"},
  {"--debug"         , "-g"          ,"Enable simulation debug features: traces, update logs." ,"o"},
  {"--delay"         , "-dy"          ,"Enable delayed assignments to storage elements." ,"o"},
  {"--dumpdecoder"   , "-dd"         ,"Dump the decoder data structure." ,"o"},
  {"--help"          , "-h"          ,"Display this help message."       , 0},
  
  {"--no-dec-cache"  , "-ndc"        ,"Disable cache of decoded instructions." ,"o"},
  {"--stats"         , "-s"          ,"Enable statistics collection during simulation." ,"o"},
  {"--verbose"       , "-vb"         ,"Display update logs for storage devices during simulation.", "o"},

  
  {"--version"       , "-vrs"        ,"Display ACSIM version.", 0},
  {"--encoder"       , "-enc"        ,"Use encoder tools with the simulator (beta version).", 0},
  {"--gdb-integration", "-gdb"       ,"Enable support for debbuging programs running on the simulator.", 0},
  0
}
This is the table of mappings. Mappings are tried sequentially for each option encountered; the first one that matches, wins.

Definition at line 94 of file acsim.c.


Generated on Thu Jun 24 08:30:06 2004 for ArchC by doxygen 1.3.4