diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-07 13:44:08 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-07 13:44:08 -0700 |
commit | e3d898dccb3cf535a213f313693b2b7a4ede7c68 (patch) | |
tree | ca5dfdf506a9a5bc37178eaa06f0d285b7649ff5 /kernel/rtlil.cc | |
parent | cdf9c801347693c273309694685b2080ef00fd02 (diff) | |
parent | 3414ee1e3fe37d4bf383621542828d4fc8fc987f (diff) | |
download | yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.gz yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.bz2 yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.zip |
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index fd98ab4bd..976772b5e 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1249,6 +1249,7 @@ namespace { if (cell->type == "$_ANDNOT_") { check_gate("ABY"); return; } if (cell->type == "$_ORNOT_") { check_gate("ABY"); return; } if (cell->type == "$_MUX_") { check_gate("ABSY"); return; } + if (cell->type == "$_NMUX_") { check_gate("ABSY"); return; } if (cell->type == "$_AOI3_") { check_gate("ABCY"); return; } if (cell->type == "$_OAI3_") { check_gate("ABCY"); return; } if (cell->type == "$_AOI4_") { check_gate("ABCDY"); return; } @@ -1976,6 +1977,7 @@ DEF_METHOD_3(XnorGate, "$_XNOR_", A, B, Y) DEF_METHOD_3(AndnotGate, "$_ANDNOT_", A, B, Y) DEF_METHOD_3(OrnotGate, "$_ORNOT_", A, B, Y) DEF_METHOD_4(MuxGate, "$_MUX_", A, B, S, Y) +DEF_METHOD_4(NmuxGate, "$_NMUX_", A, B, S, Y) DEF_METHOD_4(Aoi3Gate, "$_AOI3_", A, B, C, Y) DEF_METHOD_4(Oai3Gate, "$_OAI3_", A, B, C, Y) DEF_METHOD_5(Aoi4Gate, "$_AOI4_", A, B, C, D, Y) @@ -3354,13 +3356,7 @@ RTLIL::SigSpec RTLIL::SigSpec::extract(int offset, int length) const { unpack(); cover("kernel.rtlil.sigspec.extract_pos"); - auto it = bits_.begin() + std::min<int>(offset, width_); - decltype(it) ie; - if (length >= 0) - ie = bits_.begin() + std::min<int>(offset + length, width_); - else - ie = bits_.end() + std::max<int>(length + 1, offset - width_); - return std::vector<RTLIL::SigBit>(it, ie); + return std::vector<RTLIL::SigBit>(bits_.begin() + offset, bits_.begin() + offset + length); } void RTLIL::SigSpec::append(const RTLIL::SigSpec &signal) |