Deleted Added
sdiff udiff text old ( 13322:7391057615bd ) new ( 13325:86323e6cc8ec )
full compact
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

--- 70 unchanged lines hidden (view full) ---

79#include <cctype>
80#include <cmath>
81#include <sstream>
82
83#include "systemc/ext/dt/bit/sc_bv_base.hh"
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"
93
94// explicit template instantiations

--- 18 unchanged lines hidden (view full) ---

113sc_core::sc_vpool<sc_unsigned_subref> sc_unsigned_subref::m_pool(9);
114
115
116void
117sc_unsigned::invalid_init(const char *type_name, int nb) const
118{
119 std::stringstream msg;
120 msg << "sc_unsigned("<< type_name << ") : nb = " << nb << " is not valid";
121 SC_REPORT_ERROR("initialization failed", msg.str().c_str());
122}
123
124
125// ----------------------------------------------------------------------------
126// SECTION: Public members - Invalid selections.
127// ----------------------------------------------------------------------------
128
129void

--- 303 unchanged lines hidden (view full) ---

433// SECTION: Public members - Assignment operators.
434// ----------------------------------------------------------------------------
435
436// assignment operators
437const sc_unsigned &
438sc_unsigned::operator = (const char *a)
439{
440 if (a == 0) {
441 SC_REPORT_ERROR("conversion failed",
442 "character string is zero");
443 } else if (*a == 0) {
444 SC_REPORT_ERROR("conversion failed",
445 "character string is empty");
446 } else try {
447 int len = length();
448 sc_ufix aa(a, len, len, SC_TRN, SC_WRAP, 0, SC_ON);
449 return this->operator = (aa);
450 } catch(const sc_core::sc_report &) {
451 std::stringstream msg;
452 msg << "character string '" << a << "' is not valid";
453 SC_REPORT_ERROR("conversion failed", msg.str().c_str());
454 }
455 return *this;
456}
457
458const sc_unsigned &
459sc_unsigned::operator = (int64 v)
460{
461 sgn = get_sign(v);

--- 1799 unchanged lines hidden ---