-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<module_mames> | ||
<module_name default="tile_0__1_" given="tile_io_bottom"/> | ||
<module_name default="tile_1__1_" given="tile_clb"/> | ||
<module_name default="tile_1__0_" given="tile_io_left"/> | ||
</ports> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/******************************************************************** | ||
* Unit test functions to validate the correctness of | ||
* 1. parser of data structures | ||
* 2. writer of data structures | ||
*******************************************************************/ | ||
/* Headers from vtrutils */ | ||
#include "vtr_assert.h" | ||
#include "vtr_log.h" | ||
|
||
/* Headers from readarchopenfpga */ | ||
#include "read_xml_module_name_map.h" | ||
#include "write_xml_module_name_map.h" | ||
|
||
int main(int argc, const char** argv) { | ||
/* Ensure we have only one or two argument */ | ||
VTR_ASSERT((2 == argc) || (3 == argc)); | ||
|
||
int status = 0; | ||
|
||
/* Parse the circuit library from an XML file */ | ||
openfpga::ModuleNameMap module_name_map; | ||
status = openfpga::read_xml_module_name_map(argv[1], module_name_map); | ||
if (status != 0) { | ||
return status; | ||
} | ||
VTR_LOG("Parsed %lu default names from XML.\n", | ||
module_name_map.tags().size()); | ||
|
||
/* Output the bus group to an XML file | ||
* This is optional only used when there is a second argument | ||
*/ | ||
if (3 <= argc) { | ||
status = openfpga::write_xml_module_name_map(argv[2], module_name_map); | ||
VTR_LOG("Write the module name mapping to an XML file: %s.\n", argv[2]); | ||
} | ||
|
||
return status; | ||
} |