78 template class sc_vpool<sc_dt::sc_uint_bitref>;
79 template class sc_vpool<sc_dt::sc_uint_subref>;
91 std::stringstream msg;
92 msg <<
"sc_uint_concref<T1,T2> initialization: length = " <<
length <<
112 sc_uint_bitref::concat_set(
int64 src,
int low_i)
115 *
this =
aa = (low_i < 64) ? src >> low_i : src >> 63;
119 sc_uint_bitref::concat_set(
const sc_signed &src,
int low_i)
123 *
this =
aa = 1 & (src >> low_i);
133 *
this =
aa = 1 & (src >> low_i);
139 sc_uint_bitref::concat_set(
uint64 src,
int low_i)
142 *
this =
aa = (low_i < 64) ? src >> low_i : 0;
148 sc_uint_bitref::scan(::std::istream &
is)
163 sc_uint_subref_r::concat_get_ctrl(
sc_digit *dst_p,
int low_i)
const
178 for (; dst_i <= end_i; dst_i++)
185 sc_uint_subref_r::concat_get_data(
sc_digit *dst_p,
int low_i)
const
197 high_i = low_i + (m_left-m_right);
200 val = (m_obj_p->m_val &
mask) >> m_right;
208 switch (end_i - dst_i) {
256 m_obj_p->m_val =
val;
257 m_obj_p->extend_sign();
265 return (*
this =
aa =
a);
272 return (*
this =
aa =
a);
279 return (*
this =
aa =
a);
286 return (*
this =
aa =
a);
293 sc_uint_subref::concat_set(
int64 src,
int low_i)
296 *
this =
aa = (low_i < 64) ? src >> low_i : src >> 63;
300 sc_uint_subref::concat_set(
const sc_signed &src,
int low_i)
304 *
this =
aa = src >> low_i;
314 *
this =
aa = src >> low_i;
320 sc_uint_subref::concat_set(
uint64 src,
int low_i)
323 *
this =
aa = (low_i < 64) ? src >> low_i : 0;
328 sc_uint_subref::scan(::std::istream &
is)
345 sc_uint_base::invalid_length()
const
347 std::stringstream msg;
348 msg <<
"sc_uint[_base] initialization: length = " << m_len <<
355 sc_uint_base::invalid_index(
int i)
const
357 std::stringstream msg;
358 msg <<
"sc_uint[_base] bit selection: index = " <<
i <<
359 " violates 0 <= index <= " << (m_len - 1);
365 sc_uint_base::invalid_range(
int l,
int r)
const
367 std::stringstream msg;
368 msg <<
"sc_uint[_base] part selection: " <<
369 "left = " <<
l <<
", right = " <<
r <<
" violates " <<
370 (m_len - 1) <<
" >= left >= right >= 0";
377 sc_uint_base::check_value()
const
381 std::stringstream msg;
382 msg <<
"sc_uint[_base]: value does not fit into a length of " << m_len;
405 *
this =
v.to_uint64();
411 *
this =
v.to_uint64();
417 *
this =
v.to_uint64();
424 *
this =
a.to_uint64();
431 *
this =
a.to_uint64();
441 for (;
i < minlen; ++
i) {
458 for (;
i < minlen; ++
i) {
475 for (;
i < minlen; ++
i) {
491 for (;
i < minlen; ++
i) {
507 "character string is zero");
508 }
else if (*
a == 0) {
510 "character string is empty");
516 std::stringstream msg;
517 msg <<
"character string '" <<
a <<
"' is not valid";
530 return aa.to_string(numrep);
538 return aa.to_string(numrep, w_prefix);
587 for (; dst_i <= end_i; dst_i++)
620 high_i = low_i + (
m_len - 1);
636 switch (end_i - dst_i) {
671 *
this = (low_i < 64) ? src >> low_i : src >> 63;
678 *
this = src >> low_i;
680 *
this = (src < 0) ? (
int_type)-1 : 0;
687 *
this = src >> low_i;
695 *
this = (low_i < 64) ? src >> low_i : 0;