mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-21 22:55:51 +00:00
Merge remote-tracking branch 'upstream/main' into silimate
This commit is contained in:
commit
e58125b605
834 changed files with 25281 additions and 8780 deletions
|
|
@ -275,6 +275,17 @@ struct RTLIL::IdString
|
|||
*out += std::to_string(-index_);
|
||||
}
|
||||
|
||||
std::string unescape() const {
|
||||
if (index_ < 0) {
|
||||
// Must start with "$auto$" so no unescaping required.
|
||||
return str();
|
||||
}
|
||||
std::string_view str = global_id_storage_.at(index_).str_view();
|
||||
if (str.size() < 2 || str[0] != '\\' || str[1] == '$' || str[1] == '\\' || (str[1] >= '0' && str[1] <= '9'))
|
||||
return std::string(str);
|
||||
return std::string(str.substr(1));
|
||||
}
|
||||
|
||||
class Substrings {
|
||||
std::string_view first_;
|
||||
int suffix_number;
|
||||
|
|
@ -737,6 +748,7 @@ template <> struct IDMacroHelper<-1> {
|
|||
namespace RTLIL {
|
||||
extern dict<std::string, std::string> constpad;
|
||||
|
||||
[[deprecated("use StaticCellTypes::categories.is_ff() instead")]]
|
||||
const pool<IdString> &builtin_ff_cell_types();
|
||||
|
||||
static inline std::string escape_id(const std::string &str) {
|
||||
|
|
@ -758,7 +770,7 @@ namespace RTLIL {
|
|||
}
|
||||
|
||||
static inline std::string unescape_id(RTLIL::IdString str) {
|
||||
return unescape_id(str.str());
|
||||
return str.unescape();
|
||||
}
|
||||
|
||||
static inline const char *id2cstr(RTLIL::IdString str) {
|
||||
|
|
@ -1394,6 +1406,8 @@ struct RTLIL::SigSpecConstIterator
|
|||
struct RTLIL::SigSpec
|
||||
{
|
||||
private:
|
||||
friend class SigSpecRepTest;
|
||||
FRIEND_TEST(SigSpecRepTest, Extract);
|
||||
enum Representation : char {
|
||||
CHUNK,
|
||||
BITS,
|
||||
|
|
@ -1758,9 +1772,9 @@ public:
|
|||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
void check(Module *mod = nullptr) const;
|
||||
void check(const Module *mod = nullptr) const;
|
||||
#else
|
||||
void check(Module *mod = nullptr) const { (void)mod; }
|
||||
void check(const Module *mod = nullptr) const { (void)mod; }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue