Skip to content

Commit 0cb08a9

Browse files
committed
[FLOW]: Avoiding Odin's xml config file to be considered as arch file
Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 60c0106 commit 0cb08a9

File tree

12 files changed

+17
-16
lines changed

12 files changed

+17
-16
lines changed

ODIN_II/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ regression_test/latest
77
/*.dot
88
/*.do
99
/*.xml
10+
/*.oxml
1011
/*_input
1112
/*_output
1213
/*_vectors

ODIN_II/SRC/include/read_xml_config_file.h renamed to ODIN_II/SRC/include/read_oxml_config_file.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* OTHER DEALINGS IN THE SOFTWARE.
2424
*/
2525

26-
#ifndef READ_XML_CONFIG_FILE_H
27-
#define READ_XML_CONFIG_FILE_H
26+
#ifndef READ_OXML_CONFIG_FILE_H
27+
#define READ_OXML_CONFIG_FILE_H
2828

2929
#include "odin_types.h"
3030

ODIN_II/SRC/odin_ii.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "parse_making_ast.h"
4242
#include "netlist_create_from_ast.h"
4343
#include "ast_util.h"
44-
#include "read_xml_config_file.h"
44+
#include "read_oxml_config_file.h"
4545
#include "read_xml_arch_file.h"
4646
#include "partial_map.h"
4747
#include "multipliers.h"
@@ -382,7 +382,7 @@ void get_options(int argc, char** argv) {
382382

383383
input_grp.add_argument(global_args.config_file, "-c")
384384
.help("Configuration file")
385-
.metavar("XML_CONFIGURATION_FILE");
385+
.metavar("OXML_CONFIGURATION_FILE");
386386

387387
input_grp.add_argument(global_args.verilog_files, "-V")
388388
.help("list of Verilog HDL file")

ODIN_II/SRC/read_xml_config_file.cpp renamed to ODIN_II/SRC/read_oxml_config_file.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <stdarg.h>
2727
#include "odin_types.h"
2828
#include "odin_globals.h"
29-
#include "read_xml_config_file.h"
29+
#include "read_oxml_config_file.h"
3030
#include "read_xml_util.h"
3131
#include "pugixml.hpp"
3232
#include "pugixml_util.hpp"
@@ -48,7 +48,7 @@ extern HardSoftLogicMixer* mixer;
4848

4949
/*-------------------------------------------------------------------------
5050
* (function: read_config_file)
51-
* This reads an XML config file that specifies what we will do in the tool.
51+
* This reads an Odin XML config file that specifies what we will do in the tool.
5252
*
5353
* See config_t in types.h to see the data structures used in this read.
5454
*-----------------------------------------------------------------------*/
@@ -89,7 +89,7 @@ void read_config_file(const char* file_name) {
8989
return;
9090
}
9191

92-
/* Release the full XML tree */
92+
/* Release the full Odin XML tree */
9393
return;
9494
}
9595

ODIN_II/regression_test/benchmark/task/mixing_optimization/config_file_half/task.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ circuit_list_add=micro/multiply_hard_block.v
2626
# complex mutliplication
2727
circuit_list_add=micro/bm_match[012345]_str_arch.v
2828

29-
synthesis_params= -c regression_test/benchmark/task/mixing_optimization/config_file_half/config_file_half.xml
30-
simulation_params= -c regression_test/benchmark/task/mixing_optimization/config_file_half/config_file_half.xml
29+
synthesis_params= -c regression_test/benchmark/task/mixing_optimization/config_file_half/config_file_half.oxml
30+
simulation_params= -c regression_test/benchmark/task/mixing_optimization/config_file_half/config_file_half.oxml
3131

3232
synthesis_parse_file=regression_test/parse_result/conf/synth.toml
3333
simulation_parse_file=regression_test/parse_result/conf/sim.toml

ODIN_II/regression_test/parse_result/conf/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def patch_logs(values):
7070
# strip username from the logs
7171
r"(" + pwd.getpwuid(os.getuid()).pw_name + r")": "",
7272
# strip path from known file extensions
73-
r"([\/]?[a-zA-Z_.\-0-9]*\/)(?=[^\/\s]*(_input|_output|\.xml|\.v|\.vh|\.blif|\.log|\.do|\.dot|_vectors|_activity)[\s\n]+)": "",
73+
r"([\/]?[a-zA-Z_.\-0-9]*\/)(?=[^\/\s]*(_input|_output|\.xml|\.oxml|\.v|\.vh|\.blif|\.log|\.do|\.dot|_vectors|_activity)[\s\n]+)": "",
7474
# bison used to call EOF $end, but switched to end of file since
7575
r"syntax error, unexpected \$end": r"syntax error, unexpected end of file",
7676
}

ODIN_II/regression_test/tools/odin_config_maker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def configOptParse():
165165
parser = OptionParser(
166166
usage="odin_config_maker.py [options] [output_path] [base_filename]",
167167
prog="odin_config_maker.py",
168-
description="[output_path] specifies where configuration files will be written. [base_filename] is used to create the appropriate configuration files, [base_filename].soft.xml, [base_filename].hard_mem.xml, [base_filename].hard_mult.xml, [base_filename].hard.xml",
168+
description="[output_path] specifies where configuration files will be written. [base_filename] is used to create the appropriate configuration files, [base_filename].soft.oxml, [base_filename].hard_mem.oxml, [base_filename].hard_mult.oxml, [base_filename].hard.oxml",
169169
)
170170

171171
# Input options

ODIN_II/regression_test/tools/odin_script_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def isVerilog(file):
2424
return re.search("\.v$", file) != None
2525

2626

27-
def isXML(file):
28-
"""Return true if the file has the .xml extension."""
29-
return re.search("\.xml$", file) != None
27+
def isOXML(file):
28+
"""Return true if the file has the .oxml extension."""
29+
return re.search("\.oxml$", file) != None
3030

3131

3232
def isSoft(file):

ODIN_II/regression_test/tools/regression_test_arch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
{
119119
# set up the regex buffer and extract the name without .v extension
120120
$_ = $NEXT_FILE;
121-
s/\.xml//g;
121+
s/\.oxml//g;
122122
$NAME_WITHOUT_EXTENSION = $_;
123123

124124
printf("--------------------------------------------------------------\n");

ODIN_II/regression_test/tools/synth_using_odin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
path = abspath(sys.argv[1]) + "/"
1515
slog = open(path + "ODIN_success.lst", "w")
16-
filelist = filter(odin.isXML, os.listdir(path))
16+
filelist = filter(odin.isOXML, os.listdir(path))
1717

1818
for file in filelist:
1919
cmd = "../../odin_II.exe -c " + path + file

0 commit comments

Comments
 (0)