[lib] debugging
This commit is contained in:
parent
b8b846d3eb
commit
27f4a174b0
|
@ -12,6 +12,8 @@ endif(CSV_CXX_STANDARD)
|
|||
option(BUILD_PYTHON "Build Python Binding" OFF)
|
||||
|
||||
message("Building CSV library using C++${CMAKE_CXX_STANDARD}")
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads QUIET REQUIRED)
|
||||
|
||||
# Defines CSV_HAS_CXX17 in compatibility.hpp
|
||||
if (CMAKE_VERSION VERSION_LESS "3.12.0")
|
||||
|
|
|
@ -22,7 +22,7 @@ IoPinTable::IoPinTable() {
|
|||
/************************************************************************
|
||||
* Public Accessors : aggregates
|
||||
***********************************************************************/
|
||||
IoPinTable::io_pin_table_range IoPinTable::internal_pins() const {
|
||||
IoPinTable::io_pin_table_range IoPinTable::pins() const {
|
||||
return vtr::make_range(pin_ids_.begin(), pin_ids_.end());
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class IoPinTable {
|
|||
/* Walk through the internal pins. We do not walk through external pins because they are not unique in the table.
|
||||
* An external pin may be accessible by two internal pins
|
||||
*/
|
||||
io_pin_table_range internal_pins() const;
|
||||
io_pin_table_range pins() const;
|
||||
public: /* Public Accessors: Basic data query */
|
||||
/* Get the basic information for a pin */
|
||||
openfpga::BasicPort internal_pin(const IoPinTableId& pin_id) const;
|
||||
|
|
|
@ -45,16 +45,16 @@ int write_csv_io_pin_table(const char* fname,
|
|||
|
||||
/* Print head row */
|
||||
std::vector<std::string> head_row_str({"orientation", "port_name", "mapped_pin", "direction"});
|
||||
writer << head_row_str << "\n";
|
||||
writer << head_row_str;
|
||||
|
||||
/* Print data */
|
||||
for (const IoPinTableId& pin_id : io_pin_table.pins()) {
|
||||
std::vector<std::string> data_row_str;
|
||||
data_row_str.append(SIDE_STRING[io_pin_table.pin_side(pin_id)]);
|
||||
data_row_str.append(generate_xml_port_name(io_pin_table.internal_pin(pin_id)));
|
||||
data_row_str.append(generate_xml_port_name(io_pin_table.external_pin(pin_id)));
|
||||
data_row_str.append(IO_DIRECTION_STRING[io_pin_table.pin_direction(pin_id)]);
|
||||
writer << data_row_str << "\n";
|
||||
data_row_str.push_back(SIDE_STRING[io_pin_table.pin_side(pin_id)]);
|
||||
data_row_str.push_back(generate_xml_port_name(io_pin_table.internal_pin(pin_id)));
|
||||
data_row_str.push_back(generate_xml_port_name(io_pin_table.external_pin(pin_id)));
|
||||
data_row_str.push_back(IO_DIRECTION_STRING[io_pin_table.pin_direction(pin_id)]);
|
||||
writer << data_row_str;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -16,7 +16,7 @@ int main(int argc, const char** argv) {
|
|||
VTR_ASSERT((2 == argc) || (3 == argc));
|
||||
|
||||
/* Parse the fabric key from an XML file */
|
||||
openfpga::IoPinTable io_pin_table = openfpga::read_csv_io_io_pin_table(argv[1]);
|
||||
openfpga::IoPinTable io_pin_table = openfpga::read_csv_io_pin_table(argv[1]);
|
||||
VTR_LOG("Read the I/O pin table from a csv file: %s.\n",
|
||||
argv[1]);
|
||||
|
||||
|
@ -24,7 +24,7 @@ int main(int argc, const char** argv) {
|
|||
* This is optional only used when there is a second argument
|
||||
*/
|
||||
if (3 <= argc) {
|
||||
write_csv_io_pin_table(std::string(argv[2]), io_pin_table);
|
||||
write_csv_io_pin_table(argv[2], io_pin_table);
|
||||
VTR_LOG("Echo the I/O pin table to a csv file: %s.\n",
|
||||
argv[2]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue