sc_unsigned.cc (13160:1e959d3afc64) | sc_unsigned.cc (13322:7391057615bd) |
---|---|
1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 75 unchanged lines hidden (view full) --- 84#include "systemc/ext/dt/bit/sc_lv_base.hh" 85#include "systemc/ext/dt/fx/sc_ufix.hh" 86#include "systemc/ext/dt/fx/scfx_other_defs.hh" 87#include "systemc/ext/dt/int/sc_int_base.hh" 88#include "systemc/ext/dt/int/sc_signed.hh" 89#include "systemc/ext/dt/int/sc_uint_base.hh" 90#include "systemc/ext/dt/int/sc_unsigned.hh" 91#include "systemc/ext/dt/misc/sc_concatref.hh" | 1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 75 unchanged lines hidden (view full) --- 84#include "systemc/ext/dt/bit/sc_lv_base.hh" 85#include "systemc/ext/dt/fx/sc_ufix.hh" 86#include "systemc/ext/dt/fx/scfx_other_defs.hh" 87#include "systemc/ext/dt/int/sc_int_base.hh" 88#include "systemc/ext/dt/int/sc_signed.hh" 89#include "systemc/ext/dt/int/sc_uint_base.hh" 90#include "systemc/ext/dt/int/sc_unsigned.hh" 91#include "systemc/ext/dt/misc/sc_concatref.hh" |
92#include "systemc/ext/utils/messages.hh" |
|
92 93// explicit template instantiations 94namespace sc_core 95{ 96 97template class sc_vpool<sc_dt::sc_unsigned_bitref>; 98template class sc_vpool<sc_dt::sc_unsigned_subref>; 99template class sc_vpool<sc_dt::sc_unsigned>; --- 26 unchanged lines hidden (view full) --- 126// ---------------------------------------------------------------------------- 127 128void 129sc_unsigned::invalid_index(int i) const 130{ 131 std::stringstream msg; 132 msg << "sc_biguint bit selection: index = " << i << " violates " 133 "0 <= index <= " << (nbits-2); | 93 94// explicit template instantiations 95namespace sc_core 96{ 97 98template class sc_vpool<sc_dt::sc_unsigned_bitref>; 99template class sc_vpool<sc_dt::sc_unsigned_subref>; 100template class sc_vpool<sc_dt::sc_unsigned>; --- 26 unchanged lines hidden (view full) --- 127// ---------------------------------------------------------------------------- 128 129void 130sc_unsigned::invalid_index(int i) const 131{ 132 std::stringstream msg; 133 msg << "sc_biguint bit selection: index = " << i << " violates " 134 "0 <= index <= " << (nbits-2); |
134 SC_REPORT_ERROR("(E5) out of bounds", msg.str().c_str()); | 135 SC_REPORT_ERROR(sc_core::SC_ID_OUT_OF_BOUNDS_, msg.str().c_str()); |
135 sc_core::sc_abort(); // can't recover from here 136} 137 138void 139sc_unsigned::invalid_range(int l, int r) const 140{ 141 std::stringstream msg; 142 msg << "sc_biguint part selection: left = " << 143 l << ", right = " << r << " \n" 144 " violates either (" << (nbits - 2) << " >= left >= 0) or " 145 "(" << (nbits-2) << " >= right >= 0)"; | 136 sc_core::sc_abort(); // can't recover from here 137} 138 139void 140sc_unsigned::invalid_range(int l, int r) const 141{ 142 std::stringstream msg; 143 msg << "sc_biguint part selection: left = " << 144 l << ", right = " << r << " \n" 145 " violates either (" << (nbits - 2) << " >= left >= 0) or " 146 "(" << (nbits-2) << " >= right >= 0)"; |
146 SC_REPORT_ERROR("(E5) out of bounds", msg.str().c_str()); | 147 SC_REPORT_ERROR(sc_core::SC_ID_OUT_OF_BOUNDS_, msg.str().c_str()); |
147 sc_core::sc_abort(); // can't recover from here 148} 149 150// ---------------------------------------------------------------------------- 151// SECTION: Public members - Concatenation support. 152// ---------------------------------------------------------------------------- 153 154// Most public members are included from sc_nbcommon.inc. However, some --- 2105 unchanged lines hidden --- | 148 sc_core::sc_abort(); // can't recover from here 149} 150 151// ---------------------------------------------------------------------------- 152// SECTION: Public members - Concatenation support. 153// ---------------------------------------------------------------------------- 154 155// Most public members are included from sc_nbcommon.inc. However, some --- 2105 unchanged lines hidden --- |