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 --- 34 unchanged lines hidden (view full) --- 43// 44// Revision 1.3 2006/01/13 18:53:53 acg 45// Andy Goodrich: added $Log command so that CVS comments are reproduced in 46// the source. 47// 48 49#include <sstream> 50 |
51#include "systemc/ext/dt/bit/messages.hh" |
52#include "systemc/ext/dt/bit/sc_logic.hh" 53#include "systemc/ext/utils/sc_report_handler.hh" 54 55namespace sc_dt 56{ 57 58// ---------------------------------------------------------------------------- 59// CLASS : sc_logic --- 8 unchanged lines hidden (view full) --- 68 invalid_value((int)v); 69} 70 71void 72sc_logic::invalid_value(char c) 73{ 74 std::stringstream msg; 75 msg << "sc_logic('" << c << "')"; |
76 SC_REPORT_ERROR(sc_core::SC_ID_VALUE_NOT_VALID_, msg.str().c_str()); |
77} 78 79void 80sc_logic::invalid_value(int i) 81{ 82 std::stringstream msg; 83 msg << "sc_logic(" << i << ")"; |
84 SC_REPORT_ERROR(sc_core::SC_ID_VALUE_NOT_VALID_, msg.str().c_str()); |
85} 86 87 88void 89sc_logic::invalid_01() const 90{ |
91 if ((int)m_val == Log_Z) 92 SC_REPORT_WARNING(sc_core::SC_ID_LOGIC_Z_TO_BOOL_, 0); 93 else 94 SC_REPORT_WARNING(sc_core::SC_ID_LOGIC_X_TO_BOOL_, 0); |
95} 96 97 98// conversion tables 99const sc_logic_value_t sc_logic::char_to_logic[128] = { 100 Log_0, Log_1, Log_Z, Log_X, Log_X, Log_X, Log_X, Log_X, 101 Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, 102 Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, --- 64 unchanged lines hidden --- |