Coolquest, Inc. Home Products Support About Contact
cbold_logo_gif C++BOLD Example Design: Simple cbold_logo_gif

Design Home <<  File View  >> Class View Output (partial) Parts Library Examples Home

 

// THIS FILE IS IN THE PUBLIC DOMAIN.
// IT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
// NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
// file simple.h:  example simple design file
 
#ifndef _simple_h_                                  // <=== change these lines to match your file name
#define _simple_h_
 
#include "cb_base.h"
#include "cb_shorthand.h"
 
// above:  standard code
// below:  design-specific code
 
// This is the simple design main header file.                               <===
// To adapt this file to your design, see comments that contain this arrow:  <===
// See also simple.cpp and simple_sub.h.                                     <===
 
// file paths, etc.
#define  DESIGN_NAME  "simple"                      // <=== name of design -- used primarily to form file names
//                    dir for all CBOLD output  subdir. for this design   base of file name
#define  OUTPUT_BASE  OUTPUT_PATH DIR_SEP       DESIGN_NAME DIR_SEP       DESIGN_NAME        // concatenation of path and name --> base for output file names
 
// <=== Be sure that directory OUTPUT_BASE exists, otherwise a runtime error will result.
// <=== For the simple design, OUTPUT_BASE is cbold/output/simple.
// <=== To see/change OUTPUT_PATH, see cb_user_pref.h.
 
// misc. header files, if needed
//#include <locale>                                   // <=== example standard header file
 
// header files needed by many subsystems
//#include "decoupling.h"                             // <=== example header file -- be sure the included file's directory is in your compiler's include path
 
// subsystem header files
#include "simple_sub.h"                               // <=== example subsystem header file -- be sure the included file's directory is in your compiler's include path
 
// ************ subsystems ************               // <=== design summary comment
// subsystem           abbreviation
// ------------        ------------
// Simple              SI                             // <=== example subsystem

class CM_Root : public TRootModule {
public:
// root-level module has no ports
 
// ***** member subsystems ***** //
 
  CM_Simple          Simple;                          // <=== example subsystem
 
  virtual void Register() {
    reg( Simple );                                    // <=== example subsystem registration
//  Simple.SetReferenceBase( "SI" );                  // <=== optional setting of reference designator base
  }
 
  virtual void Connect() {
                                                      // <=== make root-level connections here, e.g., connections between interface bundles
    wireall( "VCC"  );                                // <=== example power connections
    wireall( "GND" );
  }
};
 
#endif

 

Design Home <<  File View  >> Class View Output (partial) Parts Library Examples Home

Legal Copyright © 2007 by Coolquest, Inc. Contact