[core] format
This commit is contained in:
parent
d2632b17cd
commit
b569d6b603
|
@ -65,14 +65,23 @@ class Shell {
|
|||
* Built-in commands have their own execute functions inside the shell
|
||||
*/
|
||||
enum e_exec_func_type {
|
||||
CONST_STANDARD, /* A standard function requires to read data from the command context, need the shell to provide command parsing */
|
||||
STANDARD, /* A standard function requires to write data to the command context, need the shell to provide command parsing */
|
||||
CONST_SHORT, /* A short function requries to read data from the common context without any command-line options */
|
||||
SHORT, /* A short function requries to write data to the common context without any command-line options */
|
||||
CONST_STANDARD, /* A standard function requires to read data from the
|
||||
command context, need the shell to provide command
|
||||
parsing */
|
||||
STANDARD, /* A standard function requires to write data to the command
|
||||
context, need the shell to provide command parsing */
|
||||
CONST_SHORT, /* A short function requries to read data from the common
|
||||
context without any command-line options */
|
||||
SHORT, /* A short function requries to write data to the common context
|
||||
without any command-line options */
|
||||
BUILTIN, /* A built-in function which requires no input arguments at all */
|
||||
FLOATING, /* A floating function which does not need to write/read any data from the common context. Need shell to provide command parsing */
|
||||
MACRO, /* A black-box function which has its own command-line parser/interface. No need for shell to provide command parsing */
|
||||
PLUGIN, /* A plug-in function which is based on other commands, require shell methods */
|
||||
FLOATING, /* A floating function which does not need to write/read any data
|
||||
from the common context. Need shell to provide command parsing
|
||||
*/
|
||||
MACRO, /* A black-box function which has its own command-line
|
||||
parser/interface. No need for shell to provide command parsing */
|
||||
PLUGIN, /* A plug-in function which is based on other commands, require
|
||||
shell methods */
|
||||
NUM_EXEC_FUNC_TYPES
|
||||
};
|
||||
|
||||
|
@ -100,7 +109,8 @@ class Shell {
|
|||
public: /* Public mutators */
|
||||
void set_name(const char* name);
|
||||
void add_title(const char* title);
|
||||
ShellCommandId add_command(const Command& cmd, const char* descr, const bool& hidden = false);
|
||||
ShellCommandId add_command(const Command& cmd, const char* descr,
|
||||
const bool& hidden = false);
|
||||
void set_command_class(const ShellCommandId& cmd_id,
|
||||
const ShellCommandClassId& cmd_class_id);
|
||||
/* Link the execute function to a command
|
||||
|
@ -152,7 +162,8 @@ class Shell {
|
|||
std::function<void()> exec_func);
|
||||
|
||||
/* Floating function, including the only commands
|
||||
* This is designed for implementing functions which is totally independent from <T>
|
||||
* This is designed for implementing functions which is totally independent
|
||||
* from <T>
|
||||
*/
|
||||
void set_command_execute_function(
|
||||
const ShellCommandId& cmd_id,
|
||||
|
|
|
@ -116,8 +116,8 @@ void add_basic_commands(openfpga::Shell<OpenfpgaContext>& shell) {
|
|||
|
||||
/* Add a hidden command: internal_version */
|
||||
Command shell_cmd_internal_version("hidden_version");
|
||||
ShellCommandId shell_cmd_internal_version_id =
|
||||
shell.add_command(shell_cmd_internal_version, "Show internal version information", true);
|
||||
ShellCommandId shell_cmd_internal_version_id = shell.add_command(
|
||||
shell_cmd_internal_version, "Show internal version information", true);
|
||||
shell.set_command_class(shell_cmd_internal_version_id, basic_cmd_class);
|
||||
shell.set_command_execute_function(shell_cmd_internal_version_id,
|
||||
print_openfpga_version_info);
|
||||
|
|
|
@ -42,8 +42,8 @@ ShellCommandId add_repack_command_template(
|
|||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
/* Add command 'repack' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "Pack physical programmable logic blocks", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "Pack physical programmable logic blocks", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, repack_template<T>);
|
||||
|
||||
|
@ -82,8 +82,8 @@ ShellCommandId add_build_arch_bitstream_command_template(
|
|||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
/* Add command 'build_architecture_bitstream' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "Build fabric-independent bitstream database", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "Build fabric-independent bitstream database", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, fpga_bitstream_template<T>);
|
||||
|
||||
|
@ -154,7 +154,8 @@ ShellCommandId add_build_fabric_bitstream_command_template(
|
|||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd,
|
||||
"Reorganize the fabric-independent bitstream for the "
|
||||
"FPGA fabric created by FPGA-Verilog", hidden);
|
||||
"FPGA fabric created by FPGA-Verilog",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
build_fabric_bitstream_template<T>);
|
||||
|
@ -244,8 +245,8 @@ ShellCommandId add_write_io_mapping_command_template(
|
|||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
/* Add command 'fabric_bitstream' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "Write the I/O mapping information to a file", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "Write the I/O mapping information to a file", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
write_io_mapping_template<T>);
|
||||
|
@ -260,7 +261,8 @@ ShellCommandId add_write_io_mapping_command_template(
|
|||
* Top-level function to add all the commands related to FPGA-Bitstream
|
||||
*******************************************************************/
|
||||
template <class T>
|
||||
void add_bitstream_command_templates(openfpga::Shell<T>& shell, const bool& hidden = false) {
|
||||
void add_bitstream_command_templates(openfpga::Shell<T>& shell,
|
||||
const bool& hidden = false) {
|
||||
/* Get the unique id of 'build_fabric' command which is to be used in creating
|
||||
* the dependency graph */
|
||||
const ShellCommandId& shell_cmd_build_fabric_id =
|
||||
|
@ -288,7 +290,8 @@ void add_bitstream_command_templates(openfpga::Shell<T>& shell, const bool& hidd
|
|||
cmd_dependency_build_arch_bitstream.push_back(shell_cmd_repack_id);
|
||||
ShellCommandId shell_cmd_build_arch_bitstream_id =
|
||||
add_build_arch_bitstream_command_template(
|
||||
shell, openfpga_bitstream_cmd_class, cmd_dependency_build_arch_bitstream, hidden);
|
||||
shell, openfpga_bitstream_cmd_class, cmd_dependency_build_arch_bitstream,
|
||||
hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'report_bitstream_distribution'
|
||||
|
@ -324,7 +327,8 @@ void add_bitstream_command_templates(openfpga::Shell<T>& shell, const bool& hidd
|
|||
cmd_dependency_write_fabric_bitstream.push_back(
|
||||
shell_cmd_build_fabric_bitstream_id);
|
||||
add_write_fabric_bitstream_command_template(
|
||||
shell, openfpga_bitstream_cmd_class, cmd_dependency_write_fabric_bitstream, hidden);
|
||||
shell, openfpga_bitstream_cmd_class, cmd_dependency_write_fabric_bitstream,
|
||||
hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'write_io_mapping'
|
||||
|
@ -334,7 +338,8 @@ void add_bitstream_command_templates(openfpga::Shell<T>& shell, const bool& hidd
|
|||
std::vector<ShellCommandId> cmd_dependency_write_io_mapping;
|
||||
cmd_dependency_write_io_mapping.push_back(shell_cmd_build_fabric_id);
|
||||
add_write_io_mapping_command_template(shell, openfpga_bitstream_cmd_class,
|
||||
cmd_dependency_write_io_mapping, hidden);
|
||||
cmd_dependency_write_io_mapping,
|
||||
hidden);
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -152,7 +152,8 @@ ShellCommandId add_write_configuration_chain_sdc_command_template(
|
|||
/* Add command 'write_configuration_chain_sdc' to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd,
|
||||
"generate SDC files to constrain the configuration chain for FPGA fabric", hidden);
|
||||
"generate SDC files to constrain the configuration chain for FPGA fabric",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(
|
||||
shell_cmd_id, write_configuration_chain_sdc_template<T>);
|
||||
|
@ -195,7 +196,8 @@ ShellCommandId add_write_sdc_disable_timing_configure_ports_command_template(
|
|||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd,
|
||||
"generate SDC files to disable timing for configure "
|
||||
"ports across FPGA fabric", hidden);
|
||||
"ports across FPGA fabric",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(
|
||||
shell_cmd_id, write_sdc_disable_timing_configure_ports_template<T>);
|
||||
|
@ -244,7 +246,8 @@ ShellCommandId add_write_analysis_sdc_command_template(
|
|||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd,
|
||||
"generate SDC files for timing analysis a PnRed FPGA "
|
||||
"fabric mapped by a benchmark", hidden);
|
||||
"fabric mapped by a benchmark",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(shell_cmd_id,
|
||||
write_analysis_sdc_template<T>);
|
||||
|
@ -256,7 +259,8 @@ ShellCommandId add_write_analysis_sdc_command_template(
|
|||
}
|
||||
|
||||
template <class T>
|
||||
void add_openfpga_sdc_command_templates(openfpga::Shell<T>& shell, const bool& hidden = false) {
|
||||
void add_openfpga_sdc_command_templates(openfpga::Shell<T>& shell,
|
||||
const bool& hidden = false) {
|
||||
/* Get the unique id of 'build_fabric' command which is to be used in creating
|
||||
* the dependency graph */
|
||||
const ShellCommandId& build_fabric_id =
|
||||
|
@ -302,8 +306,8 @@ void add_openfpga_sdc_command_templates(openfpga::Shell<T>& shell, const bool& h
|
|||
* 'build_fabric' */
|
||||
std::vector<ShellCommandId> analysis_sdc_cmd_dependency;
|
||||
analysis_sdc_cmd_dependency.push_back(build_fabric_id);
|
||||
add_write_analysis_sdc_command_template<T>(shell, openfpga_sdc_cmd_class,
|
||||
analysis_sdc_cmd_dependency, hidden);
|
||||
add_write_analysis_sdc_command_template<T>(
|
||||
shell, openfpga_sdc_cmd_class, analysis_sdc_cmd_dependency, hidden);
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -25,7 +25,8 @@ namespace openfpga {
|
|||
*******************************************************************/
|
||||
template <class T>
|
||||
ShellCommandId add_read_openfpga_arch_command_template(
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id, const bool& hidden) {
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id,
|
||||
const bool& hidden) {
|
||||
Command shell_cmd("read_openfpga_arch");
|
||||
|
||||
/* Add an option '--file' in short '-f'*/
|
||||
|
@ -80,7 +81,8 @@ ShellCommandId add_write_openfpga_arch_command_template(
|
|||
*******************************************************************/
|
||||
template <class T>
|
||||
ShellCommandId add_read_simulation_setting_command_template(
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id, const bool& hidden) {
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id,
|
||||
const bool& hidden) {
|
||||
Command shell_cmd("read_openfpga_simulation_setting");
|
||||
|
||||
/* Add an option '--file' in short '-f'*/
|
||||
|
@ -90,8 +92,8 @@ ShellCommandId add_read_simulation_setting_command_template(
|
|||
shell_cmd.set_option_require_value(opt_file, openfpga::OPT_STRING);
|
||||
|
||||
/* Add command 'read_openfpga_arch' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "read OpenFPGA simulation setting file", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "read OpenFPGA simulation setting file", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
read_simulation_setting_template<T>);
|
||||
|
@ -116,8 +118,8 @@ ShellCommandId add_write_simulation_setting_command_template(
|
|||
shell_cmd.set_option_require_value(opt_file, openfpga::OPT_STRING);
|
||||
|
||||
/* Add command 'write_openfpga_arch' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "write OpenFPGA simulation setting file", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "write OpenFPGA simulation setting file", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(
|
||||
shell_cmd_id, write_simulation_setting_template<T>);
|
||||
|
@ -135,7 +137,8 @@ ShellCommandId add_write_simulation_setting_command_template(
|
|||
*******************************************************************/
|
||||
template <class T>
|
||||
ShellCommandId add_read_bitstream_setting_command_template(
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id, const bool& hidden) {
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id,
|
||||
const bool& hidden) {
|
||||
Command shell_cmd("read_openfpga_bitstream_setting");
|
||||
|
||||
/* Add an option '--file' in short '-f'*/
|
||||
|
@ -145,8 +148,8 @@ ShellCommandId add_read_bitstream_setting_command_template(
|
|||
shell_cmd.set_option_require_value(opt_file, openfpga::OPT_STRING);
|
||||
|
||||
/* Add command 'read_openfpga_bitstream_setting' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "read OpenFPGA bitstream setting file", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "read OpenFPGA bitstream setting file", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
read_bitstream_setting_template<T>);
|
||||
|
@ -171,8 +174,8 @@ ShellCommandId add_write_bitstream_setting_command_template(
|
|||
shell_cmd.set_option_require_value(opt_file, openfpga::OPT_STRING);
|
||||
|
||||
/* Add command 'write_openfpga_bitstream_setting' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "write OpenFPGA bitstream setting file", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "write OpenFPGA bitstream setting file", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(shell_cmd_id,
|
||||
write_bitstream_setting_template<T>);
|
||||
|
@ -264,8 +267,8 @@ ShellCommandId add_write_gsb_command_template(
|
|||
|
||||
/* Add command 'write_openfpga_arch' to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd,
|
||||
"write internal structures of General Switch Blocks to XML file", hidden);
|
||||
shell_cmd, "write internal structures of General Switch Blocks to XML file",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(shell_cmd_id, write_gsb_template<T>);
|
||||
|
||||
|
@ -298,7 +301,8 @@ ShellCommandId add_check_netlist_naming_conflict_command_template(
|
|||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd,
|
||||
"Check any block/net naming in users' BLIF netlist "
|
||||
"violates the syntax of fabric generator", hidden);
|
||||
"violates the syntax of fabric generator",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
check_netlist_naming_conflict_template<T>);
|
||||
|
@ -326,7 +330,8 @@ ShellCommandId add_pb_pin_fixup_command_template(
|
|||
/* Add command 'pb_pin_fixup' to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd,
|
||||
"Fix up the packing results due to pin swapping during routing stage", hidden);
|
||||
"Fix up the packing results due to pin swapping during routing stage",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, pb_pin_fixup_template<T>);
|
||||
|
||||
|
@ -353,7 +358,8 @@ ShellCommandId add_lut_truth_table_fixup_command_template(
|
|||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd,
|
||||
"Fix up the truth table of Look-Up Tables due to pin "
|
||||
"swapping during packing stage", hidden);
|
||||
"swapping during packing stage",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
lut_truth_table_fixup_template<T>);
|
||||
|
@ -408,8 +414,8 @@ ShellCommandId add_build_fabric_command_template(
|
|||
shell_cmd.add_option("verbose", false, "Show verbose outputs");
|
||||
|
||||
/* Add command 'compact_routing_hierarchy' to the Shell */
|
||||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd, "Build the FPGA fabric in a graph of modules", hidden);
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "Build the FPGA fabric in a graph of modules", hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, build_fabric_template<T>);
|
||||
|
||||
|
@ -447,7 +453,8 @@ ShellCommandId add_write_fabric_hierarchy_command_template(
|
|||
|
||||
/* Add command 'write_fabric_hierarchy' to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "Write the hierarchy of FPGA fabric graph to a plain-text file", hidden);
|
||||
shell_cmd, "Write the hierarchy of FPGA fabric graph to a plain-text file",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_const_execute_function(shell_cmd_id,
|
||||
write_fabric_hierarchy_template<T>);
|
||||
|
@ -486,7 +493,8 @@ ShellCommandId add_write_fabric_io_info_command_template(
|
|||
ShellCommandId shell_cmd_id =
|
||||
shell.add_command(shell_cmd,
|
||||
"Write the I/O information, e.g., locations and similar "
|
||||
"attributes, to a file", hidden);
|
||||
"attributes, to a file",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
write_fabric_io_info_template<T>);
|
||||
|
@ -504,7 +512,8 @@ ShellCommandId add_write_fabric_io_info_command_template(
|
|||
*******************************************************************/
|
||||
template <class T>
|
||||
ShellCommandId add_pcf2place_command_template(
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id, const bool& hidden) {
|
||||
openfpga::Shell<T>& shell, const ShellCommandClassId& cmd_class_id,
|
||||
const bool& hidden) {
|
||||
Command shell_cmd("pcf2place");
|
||||
|
||||
/* Add an option '--pcf'*/
|
||||
|
@ -552,7 +561,8 @@ ShellCommandId add_pcf2place_command_template(
|
|||
|
||||
/* Add command to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "Convert user Pin Constraint File (.pcf) to an placement file", hidden);
|
||||
shell_cmd, "Convert user Pin Constraint File (.pcf) to an placement file",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
pcf2place_wrapper_template<T>);
|
||||
|
@ -561,7 +571,8 @@ ShellCommandId add_pcf2place_command_template(
|
|||
}
|
||||
|
||||
template <class T>
|
||||
void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden = false) {
|
||||
void add_setup_command_templates(openfpga::Shell<T>& shell,
|
||||
const bool& hidden = false) {
|
||||
/* Get the unique id of 'vpr' command which is to be used in creating the
|
||||
* dependency graph */
|
||||
const ShellCommandId& vpr_cmd_id = shell.command(std::string("vpr"));
|
||||
|
@ -578,8 +589,8 @@ void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
/********************************
|
||||
* Command 'read_openfpga_arch'
|
||||
*/
|
||||
ShellCommandId read_arch_cmd_id =
|
||||
add_read_openfpga_arch_command_template<T>(shell, openfpga_setup_cmd_class, hidden);
|
||||
ShellCommandId read_arch_cmd_id = add_read_openfpga_arch_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'write_openfpga_arch'
|
||||
|
@ -587,15 +598,15 @@ void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
/* The 'write_openfpga_arch' command should NOT be executed before
|
||||
* 'read_openfpga_arch' */
|
||||
std::vector<ShellCommandId> write_arch_dependent_cmds(1, read_arch_cmd_id);
|
||||
add_write_openfpga_arch_command_template<T>(shell, openfpga_setup_cmd_class,
|
||||
write_arch_dependent_cmds, hidden);
|
||||
add_write_openfpga_arch_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, write_arch_dependent_cmds, hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'read_openfpga_simulation_setting'
|
||||
*/
|
||||
ShellCommandId read_sim_setting_cmd_id =
|
||||
add_read_simulation_setting_command_template<T>(shell,
|
||||
openfpga_setup_cmd_class, hidden);
|
||||
add_read_simulation_setting_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'write_openfpga_simulation_setting'
|
||||
|
@ -611,8 +622,8 @@ void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
* Command 'read_openfpga_bitstream_setting'
|
||||
*/
|
||||
ShellCommandId read_bitstream_setting_cmd_id =
|
||||
add_read_bitstream_setting_command_template<T>(shell,
|
||||
openfpga_setup_cmd_class, hidden);
|
||||
add_read_bitstream_setting_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'write_openfpga_bitstream_setting'
|
||||
|
@ -622,7 +633,8 @@ void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
std::vector<ShellCommandId> write_bitstream_setting_dependent_cmds(
|
||||
1, read_bitstream_setting_cmd_id);
|
||||
add_write_bitstream_setting_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, write_bitstream_setting_dependent_cmds, hidden);
|
||||
shell, openfpga_setup_cmd_class, write_bitstream_setting_dependent_cmds,
|
||||
hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'link_openfpga_arch'
|
||||
|
@ -676,8 +688,8 @@ void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
std::vector<ShellCommandId> lut_tt_fixup_dependent_cmds;
|
||||
lut_tt_fixup_dependent_cmds.push_back(read_arch_cmd_id);
|
||||
lut_tt_fixup_dependent_cmds.push_back(vpr_cmd_id);
|
||||
add_lut_truth_table_fixup_command_template<T>(shell, openfpga_setup_cmd_class,
|
||||
lut_tt_fixup_dependent_cmds, hidden);
|
||||
add_lut_truth_table_fixup_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, lut_tt_fixup_dependent_cmds, hidden);
|
||||
/********************************
|
||||
* Command 'build_fabric'
|
||||
*/
|
||||
|
@ -706,7 +718,8 @@ void add_setup_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
std::vector<ShellCommandId> cmd_dependency_write_fabric_io_info;
|
||||
cmd_dependency_write_fabric_io_info.push_back(build_fabric_cmd_id);
|
||||
add_write_fabric_io_info_command_template<T>(
|
||||
shell, openfpga_setup_cmd_class, cmd_dependency_write_fabric_io_info, hidden);
|
||||
shell, openfpga_setup_cmd_class, cmd_dependency_write_fabric_io_info,
|
||||
hidden);
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -68,7 +68,8 @@ ShellCommandId add_write_fabric_spice_command_template(
|
|||
}
|
||||
|
||||
template <class T>
|
||||
void add_spice_command_templates(openfpga::Shell<T>& shell, const bool& hidden = false) {
|
||||
void add_spice_command_templates(openfpga::Shell<T>& shell,
|
||||
const bool& hidden = false) {
|
||||
/* Get the unique id of 'build_fabric' command which is to be used in creating
|
||||
* the dependency graph */
|
||||
const ShellCommandId& build_fabric_cmd_id =
|
||||
|
@ -85,8 +86,8 @@ void add_spice_command_templates(openfpga::Shell<T>& shell, const bool& hidden =
|
|||
* 'build_fabric' */
|
||||
std::vector<ShellCommandId> fabric_spice_dependent_cmds;
|
||||
fabric_spice_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_write_fabric_spice_command_template<T>(shell, openfpga_spice_cmd_class,
|
||||
fabric_spice_dependent_cmds, hidden);
|
||||
add_write_fabric_spice_command_template<T>(
|
||||
shell, openfpga_spice_cmd_class, fabric_spice_dependent_cmds, hidden);
|
||||
|
||||
/********************************
|
||||
* TODO: Command 'write_spice_top_testbench'
|
||||
|
|
|
@ -380,7 +380,8 @@ ShellCommandId add_write_simulation_task_info_command_template(
|
|||
|
||||
/* Add command to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(
|
||||
shell_cmd, "generate an interchangable simulation task configuration file", hidden);
|
||||
shell_cmd, "generate an interchangable simulation task configuration file",
|
||||
hidden);
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id,
|
||||
write_simulation_task_info_template<T>);
|
||||
|
@ -392,7 +393,8 @@ ShellCommandId add_write_simulation_task_info_command_template(
|
|||
}
|
||||
|
||||
template <class T>
|
||||
void add_verilog_command_templates(openfpga::Shell<T>& shell, const bool& hidden = false) {
|
||||
void add_verilog_command_templates(openfpga::Shell<T>& shell,
|
||||
const bool& hidden = false) {
|
||||
/* Get the unique id of 'build_fabric' command which is to be used in creating
|
||||
* the dependency graph */
|
||||
const ShellCommandId& build_fabric_cmd_id =
|
||||
|
@ -430,7 +432,8 @@ void add_verilog_command_templates(openfpga::Shell<T>& shell, const bool& hidden
|
|||
std::vector<ShellCommandId> preconfig_wrapper_dependent_cmds;
|
||||
preconfig_wrapper_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_write_preconfigured_fabric_wrapper_command_template<T>(
|
||||
shell, openfpga_verilog_cmd_class, preconfig_wrapper_dependent_cmds, hidden);
|
||||
shell, openfpga_verilog_cmd_class, preconfig_wrapper_dependent_cmds,
|
||||
hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'write_preconfigured_testbench'
|
||||
|
@ -440,7 +443,8 @@ void add_verilog_command_templates(openfpga::Shell<T>& shell, const bool& hidden
|
|||
std::vector<ShellCommandId> preconfig_testbench_dependent_cmds;
|
||||
preconfig_testbench_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_write_preconfigured_testbench_command_template<T>(
|
||||
shell, openfpga_verilog_cmd_class, preconfig_testbench_dependent_cmds, hidden);
|
||||
shell, openfpga_verilog_cmd_class, preconfig_testbench_dependent_cmds,
|
||||
hidden);
|
||||
|
||||
/********************************
|
||||
* Command 'write_simulation_task_info'
|
||||
|
|
Loading…
Reference in New Issue