3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-20 07:36:39 +00:00

silly compat file

This commit is contained in:
Emil J. Tywoniak 2024-06-13 18:35:01 +02:00
parent 61cf4b6fb6
commit cc10ef7019
2 changed files with 26 additions and 0 deletions

20
kernel/compat.cc Normal file
View file

@ -0,0 +1,20 @@
#include "hashlib.h"
#include "rtlil.h"
YOSYS_NAMESPACE_BEGIN
/**
* not sure if I need this file but this couldn't go in either
* hashlib or rtlil without adding an include to the other header
*/
dict<RTLIL::IdString, RTLIL::Const> cell_to_mod_params (const RTLIL::Cell::FakeParams& cell_params) {
dict<RTLIL::IdString, RTLIL::Const> ret;
for (auto i : cell_params){
ret[i.first] = i.second;
}
return ret;
}
YOSYS_NAMESPACE_END

6
kernel/compat.h Normal file
View file

@ -0,0 +1,6 @@
// TODO header whatever
#ifndef COMPAT_H
#define COMPAT_H
dict<RTLIL::IdString, RTLIL::Const> cell_to_mod_params (const RTLIL::Cell::FakeParams& cell_params);
#endif