[engine] format
This commit is contained in:
parent
24a174c7a4
commit
f1a317b384
|
@ -1,7 +1,8 @@
|
||||||
|
#include "openfpga_shell.h"
|
||||||
|
|
||||||
|
#include "basic_command.h"
|
||||||
#include "command_echo.h"
|
#include "command_echo.h"
|
||||||
#include "command_parser.h"
|
#include "command_parser.h"
|
||||||
#include "openfpga_shell.h"
|
|
||||||
#include "basic_command.h"
|
|
||||||
#include "openfpga_bitstream_command.h"
|
#include "openfpga_bitstream_command.h"
|
||||||
#include "openfpga_context.h"
|
#include "openfpga_context.h"
|
||||||
#include "openfpga_sdc_command.h"
|
#include "openfpga_sdc_command.h"
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
#include "vpr_command.h"
|
#include "vpr_command.h"
|
||||||
|
|
||||||
OpenfpgaShell::OpenfpgaShell() {
|
OpenfpgaShell::OpenfpgaShell() {
|
||||||
shell_.set_name("OpenFPGA");
|
shell_.set_name("OpenFPGA");
|
||||||
shell_.add_title(create_openfpga_title().c_str());
|
shell_.add_title(create_openfpga_title().c_str());
|
||||||
|
|
||||||
/* Add vpr commands */
|
/* Add vpr commands */
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
#define OPENFPGA_SHELL_H
|
#define OPENFPGA_SHELL_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "shell.h"
|
|
||||||
#include "openfpga_context.h"
|
#include "openfpga_context.h"
|
||||||
|
#include "shell.h"
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* This is a shell class built on top of the general-purpose shell
|
* This is a shell class built on top of the general-purpose shell
|
||||||
|
@ -12,30 +13,35 @@
|
||||||
* - It includes all the commands available in OpenFPGA
|
* - It includes all the commands available in OpenFPGA
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
class OpenfpgaShell {
|
class OpenfpgaShell {
|
||||||
public: /* Contructors */
|
public: /* Contructors */
|
||||||
OpenfpgaShell();
|
OpenfpgaShell();
|
||||||
public: /* Mutators */
|
|
||||||
/* Execute a specific command with options in a line, which is available in the shell
|
|
||||||
* Note that running a command will be based on the current status of data storage.
|
|
||||||
* The data storage is impacted by previous commands that have been run.
|
|
||||||
* If you want a clear start, please call API reset() before running a command.
|
|
||||||
* Running a command may cause modification to data storage. */
|
|
||||||
int run_command(const char* cmd_line);
|
|
||||||
|
|
||||||
/* Start the shell with options. For detailed usage, please refer to online documentation about openfpgashell
|
public: /* Mutators */
|
||||||
* Depending on the options, a shell may run in
|
/* Execute a specific command with options in a line, which is available in
|
||||||
* - an interactive mode, where users can type in commands and get results
|
* the shell Note that running a command will be based on the current status
|
||||||
* or
|
* of data storage. The data storage is impacted by previous commands that
|
||||||
* - an batch mode, where users provide a script contains a set of commands to execute
|
* have been run. If you want a clear start, please call API reset() before
|
||||||
* TODO: the shell always has a clean start (refreshed data storage).
|
* running a command. Running a command may cause modification to data
|
||||||
*/
|
* storage. */
|
||||||
int start(int argc, char** argv);
|
int run_command(const char* cmd_line);
|
||||||
|
|
||||||
/* Reset the data storage and shell status, to ensure a clean start */
|
/* Start the shell with options. For detailed usage, please refer to online
|
||||||
void reset();
|
* documentation about openfpgashell Depending on the options, a shell may run
|
||||||
private: /* Internal data */
|
* in
|
||||||
openfpga::Shell<OpenfpgaContext> shell_;
|
* - an interactive mode, where users can type in commands and get results
|
||||||
OpenfpgaContext openfpga_ctx_;
|
* or
|
||||||
|
* - an batch mode, where users provide a script contains a set of commands to
|
||||||
|
* execute
|
||||||
|
* TODO: the shell always has a clean start (refreshed data storage).
|
||||||
|
*/
|
||||||
|
int start(int argc, char** argv);
|
||||||
|
|
||||||
|
/* Reset the data storage and shell status, to ensure a clean start */
|
||||||
|
void reset();
|
||||||
|
|
||||||
|
private: /* Internal data */
|
||||||
|
openfpga::Shell<OpenfpgaContext> shell_;
|
||||||
|
OpenfpgaContext openfpga_ctx_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue