From 8c0610e84fa6a38d3f351774bd81a32c96a91242 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sun, 13 Oct 2019 18:48:39 +0100 Subject: ice40: Add set_frequency pcf command; and document pcf Signed-off-by: David Shah --- ice40/pcf.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ice40/pcf.cc') diff --git a/ice40/pcf.cc b/ice40/pcf.cc index 8c61eb23..526b3d64 100644 --- a/ice40/pcf.cc +++ b/ice40/pcf.cc @@ -100,6 +100,10 @@ bool apply_pcf(Context *ctx, std::string filename, std::istream &in) for (const auto &attr : extra_attrs) fnd_cell->second->attrs[attr.first] = attr.second; } + } else if (cmd == "set_frequency") { + if (words.size() < 3) + log_error("expected PCF syntax 'set_frequency net frequency' (on line %d)\n", lineno); + ctx->addClock(ctx->id(words.at(1)), std::stof(words.at(2))); } else { log_error("unsupported PCF command '%s' (on line %d)\n", cmd.c_str(), lineno); } -- cgit v1.2.3