openfpga/src/base/openfpga_spice_command.cpp
/********************************************************************
 * - Add a command to Shell environment: generate fabric Verilog 
 * - Add associated options 
 * - Add command dependency
 *******************************************************************/
- Add a command to Shell environment: generate fabric Verilog
- Add associated options
- Add command dependency
- Add a command to Shell environment : generate fabric Verilog - Add associated options - Add command dependency
static 
ShellCommandId add_openfpga_write_fabric_spice_command(openfpga::Shell<OpenfpgaContext>& shell,
                                                       const ShellCommandClassId& cmd_class_id,
                                                       const std::vector<ShellCommandId>& dependent_cmds) {
  Command shell_cmd("write_fabric_spice");
  CommandOptionId output_opt = shell_cmd.add_option("file", true, "Specify the output directory for SPICE netlists");
  shell_cmd.set_option_short_name(output_opt, "f");
  shell_cmd.set_option_require_value(output_opt, openfpga::OPT_STRING);
  shell_cmd.add_option("explicit_port_mapping", false, "Use explicit port mapping in Verilog netlists");
  shell_cmd.add_option("verbose", false, "Enable verbose output");
  ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "generate SPICE netlists modeling full FPGA fabric");
  shell.set_command_class(shell_cmd_id, cmd_class_id);
  shell.set_command_execute_function(shell_cmd_id, write_fabric_spice);
  shell.set_command_dependency(shell_cmd_id, dependent_cmds);
  return shell_cmd_id;
}
static ShellCommandId add_openfpga_write_fabric_spice_command ( openfpga :: Shell < OpenfpgaContext > & shell , const ShellCommandClassId & cmd_class_id , const std :: vector < ShellCommandId > & dependent_cmds ) { Command shell_cmd ( " " ) ; CommandOptionId output_opt = shell_cmd . add_option ( " " , true , " " ) ; shell_cmd . set_option_short_name ( output_opt , " " ) ; shell_cmd . set_option_require_value ( output_opt , openfpga :: OPT_STRING ) ; shell_cmd . add_option ( " " , false , " " ) ; shell_cmd . add_option ( " " , false , " " ) ; ShellCommandId shell_cmd_id = shell . add_command ( shell_cmd , " " ) ; shell . set_command_class ( shell_cmd_id , cmd_class_id ) ; shell . set_command_execute_function ( shell_cmd_id , write_fabric_spice ) ; shell . set_command_dependency ( shell_cmd_id , dependent_cmds ) ; return shell_cmd_id ; }
- Add a command to Shell environment: generate fabric Verilog
 - Add associated options
 - Add command dependency
- Add a command to Shell environment : generate fabric Verilog - Add associated options - Add command dependency
/* Add an option '--file' in short '-f'*/ /* Add an option '--explicit_port_mapping' */ /* Add an option '--verbose' */ /* Add command 'write_fabric_spice' to the Shell */ /* Add command dependency to the Shell */