sc_nbexterns.hh revision 12853
112855Sgabeblack@google.com/***************************************************************************** 212855Sgabeblack@google.com 312855Sgabeblack@google.com Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 412855Sgabeblack@google.com more contributor license agreements. See the NOTICE file distributed 512855Sgabeblack@google.com with this work for additional information regarding copyright ownership. 612855Sgabeblack@google.com Accellera licenses this file to you under the Apache License, Version 2.0 712855Sgabeblack@google.com (the "License"); you may not use this file except in compliance with the 812855Sgabeblack@google.com License. You may obtain a copy of the License at 912855Sgabeblack@google.com 1012855Sgabeblack@google.com http://www.apache.org/licenses/LICENSE-2.0 1112855Sgabeblack@google.com 1212855Sgabeblack@google.com Unless required by applicable law or agreed to in writing, software 1312855Sgabeblack@google.com distributed under the License is distributed on an "AS IS" BASIS, 1412855Sgabeblack@google.com WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1512855Sgabeblack@google.com implied. See the License for the specific language governing 1612855Sgabeblack@google.com permissions and limitations under the License. 1712855Sgabeblack@google.com 1812855Sgabeblack@google.com *****************************************************************************/ 1912855Sgabeblack@google.com 2012855Sgabeblack@google.com/***************************************************************************** 2112855Sgabeblack@google.com 2212855Sgabeblack@google.com sc_nbexterns.h -- External functions for both sc_signed and sc_unsigned 2312855Sgabeblack@google.com classes. These functions work on two parameters u and 2412855Sgabeblack@google.com v, and copy the result to the first parameter u. This 2512855Sgabeblack@google.com is also the reason that they are suffixed with _on_help. 2612855Sgabeblack@google.com 2712855Sgabeblack@google.com The vec_* functions are called through either these 2812855Sgabeblack@google.com functions or those in sc_nbfriends.cpp. The functions in 2912855Sgabeblack@google.com sc_nbfriends.cpp perform their work on two inputs u and v, 3012855Sgabeblack@google.com and return the result object. 3112855Sgabeblack@google.com 3212855Sgabeblack@google.com Original Author: Ali Dasdan, Synopsys, Inc. 3312855Sgabeblack@google.com 3412855Sgabeblack@google.com *****************************************************************************/ 3512855Sgabeblack@google.com 3612855Sgabeblack@google.com/***************************************************************************** 3712855Sgabeblack@google.com 3812855Sgabeblack@google.com MODIFICATION LOG - modifiers, enter your name, affiliation, date and 3912855Sgabeblack@google.com changes you are making here. 4012855Sgabeblack@google.com 4112855Sgabeblack@google.com Name, Affiliation, Date: 4212855Sgabeblack@google.com Description of Modification: 4312855Sgabeblack@google.com 4412855Sgabeblack@google.com *****************************************************************************/ 4512855Sgabeblack@google.com 4612855Sgabeblack@google.com// $Log: sc_nbexterns.h,v $ 4712855Sgabeblack@google.com// Revision 1.2 2011/02/18 20:19:15 acg 4812855Sgabeblack@google.com// Andy Goodrich: updating Copyright notice. 4912855Sgabeblack@google.com// 5012855Sgabeblack@google.com// Revision 1.1.1.1 2006/12/15 20:20:05 acg 51// SystemC 2.3 52// 53// Revision 1.3 2006/01/13 18:49:32 acg 54// Added $Log command so that CVS check in comments are reproduced in the 55// source. 56// 57 58#ifndef __SYSTEMC_EXT_DT_INT_SC_NBEXTERNS_HH__ 59#define __SYSTEMC_EXT_DT_INT_SC_NBEXTERNS_HH__ 60 61#include "sc_nbutils.hh" 62 63namespace sc_dt 64{ 65 66extern void add_on_help( 67 small_type &us, int unb, int und, sc_digit *ud, 68 small_type vs, int vnb, int vnd, const sc_digit *vd); 69 70extern void mul_on_help_signed( 71 small_type &us, int unb, int und, sc_digit *ud, 72 int vnb, int vnd, const sc_digit *vd); 73 74void div_on_help_signed( 75 small_type &us, int unb, int und, sc_digit *ud, 76 int vnb, int vnd, const sc_digit *vd); 77 78extern void mod_on_help_signed( 79 small_type &us, int unb, int und, sc_digit *ud, 80 int vnb, int vnd, const sc_digit *vd); 81 82extern void mul_on_help_unsigned( 83 small_type &us, int unb, int und, sc_digit *ud, 84 int vnb, int vnd, const sc_digit *vd); 85 86void div_on_help_unsigned( 87 small_type &us, int unb, int und, sc_digit *ud, 88 int vnb, int vnd, const sc_digit *vd); 89 90extern void mod_on_help_unsigned( 91 small_type &us, int unb, int und, sc_digit *ud, 92 int vnb, int vnd, const sc_digit *vd); 93 94extern void and_on_help( 95 small_type us, int unb, int und, sc_digit *ud, 96 small_type vs, int vnb, int vnd, const sc_digit *vd); 97 98extern void or_on_help( 99 small_type us, int unb, int und, sc_digit *ud, 100 small_type vs, int vnb, int vnd, const sc_digit *vd); 101 102extern void xor_on_help( 103 small_type us, int unb, int und, sc_digit *ud, 104 small_type vs, int vnb, int vnd, const sc_digit *vd); 105 106} // namespace sc_dt 107 108#endif // __SYSTEMC_EXT_DT_INT_SC_NBEXTERNS_HH__ 109