[engine] code format
This commit is contained in:
parent
492b8a153a
commit
d329f0bb44
|
@ -18,19 +18,23 @@ void add_vpr_commands(openfpga::Shell<OpenfpgaContext>& shell) {
|
||||||
ShellCommandId shell_cmd_vpr_id =
|
ShellCommandId shell_cmd_vpr_id =
|
||||||
shell.add_command(shell_cmd_vpr,
|
shell.add_command(shell_cmd_vpr,
|
||||||
"Start VPR core engine to pack, place and route a BLIF "
|
"Start VPR core engine to pack, place and route a BLIF "
|
||||||
"design on a FPGA architecture; Note that this command will keep VPR results!");
|
"design on a FPGA architecture; Note that this command "
|
||||||
|
"will keep VPR results!");
|
||||||
shell.set_command_class(shell_cmd_vpr_id, vpr_cmd_class);
|
shell.set_command_class(shell_cmd_vpr_id, vpr_cmd_class);
|
||||||
shell.set_command_execute_function(shell_cmd_vpr_id, vpr::vpr_wrapper);
|
shell.set_command_execute_function(shell_cmd_vpr_id, vpr::vpr_wrapper);
|
||||||
|
|
||||||
/* Create a macro command of 'vpr_standalone' which will call the main engine of vpr in a standalone way
|
/* Create a macro command of 'vpr_standalone' which will call the main engine
|
||||||
|
* of vpr in a standalone way
|
||||||
*/
|
*/
|
||||||
Command shell_cmd_vpr_stdalone("vpr_standalone");
|
Command shell_cmd_vpr_stdalone("vpr_standalone");
|
||||||
ShellCommandId shell_cmd_vpr_stdalone_id =
|
ShellCommandId shell_cmd_vpr_stdalone_id = shell.add_command(
|
||||||
shell.add_command(shell_cmd_vpr,
|
shell_cmd_vpr,
|
||||||
"Start a standalone VPR core engine to pack, place and route a BLIF "
|
"Start a standalone VPR core engine to pack, place and route a BLIF "
|
||||||
"design on a FPGA architecture; Note that this command will NOT keep VPR results!");
|
"design on a FPGA architecture; Note that this command will NOT keep VPR "
|
||||||
|
"results!");
|
||||||
shell.set_command_class(shell_cmd_vpr_stdalone_id, vpr_cmd_class);
|
shell.set_command_class(shell_cmd_vpr_stdalone_id, vpr_cmd_class);
|
||||||
shell.set_command_execute_function(shell_cmd_vpr_stdalone_id, vpr::vpr_standalone_wrapper);
|
shell.set_command_execute_function(shell_cmd_vpr_stdalone_id,
|
||||||
|
vpr::vpr_standalone_wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* end namespace openfpga */
|
} /* end namespace openfpga */
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
#include "command_exit_codes.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "tatum/error.hpp"
|
#include "tatum/error.hpp"
|
||||||
#include "vpr_api.h"
|
#include "vpr_api.h"
|
||||||
|
@ -19,7 +20,6 @@
|
||||||
#include "vtr_log.h"
|
#include "vtr_log.h"
|
||||||
#include "vtr_memory.h"
|
#include "vtr_memory.h"
|
||||||
#include "vtr_time.h"
|
#include "vtr_time.h"
|
||||||
#include "command_exit_codes.h"
|
|
||||||
|
|
||||||
namespace vpr {
|
namespace vpr {
|
||||||
|
|
||||||
|
@ -36,8 +36,7 @@ namespace vpr {
|
||||||
* 3. Place-and-route and timing analysis
|
* 3. Place-and-route and timing analysis
|
||||||
* 4. Clean up
|
* 4. Clean up
|
||||||
*/
|
*/
|
||||||
static
|
static int vpr(int argc, char** argv) {
|
||||||
int vpr(int argc, char** argv) {
|
|
||||||
vtr::ScopedFinishTimer t("The entire flow of VPR");
|
vtr::ScopedFinishTimer t("The entire flow of VPR");
|
||||||
|
|
||||||
t_options Options = t_options();
|
t_options Options = t_options();
|
||||||
|
@ -107,8 +106,7 @@ int vpr_wrapper(int argc, char** argv) {
|
||||||
/**
|
/**
|
||||||
* VPR program with clean up
|
* VPR program with clean up
|
||||||
*/
|
*/
|
||||||
static
|
static int vpr_standalone(int argc, char** argv) {
|
||||||
int vpr_standalone(int argc, char** argv) {
|
|
||||||
vtr::ScopedFinishTimer t("The entire flow of VPR");
|
vtr::ScopedFinishTimer t("The entire flow of VPR");
|
||||||
|
|
||||||
t_options Options = t_options();
|
t_options Options = t_options();
|
||||||
|
@ -159,7 +157,8 @@ int vpr_standalone(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (const vtr::VtrError& vtr_error) {
|
} catch (const vtr::VtrError& vtr_error) {
|
||||||
VTR_LOG_ERROR("%s:%d %s\n", vtr_error.filename_c_str(), vtr_error.line(), vtr_error.what());
|
VTR_LOG_ERROR("%s:%d %s\n", vtr_error.filename_c_str(), vtr_error.line(),
|
||||||
|
vtr_error.what());
|
||||||
vpr_free_all(Arch, vpr_setup);
|
vpr_free_all(Arch, vpr_setup);
|
||||||
|
|
||||||
return ERROR_EXIT_CODE;
|
return ERROR_EXIT_CODE;
|
||||||
|
@ -177,5 +176,4 @@ int vpr_standalone_wrapper(int argc, char** argv) {
|
||||||
return openfpga::CMD_EXEC_SUCCESS;
|
return openfpga::CMD_EXEC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* End namespace vpr */
|
} /* End namespace vpr */
|
||||||
|
|
Loading…
Reference in New Issue