[engine] format

This commit is contained in:
tangxifan 2022-11-24 21:04:04 -08:00
parent 24a174c7a4
commit f1a317b384
2 changed files with 33 additions and 26 deletions

View File

@ -1,7 +1,8 @@
#include "openfpga_shell.h"
#include "basic_command.h"
#include "command_echo.h"
#include "command_parser.h"
#include "openfpga_shell.h"
#include "basic_command.h"
#include "openfpga_bitstream_command.h"
#include "openfpga_context.h"
#include "openfpga_sdc_command.h"

View File

@ -2,8 +2,9 @@
#define OPENFPGA_SHELL_H
#include <string>
#include "shell.h"
#include "openfpga_context.h"
#include "shell.h"
/********************************************************************
* This is a shell class built on top of the general-purpose shell
@ -14,25 +15,30 @@
class OpenfpgaShell {
public: /* Contructors */
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. */
/* 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
* Depending on the options, a shell may run in
/* Start the shell with options. For detailed usage, please refer to online
* documentation about openfpgashell Depending on the options, a shell may run
* in
* - an interactive mode, where users can type in commands and get results
* or
* - an batch mode, where users provide a script contains a set of commands to execute
* - 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_;