mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-05-04 23:25:13 +00:00
frontend: Support for loading settings and nextpnr state
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
@@ -134,6 +134,16 @@ struct JsonFrontendImpl
|
||||
}
|
||||
}
|
||||
|
||||
template <typename TFunc> void foreach_setting(const Json &obj, TFunc Func) const
|
||||
{
|
||||
const auto &settings = obj["settings"];
|
||||
if (settings.is_null())
|
||||
return;
|
||||
for (const auto &setting : settings.object_items()) {
|
||||
Func(setting.first, parse_property(setting.second));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename TFunc> void foreach_port_dir(const CellDataType &cell, TFunc Func) const
|
||||
{
|
||||
for (const auto &pdir : cell["port_directions"].object_items())
|
||||
|
||||
Reference in New Issue
Block a user