mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-26 00:52:35 +00:00
Merge from upstream
This commit is contained in:
commit
e21324d609
23 changed files with 986 additions and 593 deletions
|
|
@ -1428,13 +1428,13 @@ void reintegrate(RTLIL::Module *module, bool dff_mode)
|
|||
// Copy connections (and rename) from mapped_mod to module
|
||||
for (auto conn : mapped_mod->connections()) {
|
||||
if (!conn.first.is_fully_const()) {
|
||||
auto chunks = conn.first.chunks();
|
||||
std::vector<RTLIL::SigChunk> chunks = conn.first.chunks();
|
||||
for (auto &c : chunks)
|
||||
c.wire = module->wires_.at(remap_name(c.wire->name));
|
||||
conn.first = std::move(chunks);
|
||||
}
|
||||
if (!conn.second.is_fully_const()) {
|
||||
auto chunks = conn.second.chunks();
|
||||
std::vector<RTLIL::SigChunk> chunks = conn.second.chunks();
|
||||
for (auto &c : chunks)
|
||||
if (c.wire)
|
||||
c.wire = module->wires_.at(remap_name(c.wire->name));
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@ int LibertyInputStream::peek_cold(size_t offset)
|
|||
if (!extend_buffer_at_least(offset + 1))
|
||||
return EOF;
|
||||
}
|
||||
|
||||
#ifdef log_assert
|
||||
log_assert(buf_pos + offset < buffer.size());
|
||||
#endif
|
||||
return buffer[buf_pos + offset];
|
||||
}
|
||||
|
||||
|
|
@ -458,7 +460,6 @@ int LibertyParser::lexer_inner(std::string &str)
|
|||
// if it wasn't an identifer, number of array range,
|
||||
// maybe it's a string?
|
||||
if (c == '"') {
|
||||
f.consume(1);
|
||||
size_t i = 0;
|
||||
while (true) {
|
||||
c = f.peek(i);
|
||||
|
|
@ -469,14 +470,13 @@ int LibertyParser::lexer_inner(std::string &str)
|
|||
break;
|
||||
}
|
||||
str.clear();
|
||||
f.unget();
|
||||
str.append(f.buffered_data(), f.buffered_data() + i + 1);
|
||||
str.append(f.buffered_data(), f.buffered_data() + i);
|
||||
// Usage in filterlib is expected to retain quotes
|
||||
// but yosys expects to get unquoted
|
||||
#ifdef FILTERLIB
|
||||
str = "\"" + str + "\"";
|
||||
#endif
|
||||
f.consume(i + 2);
|
||||
f.consume(i + 1);
|
||||
return 'v';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue