sc_nbexterns.h revision 12027
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 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 15 implied. See the License for the specific language governing 16 permissions and limitations under the License. 17 18 *****************************************************************************/ 19 20/***************************************************************************** 21 22 sc_nbexterns.h -- External functions for both sc_signed and sc_unsigned 23 classes. These functions work on two parameters u and 24 v, and copy the result to the first parameter u. This 25 is also the reason that they are suffixed with _on_help. 26 27 The vec_* functions are called through either these 28 functions or those in sc_nbfriends.cpp. The functions in 29 sc_nbfriends.cpp perform their work on two inputs u and v, 30 and return the result object. 31 32 Original Author: Ali Dasdan, Synopsys, Inc. 33 34 *****************************************************************************/ 35 36/***************************************************************************** 37 38 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 39 changes you are making here. 40 41 Name, Affiliation, Date: 42 Description of Modification: 43 44 *****************************************************************************/ 45 46// $Log: sc_nbexterns.h,v $ 47// Revision 1.2 2011/02/18 20:19:15 acg 48// Andy Goodrich: updating Copyright notice. 49// 50// 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 SC_NBEXTERNS_H 59#define SC_NBEXTERNS_H 60 61 62#include "sysc/datatypes/int/sc_nbutils.h" 63 64 65namespace sc_dt 66{ 67 68extern 69void add_on_help(small_type &us, 70 int unb, int und, sc_digit *ud, 71 small_type vs, 72 int vnb, int vnd, const sc_digit *vd); 73 74extern 75void mul_on_help_signed(small_type &us, 76 int unb, int und, sc_digit *ud, 77 int vnb, int vnd, const sc_digit *vd); 78 79void div_on_help_signed(small_type &us, 80 int unb, int und, sc_digit *ud, 81 int vnb, int vnd, const sc_digit *vd); 82 83extern 84void mod_on_help_signed(small_type &us, 85 int unb, int und, sc_digit *ud, 86 int vnb, int vnd, const sc_digit *vd); 87 88extern 89void mul_on_help_unsigned(small_type &us, 90 int unb, int und, sc_digit *ud, 91 int vnb, int vnd, const sc_digit *vd); 92 93void div_on_help_unsigned(small_type &us, 94 int unb, int und, sc_digit *ud, 95 int vnb, int vnd, const sc_digit *vd); 96 97extern 98void mod_on_help_unsigned(small_type &us, 99 int unb, int und, sc_digit *ud, 100 int vnb, int vnd, const sc_digit *vd); 101 102extern 103void and_on_help(small_type us, 104 int unb, int und, sc_digit *ud, 105 small_type vs, 106 int vnb, int vnd, const sc_digit *vd); 107 108extern 109void or_on_help(small_type us, 110 int unb, int und, sc_digit *ud, 111 small_type vs, 112 int vnb, int vnd, const sc_digit *vd); 113 114extern 115void xor_on_help(small_type us, 116 int unb, int und, sc_digit *ud, 117 small_type vs, 118 int vnb, int vnd, const sc_digit *vd); 119 120} // namespace sc_dt 121 122 123#endif 124