sc_logic.cc (12854:c95c35407325) | sc_logic.cc (13160:1e959d3afc64) |
---|---|
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 --- 58 unchanged lines hidden (view full) --- 67 invalid_value((int)v); 68} 69 70void 71sc_logic::invalid_value(char c) 72{ 73 std::stringstream msg; 74 msg << "sc_logic('" << c << "')"; | 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 --- 58 unchanged lines hidden (view full) --- 67 invalid_value((int)v); 68} 69 70void 71sc_logic::invalid_value(char c) 72{ 73 std::stringstream msg; 74 msg << "sc_logic('" << c << "')"; |
75 SC_REPORT_ERROR("value is not valid", msg.str().c_str()); | 75 SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str()); |
76} 77 78void 79sc_logic::invalid_value(int i) 80{ 81 std::stringstream msg; 82 msg << "sc_logic(" << i << ")"; | 76} 77 78void 79sc_logic::invalid_value(int i) 80{ 81 std::stringstream msg; 82 msg << "sc_logic(" << i << ")"; |
83 SC_REPORT_ERROR("value is not valid", msg.str().c_str()); | 83 SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str()); |
84} 85 86 87void 88sc_logic::invalid_01() const 89{ 90 if ((int)m_val == Log_Z) { | 84} 85 86 87void 88sc_logic::invalid_01() const 89{ 90 if ((int)m_val == Log_Z) { |
91 SC_REPORT_WARNING("sc_logic value 'Z' cannot be converted to bool", 0); | 91 SC_REPORT_WARNING( 92 "(W211) sc_logic value 'Z' cannot be converted to bool", 0); |
92 } else { | 93 } else { |
93 SC_REPORT_WARNING("sc_logic value 'X' cannot be converted to bool", 0); | 94 SC_REPORT_WARNING( 95 "(W212) sc_logic value 'X' cannot be converted to bool", 0); |
94 } 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, --- 65 unchanged lines hidden --- | 96 } 97} 98 99 100// conversion tables 101const sc_logic_value_t sc_logic::char_to_logic[128] = { 102 Log_0, Log_1, Log_Z, Log_X, Log_X, Log_X, Log_X, Log_X, 103 Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, Log_X, --- 65 unchanged lines hidden --- |