From 1d1c2d7e8c96c0d96024fddfa9fbdf145317f9b2 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 26 Jul 2022 21:08:41 -0700 Subject: [PATCH] [lib] developing csv reader for io pin table --- .../libpcf/src/io/read_csv_io_pin_table.cpp | 37 +++++++++++++++++++ .../libpcf/src/io/read_csv_io_pin_table.h | 20 ++++++++++ 2 files changed, 57 insertions(+) create mode 100644 libopenfpga/libpcf/src/io/read_csv_io_pin_table.cpp create mode 100644 libopenfpga/libpcf/src/io/read_csv_io_pin_table.h diff --git a/libopenfpga/libpcf/src/io/read_csv_io_pin_table.cpp b/libopenfpga/libpcf/src/io/read_csv_io_pin_table.cpp new file mode 100644 index 000000000..5911e8b1f --- /dev/null +++ b/libopenfpga/libpcf/src/io/read_csv_io_pin_table.cpp @@ -0,0 +1,37 @@ +/******************************************************************** + * This file includes the top-level function of this library + * which reads an XML of pin constraints to the associated + * data structures + *******************************************************************/ +#include + +/* Headers from vtr util library */ +#include "vtr_assert.h" +#include "vtr_time.h" + +/* Headers from libopenfpga util library */ +#include "openfpga_port_parser.h" + +#include "csv.hpp" + +#include "read_csv_io_pin_table.h" + +/* Begin namespace openfpga */ +namespace openfpga { + +/******************************************************************** + * Parse XML codes about to an object of PinConstraints + *******************************************************************/ +IoPinTable read_csv_io_pin_table(const char* fname) { + vtr::ScopedStartFinishTimer timer("Read I/O Pin Table"); + + IoPinTable io_pin_table; + + + return io_pin_table; +} + +} /* End namespace openfpga*/ + + + diff --git a/libopenfpga/libpcf/src/io/read_csv_io_pin_table.h b/libopenfpga/libpcf/src/io/read_csv_io_pin_table.h new file mode 100644 index 000000000..3da916b53 --- /dev/null +++ b/libopenfpga/libpcf/src/io/read_csv_io_pin_table.h @@ -0,0 +1,20 @@ +#ifndef READ_CSV_IO_PIN_TABLE_H +#define READ_CSV_IO_PIN_TABLE_H + +/******************************************************************** + * Include header files that are required by function declaration + *******************************************************************/ +#include +#include "io_pin_table.h" + +/******************************************************************** + * Function declaration + *******************************************************************/ +/* Begin namespace openfpga */ +namespace openfpga { + +IoPinTable read_csv_io_pin_table(const char* fname); + +} /* End namespace openfpga*/ + +#endif