projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d1ce04
)
SigSpec::extract to allow negative length
author
Eddie Hung
<eddie@fpgeh.com>
Tue, 16 Jul 2019 21:06:07 +0000
(14:06 -0700)
committer
Eddie Hung
<eddie@fpgeh.com>
Tue, 16 Jul 2019 21:06:07 +0000
(14:06 -0700)
kernel/rtlil.cc
patch
|
blob
|
history
diff --git
a/kernel/rtlil.cc
b/kernel/rtlil.cc
index ebb6f5bf63be8b832bf336dbfc18c331d5f415c5..6f50821383ec19a060e348f2acddf14d36d15d1e 100644
(file)
--- a/
kernel/rtlil.cc
+++ b/
kernel/rtlil.cc
@@
-3353,7
+3353,7
@@
RTLIL::SigSpec RTLIL::SigSpec::extract(int offset, int length) const
{
unpack();
cover("kernel.rtlil.sigspec.extract_pos");
- return std::vector<RTLIL::SigBit>(bits_.begin() + offset,
bits_.begin() + offset + length
);
+ return std::vector<RTLIL::SigBit>(bits_.begin() + offset,
length >= 0 ? bits_.begin() + offset + length : bits_.end() + length + 1
);
}
void RTLIL::SigSpec::append(const RTLIL::SigSpec &signal)