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

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

77#include <cctype>
78#include <cmath>
79#include <sstream>
80
81#include "systemc/ext/dt/bit/sc_bv_base.hh"
82#include "systemc/ext/dt/bit/sc_lv_base.hh"
83#include "systemc/ext/dt/fx/sc_fix.hh"
84#include "systemc/ext/dt/fx/scfx_other_defs.hh"
85#include "systemc/ext/dt/int/sc_int_base.hh"
86#include "systemc/ext/dt/int/sc_signed.hh"
87#include "systemc/ext/dt/int/sc_uint_base.hh"
88#include "systemc/ext/dt/int/sc_unsigned.hh"
89#include "systemc/ext/dt/misc/sc_concatref.hh"
90
91// explicit template instantiations
92namespace sc_core

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

105sc_core::sc_vpool<sc_signed_bitref> sc_signed_bitref::m_pool(9);
106sc_core::sc_vpool<sc_signed_subref> sc_signed_subref::m_pool(9);
107
108void
109sc_signed::invalid_init(const char *type_name, int nb) const
110{
111 std::stringstream msg;
112 msg << "sc_signed("<< type_name << ") : nb = " << nb << " is not valid";
113 SC_REPORT_ERROR("initialization failed", msg.str().c_str());
114}
115
116// ----------------------------------------------------------------------------
117// SECTION: Public members - Invalid selections.
118// ----------------------------------------------------------------------------
119
120void
121sc_signed::invalid_index(int i) const

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

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

--- 3519 unchanged lines hidden ---