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/messages.hh"
86#include "systemc/ext/dt/int/sc_int_base.hh"
87#include "systemc/ext/dt/int/sc_signed.hh"
88#include "systemc/ext/dt/int/sc_uint_base.hh"
89#include "systemc/ext/dt/int/sc_unsigned.hh"
90#include "systemc/ext/dt/misc/sc_concatref.hh"
91
92// explicit template instantiations
93namespace sc_core

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

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

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

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

--- 3519 unchanged lines hidden ---