From d5b5f7e4b2573444081ab30d400c3db5d9e278d8 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 9 Mar 2023 11:03:44 +0100 Subject: add new field handling in chip config format --- machxo2/config.cc | 3 +++ machxo2/config.h | 1 + 2 files changed, 4 insertions(+) diff --git a/machxo2/config.cc b/machxo2/config.cc index 34c4954e..8021369d 100644 --- a/machxo2/config.cc +++ b/machxo2/config.cc @@ -268,6 +268,7 @@ bool TileConfig::empty() const { return carcs.empty() && cwords.empty() && cenum std::ostream &operator<<(std::ostream &out, const ChipConfig &cc) { out << ".device " << cc.chip_name << std::endl << std::endl; + out << ".variant " << cc.chip_variant << std::endl << std::endl; for (const auto &meta : cc.metadata) out << ".comment " << meta << std::endl; for (const auto &sc : cc.sysconfig) @@ -312,6 +313,8 @@ std::istream &operator>>(std::istream &in, ChipConfig &cc) in >> verb; if (verb == ".device") { in >> cc.chip_name; + } else if (verb == ".variant") { + in >> cc.chip_variant; } else if (verb == ".comment") { std::string line; getline(in, line); diff --git a/machxo2/config.h b/machxo2/config.h index a71b29a8..141409bc 100644 --- a/machxo2/config.h +++ b/machxo2/config.h @@ -112,6 +112,7 @@ class ChipConfig { public: std::string chip_name; + std::string chip_variant; std::vector metadata; std::map tiles; std::vector tilegroups; -- cgit v1.2.3