3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

[NFCI] Deduplicate builtin FF cell types list

A few passes included the same list of FF cell types.  Make it a global
const instead.

The zinit pass also seems to include a list like that, but given that
it seems to be completely broken at the time (see #1568 discussion),
I'm going to pretend I didn't see that.
This commit is contained in:
Marcelina Kościelnicka 2020-04-08 17:36:12 +02:00
parent 7f33d43e3b
commit 516857f3ba
5 changed files with 52 additions and 73 deletions

View file

@ -383,6 +383,8 @@ namespace RTLIL
extern dict<std::string, std::string> constpad;
const pool<IdString> &builtin_ff_cell_types();
static inline std::string escape_id(const std::string &str) {
if (str.size() > 0 && str[0] != '\\' && str[0] != '$')
return "\\" + str;