use error code in read_arch command
This commit is contained in:
parent
e9ceedb01b
commit
f52b5d5b4c
|
@ -447,7 +447,7 @@ size_t check_circuit_library_ports(const CircuitLibrary& circuit_lib) {
|
|||
* 9. LUT must have at least an input, an output and a SRAM ports
|
||||
* 10. We must have default circuit models for these types: MUX, channel wires and wires
|
||||
***********************************************************************/
|
||||
void check_circuit_library(const CircuitLibrary& circuit_lib) {
|
||||
bool check_circuit_library(const CircuitLibrary& circuit_lib) {
|
||||
size_t num_err = 0;
|
||||
|
||||
vtr::ScopedStartFinishTimer timer("Check circuit library");
|
||||
|
@ -545,10 +545,10 @@ void check_circuit_library(const CircuitLibrary& circuit_lib) {
|
|||
if (0 < num_err) {
|
||||
VTR_LOG("Finished checking circuit library with %d errors!\n",
|
||||
num_err);
|
||||
exit(1);
|
||||
return false;
|
||||
}
|
||||
|
||||
VTR_LOG("Checking circuit library passed.\n");
|
||||
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,6 @@ size_t check_sram_circuit_model_ports(const CircuitLibrary& circuit_lib,
|
|||
const CircuitModelId& circuit_model,
|
||||
const bool& check_blwl);
|
||||
|
||||
void check_circuit_library(const CircuitLibrary& circuit_lib);
|
||||
bool check_circuit_library(const CircuitLibrary& circuit_lib);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -46,9 +46,10 @@ int read_arch(OpenfpgaContext& openfpga_context,
|
|||
* 2. Technology library (TODO)
|
||||
* 3. Simulation settings (TODO)
|
||||
*/
|
||||
check_circuit_library(openfpga_context.arch().circuit_lib);
|
||||
if (false == check_circuit_library(openfpga_context.arch().circuit_lib)) {
|
||||
return CMD_EXEC_FATAL_ERROR;
|
||||
}
|
||||
|
||||
/* TODO: should identify the error code from internal function execution */
|
||||
return CMD_EXEC_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue