diff options
Diffstat (limited to 'src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing')
11 files changed, 1152 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/common.h b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/common.h new file mode 100644 index 000000000..1af56c523 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/common.h @@ -0,0 +1,45 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + common.h -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#ifndef COMMON_H +#define COMMON_H + +#include "systemc.h" + +typedef sc_signal<sc_bv<8> > sc_signal_bool_vector; + +#endif diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/display.cpp b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/display.cpp new file mode 100644 index 000000000..79d2a0f86 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/display.cpp @@ -0,0 +1,50 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + display.cpp -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "display.h" + +void display::entry() { + + while(true){ + do { wait(); } while ( in_valid == false); + cout << "Display: " << in_value1.read() << " " << in_value2.read() << " " << in_value3.read() << " " << in_value4.read() << " " << in_value5.read() << " " << in_value6.read() << endl; + do { wait(); } while ( in_valid == true); + } + +} +// EOF diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/display.h b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/display.h new file mode 100644 index 000000000..5e938dbf5 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/display.h @@ -0,0 +1,87 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + display.h -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "common.h" + +SC_MODULE( display ) +{ + SC_HAS_PROCESS( display ); + + sc_in_clk clk; + + const sc_signal_bool_vector& in_value1; // Output port + const sc_signal_bool_vector& in_value2; // Output port + const sc_signal<long>& in_value3; // Output port + const sc_signal<int>& in_value4; // Output port + const sc_signal<short>& in_value5; // Output port + const sc_signal<char>& in_value6; // Output port + const sc_signal<bool>& in_valid; // Output port + + // + // Constructor + // + + display( + sc_module_name NAME, // reference name + sc_clock& CLK, // clock + const sc_signal_bool_vector& IN_VALUE1, + const sc_signal_bool_vector& IN_VALUE2, + const sc_signal<long>& IN_VALUE3, + const sc_signal<int>& IN_VALUE4, + const sc_signal<short>& IN_VALUE5, + const sc_signal<char>& IN_VALUE6, + const sc_signal<bool>& IN_VALID + ) + : + in_value1 (IN_VALUE1), + in_value2 (IN_VALUE2), + in_value3 (IN_VALUE3), + in_value4 (IN_VALUE4), + in_value5 (IN_VALUE5), + in_value6 (IN_VALUE6), + in_valid (IN_VALID) + { + clk (CLK); + SC_CTHREAD( entry, clk.pos() ); + }; + + + void entry(); +}; + +// EOF diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/golden/sharing.log b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/golden/sharing.log new file mode 100644 index 000000000..acc069982 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/golden/sharing.log @@ -0,0 +1,203 @@ +SystemC Simulation +Stimuli: -37 1 1 -1 20000 +Display: 11111011 00000000 0 -1 0 ) +Stimuli: -36 2 2 0 20001 +Display: 11111011 00000000 1 0 0 ) +Stimuli: -35 3 3 1 20002 +Display: 11111011 00000000 1 0 0 * +Stimuli: -34 4 4 2 20003 +Display: 11111011 00000001 2 0 0 * +Stimuli: -33 5 5 3 20004 +Display: 11111011 00000001 2 0 0 + +Stimuli: -32 6 6 4 20005 +Display: 11111100 00000001 3 0 6 + +Stimuli: -31 7 7 5 20006 +Display: 11111100 00000001 3 0 3 , +Stimuli: -30 8 8 6 20007 +Display: 11111100 00000010 4 0 2 , +Stimuli: -29 9 9 7 20008 +Display: 11111100 00000010 4 0 1 - +Stimuli: -28 10 10 8 20009 +Display: 11111100 00000010 5 1 0 - +Stimuli: -27 11 11 9 20010 +Display: 11111100 00000010 5 1 0 . +Stimuli: -26 12 12 10 20011 +Display: 11111100 00000011 6 1 0 . +Stimuli: -25 13 13 11 20012 +Display: 11111100 00000011 6 1 0 / +Stimuli: -24 14 14 12 20013 +Display: 11111101 00000011 7 1 0 / +Stimuli: -23 15 15 13 20014 +Display: 11111101 00000011 7 1 0 0 +Stimuli: -22 16 16 14 20015 +Display: 11111101 00000100 8 1 0 0 +Stimuli: -21 17 17 15 20016 +Display: 11111101 00000100 8 1 0 1 +Stimuli: -20 18 18 16 20017 +Display: 11111101 00000100 9 2 0 1 +Stimuli: -19 19 19 17 20018 +Display: 11111101 00000100 9 2 0 2 +Stimuli: -18 20 20 18 20019 +Display: 11111101 00000101 10 2 0 2 +Stimuli: -17 21 21 19 20020 +Display: 11111101 00000101 10 2 0 3 +Stimuli: -16 22 22 20 20021 +Display: 11111110 00000101 11 2 0 3 +Stimuli: -15 23 23 21 20022 +Display: 11111110 00000101 11 2 0 4 +Stimuli: -14 24 24 22 20023 +Display: 11111110 00000110 12 2 0 4 +Stimuli: -13 25 25 23 20024 +Display: 11111110 00000110 12 2 0 5 +Stimuli: -12 26 26 24 20025 +Display: 11111110 00000110 13 3 0 5 +Stimuli: -11 27 27 25 20026 +Display: 11111110 00000110 13 3 0 6 +Stimuli: -10 28 28 26 20027 +Display: 11111110 00000111 14 3 0 6 +Stimuli: -9 29 29 27 20028 +Display: 11111110 00000111 14 3 0 7 +Stimuli: -8 30 30 28 20029 +Display: 11111111 00000111 15 3 0 7 +Stimuli: -7 31 31 29 20030 +Display: 11111111 00000111 15 3 0 8 +Stimuli: -6 32 32 30 20031 +Display: 11111111 00001000 16 3 0 8 +Stimuli: -5 33 33 31 20032 +Display: 11111111 00001000 16 3 0 9 +Stimuli: -4 34 34 32 20033 +Display: 11111111 00001000 17 4 0 9 +Stimuli: -3 35 35 33 20034 +Display: 11111111 00001000 17 4 0 : +Stimuli: -2 36 36 34 20035 +Display: 11111111 00001001 18 4 0 : +Stimuli: -1 37 37 35 20036 +Display: 11111111 00001001 18 4 0 ; +Stimuli: 0 38 38 36 20037 +Display: 00000000 00001001 19 4 38 ; +Stimuli: 1 39 39 37 20038 +Display: 00000000 00001001 19 4 19 < +Stimuli: 2 40 40 38 20039 +Display: 00000000 00001010 20 4 10 < +Stimuli: 3 41 41 39 20040 +Display: 00000000 00001010 20 4 5 = +Stimuli: 4 42 42 40 20041 +Display: 00000000 00001010 21 5 2 = +Stimuli: 5 43 43 41 20042 +Display: 00000000 00001010 21 5 1 > +Stimuli: 6 44 44 42 20043 +Display: 00000000 00001011 22 5 0 > +Stimuli: 7 45 45 43 20044 +Display: 00000000 00001011 22 5 0 ? +Stimuli: 8 46 46 44 20045 +Display: 00000001 00001011 23 5 0 ? +Stimuli: 9 47 47 45 20046 +Display: 00000001 00001011 23 5 0 À +Stimuli: 10 48 48 46 20047 +Display: 00000001 00001100 24 5 0 À +Stimuli: 11 49 49 47 20048 +Display: 00000001 00001100 24 5 0 Á +Stimuli: 12 50 50 48 20049 +Display: 00000001 00001100 25 6 0 Á +Stimuli: 13 51 51 49 20050 +Display: 00000001 00001100 25 6 0 Â +Stimuli: 14 52 52 50 20051 +Display: 00000001 00001101 26 6 0 Â +Stimuli: 15 53 53 51 20052 +Display: 00000001 00001101 26 6 0 Ã +Stimuli: 16 54 54 52 20053 +Display: 00000010 00001101 27 6 0 Ã +Stimuli: 17 55 55 53 20054 +Display: 00000010 00001101 27 6 0 Ä +Stimuli: 18 56 56 54 20055 +Display: 00000010 00001110 28 6 0 Ä +Stimuli: 19 57 57 55 20056 +Display: 00000010 00001110 28 6 0 Å +Stimuli: 20 58 58 56 20057 +Display: 00000010 00001110 29 7 0 Å +Stimuli: 21 59 59 57 20058 +Display: 00000010 00001110 29 7 0 Æ +Stimuli: 22 60 60 58 20059 +Display: 00000010 00001111 30 7 0 Æ +Stimuli: 23 61 61 59 20060 +Display: 00000010 00001111 30 7 0 Ç +Stimuli: 24 62 62 60 20061 +Display: 00000011 00001111 31 7 0 Ç +Stimuli: 25 63 63 61 20062 +Display: 00000011 00001111 31 7 0 È +Stimuli: 26 64 64 62 20063 +Display: 00000011 00010000 32 7 0 È +Stimuli: 27 65 65 63 20064 +Display: 00000011 00010000 32 7 0 É +Stimuli: 28 66 66 64 20065 +Display: 00000011 00010000 33 8 0 É +Stimuli: 29 67 67 65 20066 +Display: 00000011 00010000 33 8 0 Ê +Stimuli: 30 68 68 66 20067 +Display: 00000011 00010001 34 8 0 Ê +Stimuli: 31 69 69 67 20068 +Display: 00000011 00010001 34 8 0 Ë +Stimuli: 32 70 70 68 20069 +Display: 00000100 00010001 35 8 70 Ë +Stimuli: 33 71 71 69 20070 +Display: 00000100 00010001 35 8 35 Ì +Stimuli: 34 72 72 70 20071 +Display: 00000100 00010010 36 8 18 Ì +Stimuli: 35 73 73 71 20072 +Display: 00000100 00010010 36 8 9 Í +Stimuli: 36 74 74 72 20073 +Display: 00000100 00010010 37 9 4 Í +Stimuli: 37 75 75 73 20074 +Display: 00000100 00010010 37 9 2 Î +Stimuli: 38 76 76 74 20075 +Display: 00000100 00010011 38 9 1 Î +Stimuli: 39 77 77 75 20076 +Display: 00000100 00010011 38 9 0 Ï +Stimuli: 40 78 78 76 20077 +Display: 00000101 00010011 39 9 0 Ï +Stimuli: 41 79 79 77 20078 +Display: 00000101 00010011 39 9 0 Ð +Stimuli: 42 80 80 78 20079 +Display: 00000101 00010100 40 9 0 Ð +Stimuli: 43 81 81 79 20080 +Display: 00000101 00010100 40 9 0 Ñ +Stimuli: 44 82 82 80 20081 +Display: 00000101 00010100 41 10 0 Ñ +Stimuli: 45 83 83 81 20082 +Display: 00000101 00010100 41 10 0 Ò +Stimuli: 46 84 84 82 20083 +Display: 00000101 00010101 42 10 0 Ò +Stimuli: 47 85 85 83 20084 +Display: 00000101 00010101 42 10 0 Ó +Stimuli: 48 86 86 84 20085 +Display: 00000110 00010101 43 10 0 Ó +Stimuli: 49 87 87 85 20086 +Display: 00000110 00010101 43 10 0 Ô +Stimuli: 50 88 88 86 20087 +Display: 00000110 00010110 44 10 0 Ô +Stimuli: 51 89 89 87 20088 +Display: 00000110 00010110 44 10 0 Õ +Stimuli: 52 90 90 88 20089 +Display: 00000110 00010110 45 11 0 Õ +Stimuli: 53 91 91 89 20090 +Display: 00000110 00010110 45 11 0 Ö +Stimuli: 54 92 92 90 20091 +Display: 00000110 00010111 46 11 0 Ö +Stimuli: 55 93 93 91 20092 +Display: 00000110 00010111 46 11 0 × +Stimuli: 56 94 94 92 20093 +Display: 00000111 00010111 47 11 0 × +Stimuli: 57 95 95 93 20094 +Display: 00000111 00010111 47 11 0 Ø +Stimuli: 58 96 96 94 20095 +Display: 00000111 00011000 48 11 0 Ø +Stimuli: 59 97 97 95 20096 +Display: 00000111 00011000 48 11 0 Ù +Stimuli: 60 98 98 96 20097 +Display: 00000111 00011000 49 12 0 Ù +Stimuli: 61 99 99 97 20098 +Display: 00000111 00011000 49 12 0 Ú +Stimuli: 62 100 100 98 20099 +Display: 00000111 00011001 50 12 0 Ú + +Info: /OSCI/SystemC: Simulation stopped by user. diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/golden/sharing.log.linuxaarch64 b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/golden/sharing.log.linuxaarch64 new file mode 100644 index 000000000..7faa47515 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/golden/sharing.log.linuxaarch64 @@ -0,0 +1,203 @@ +SystemC Simulation +Stimuli: -37 1 1 -1 20000 +Display: 11111011 00000000 0 -1 0 ) +Stimuli: -36 2 2 0 20001 +Display: 11111011 00000000 1 0 0 ) +Stimuli: -35 3 3 1 20002 +Display: 11111011 00000000 1 0 0 * +Stimuli: -34 4 4 2 20003 +Display: 11111011 00000001 2 0 0 * +Stimuli: -33 5 5 3 20004 +Display: 11111011 00000001 2 0 0 + +Stimuli: -32 6 6 4 20005 +Display: 11111100 00000001 3 0 6 + +Stimuli: -31 7 7 5 20006 +Display: 11111100 00000001 3 0 3 , +Stimuli: -30 8 8 6 20007 +Display: 11111100 00000010 4 0 2 , +Stimuli: -29 9 9 7 20008 +Display: 11111100 00000010 4 0 1 - +Stimuli: -28 10 10 8 20009 +Display: 11111100 00000010 5 1 0 - +Stimuli: -27 11 11 9 20010 +Display: 11111100 00000010 5 1 0 . +Stimuli: -26 12 12 10 20011 +Display: 11111100 00000011 6 1 0 . +Stimuli: -25 13 13 11 20012 +Display: 11111100 00000011 6 1 0 / +Stimuli: -24 14 14 12 20013 +Display: 11111101 00000011 7 1 0 / +Stimuli: -23 15 15 13 20014 +Display: 11111101 00000011 7 1 0 0 +Stimuli: -22 16 16 14 20015 +Display: 11111101 00000100 8 1 0 0 +Stimuli: -21 17 17 15 20016 +Display: 11111101 00000100 8 1 0 1 +Stimuli: -20 18 18 16 20017 +Display: 11111101 00000100 9 2 0 1 +Stimuli: -19 19 19 17 20018 +Display: 11111101 00000100 9 2 0 2 +Stimuli: -18 20 20 18 20019 +Display: 11111101 00000101 10 2 0 2 +Stimuli: -17 21 21 19 20020 +Display: 11111101 00000101 10 2 0 3 +Stimuli: -16 22 22 20 20021 +Display: 11111110 00000101 11 2 0 3 +Stimuli: -15 23 23 21 20022 +Display: 11111110 00000101 11 2 0 4 +Stimuli: -14 24 24 22 20023 +Display: 11111110 00000110 12 2 0 4 +Stimuli: -13 25 25 23 20024 +Display: 11111110 00000110 12 2 0 5 +Stimuli: -12 26 26 24 20025 +Display: 11111110 00000110 13 3 0 5 +Stimuli: -11 27 27 25 20026 +Display: 11111110 00000110 13 3 0 6 +Stimuli: -10 28 28 26 20027 +Display: 11111110 00000111 14 3 0 6 +Stimuli: -9 29 29 27 20028 +Display: 11111110 00000111 14 3 0 7 +Stimuli: -8 30 30 28 20029 +Display: 11111111 00000111 15 3 0 7 +Stimuli: -7 31 31 29 20030 +Display: 11111111 00000111 15 3 0 8 +Stimuli: -6 32 32 30 20031 +Display: 11111111 00001000 16 3 0 8 +Stimuli: -5 33 33 31 20032 +Display: 11111111 00001000 16 3 0 9 +Stimuli: -4 34 34 32 20033 +Display: 11111111 00001000 17 4 0 9 +Stimuli: -3 35 35 33 20034 +Display: 11111111 00001000 17 4 0 : +Stimuli: -2 36 36 34 20035 +Display: 11111111 00001001 18 4 0 : +Stimuli: -1 37 37 35 20036 +Display: 11111111 00001001 18 4 0 ; +Stimuli: 0 38 38 36 20037 +Display: 00000000 00001001 19 4 38 ; +Stimuli: 1 39 39 37 20038 +Display: 00000000 00001001 19 4 19 < +Stimuli: 2 40 40 38 20039 +Display: 00000000 00001010 20 4 10 < +Stimuli: 3 41 41 39 20040 +Display: 00000000 00001010 20 4 5 = +Stimuli: 4 42 42 40 20041 +Display: 00000000 00001010 21 5 2 = +Stimuli: 5 43 43 41 20042 +Display: 00000000 00001010 21 5 1 > +Stimuli: 6 44 44 42 20043 +Display: 00000000 00001011 22 5 0 > +Stimuli: 7 45 45 43 20044 +Display: 00000000 00001011 22 5 0 ? +Stimuli: 8 46 46 44 20045 +Display: 00000001 00001011 23 5 0 ? +Stimuli: 9 47 47 45 20046 +Display: 00000001 00001011 23 5 0 @ +Stimuli: 10 48 48 46 20047 +Display: 00000001 00001100 24 5 0 @ +Stimuli: 11 49 49 47 20048 +Display: 00000001 00001100 24 5 0 A +Stimuli: 12 50 50 48 20049 +Display: 00000001 00001100 25 6 0 A +Stimuli: 13 51 51 49 20050 +Display: 00000001 00001100 25 6 0 B +Stimuli: 14 52 52 50 20051 +Display: 00000001 00001101 26 6 0 B +Stimuli: 15 53 53 51 20052 +Display: 00000001 00001101 26 6 0 C +Stimuli: 16 54 54 52 20053 +Display: 00000010 00001101 27 6 0 C +Stimuli: 17 55 55 53 20054 +Display: 00000010 00001101 27 6 0 D +Stimuli: 18 56 56 54 20055 +Display: 00000010 00001110 28 6 0 D +Stimuli: 19 57 57 55 20056 +Display: 00000010 00001110 28 6 0 E +Stimuli: 20 58 58 56 20057 +Display: 00000010 00001110 29 7 0 E +Stimuli: 21 59 59 57 20058 +Display: 00000010 00001110 29 7 0 F +Stimuli: 22 60 60 58 20059 +Display: 00000010 00001111 30 7 0 F +Stimuli: 23 61 61 59 20060 +Display: 00000010 00001111 30 7 0 G +Stimuli: 24 62 62 60 20061 +Display: 00000011 00001111 31 7 0 G +Stimuli: 25 63 63 61 20062 +Display: 00000011 00001111 31 7 0 H +Stimuli: 26 64 64 62 20063 +Display: 00000011 00010000 32 7 0 H +Stimuli: 27 65 65 63 20064 +Display: 00000011 00010000 32 7 0 I +Stimuli: 28 66 66 64 20065 +Display: 00000011 00010000 33 8 0 I +Stimuli: 29 67 67 65 20066 +Display: 00000011 00010000 33 8 0 J +Stimuli: 30 68 68 66 20067 +Display: 00000011 00010001 34 8 0 J +Stimuli: 31 69 69 67 20068 +Display: 00000011 00010001 34 8 0 K +Stimuli: 32 70 70 68 20069 +Display: 00000100 00010001 35 8 70 K +Stimuli: 33 71 71 69 20070 +Display: 00000100 00010001 35 8 35 L +Stimuli: 34 72 72 70 20071 +Display: 00000100 00010010 36 8 18 L +Stimuli: 35 73 73 71 20072 +Display: 00000100 00010010 36 8 9 M +Stimuli: 36 74 74 72 20073 +Display: 00000100 00010010 37 9 4 M +Stimuli: 37 75 75 73 20074 +Display: 00000100 00010010 37 9 2 N +Stimuli: 38 76 76 74 20075 +Display: 00000100 00010011 38 9 1 N +Stimuli: 39 77 77 75 20076 +Display: 00000100 00010011 38 9 0 O +Stimuli: 40 78 78 76 20077 +Display: 00000101 00010011 39 9 0 O +Stimuli: 41 79 79 77 20078 +Display: 00000101 00010011 39 9 0 P +Stimuli: 42 80 80 78 20079 +Display: 00000101 00010100 40 9 0 P +Stimuli: 43 81 81 79 20080 +Display: 00000101 00010100 40 9 0 Q +Stimuli: 44 82 82 80 20081 +Display: 00000101 00010100 41 10 0 Q +Stimuli: 45 83 83 81 20082 +Display: 00000101 00010100 41 10 0 R +Stimuli: 46 84 84 82 20083 +Display: 00000101 00010101 42 10 0 R +Stimuli: 47 85 85 83 20084 +Display: 00000101 00010101 42 10 0 S +Stimuli: 48 86 86 84 20085 +Display: 00000110 00010101 43 10 0 S +Stimuli: 49 87 87 85 20086 +Display: 00000110 00010101 43 10 0 T +Stimuli: 50 88 88 86 20087 +Display: 00000110 00010110 44 10 0 T +Stimuli: 51 89 89 87 20088 +Display: 00000110 00010110 44 10 0 U +Stimuli: 52 90 90 88 20089 +Display: 00000110 00010110 45 11 0 U +Stimuli: 53 91 91 89 20090 +Display: 00000110 00010110 45 11 0 V +Stimuli: 54 92 92 90 20091 +Display: 00000110 00010111 46 11 0 V +Stimuli: 55 93 93 91 20092 +Display: 00000110 00010111 46 11 0 W +Stimuli: 56 94 94 92 20093 +Display: 00000111 00010111 47 11 0 W +Stimuli: 57 95 95 93 20094 +Display: 00000111 00010111 47 11 0 X +Stimuli: 58 96 96 94 20095 +Display: 00000111 00011000 48 11 0 X +Stimuli: 59 97 97 95 20096 +Display: 00000111 00011000 48 11 0 Y +Stimuli: 60 98 98 96 20097 +Display: 00000111 00011000 49 12 0 Y +Stimuli: 61 99 99 97 20098 +Display: 00000111 00011000 49 12 0 Z +Stimuli: 62 100 100 98 20099 +Display: 00000111 00011001 50 12 0 Z + +Info: /OSCI/SystemC: Simulation stopped by user. diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/main.cpp b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/main.cpp new file mode 100644 index 000000000..ffb011ab2 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/main.cpp @@ -0,0 +1,109 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + main.cpp -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "stimulus.h" +#include "display.h" +#include "sharing.h" + +int sc_main (int argc , char *argv[]) { + sc_clock clock; + sc_signal<bool> reset; + sc_signal_bool_vector stimulus_line1; + sc_signal_bool_vector stimulus_line2; + sc_signal<long> stimulus_line3; + sc_signal<int> stimulus_line4; + sc_signal<short> stimulus_line5; + sc_signal<char> stimulus_line6; + sc_signal<bool> input_valid; + sc_signal<bool> ack; + sc_signal<bool> output_valid; + sc_signal_bool_vector result_line1; + sc_signal_bool_vector result_line2; + sc_signal<long> result_line3; + sc_signal<int> result_line4; + sc_signal<short> result_line5; + sc_signal<char> result_line6; + + output_valid = 0; + + stimulus stimulus1("stimulus_block", + clock, + reset, + stimulus_line1, + stimulus_line2, + stimulus_line3, + stimulus_line4, + stimulus_line5, + stimulus_line6, + input_valid, + ack); + + sharing sharing1( "process_body", + clock, + reset, + stimulus_line1, + stimulus_line2, + stimulus_line3, + stimulus_line4, + stimulus_line5, + stimulus_line6, + input_valid, + ack, + result_line1, + result_line2, + result_line3, + result_line4, + result_line5, + result_line6, + output_valid); + + display display1( "display_block", + clock, + result_line1, + result_line2, + result_line3, + result_line4, + result_line5, + result_line6, + output_valid); + + sc_start(); + return 0; +} + +// EOF diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.cpp b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.cpp new file mode 100644 index 000000000..2b1dc2eb4 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.cpp @@ -0,0 +1,150 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + sharing.cpp -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "sharing.h" +#define true 1 +#define false 0 + +void sharing::entry() + +{ + + sc_bigint<8> tmp1; + sc_bigint<8> tmp1r; + sc_biguint<8> tmp2; + sc_biguint<8> tmp2r; + long tmp3; + long tmp3r; + int tmp4; + int tmp4r; + short tmp5; + short tmp5r; + char tmp6; + char tmp6r; + +// define 1 dimensional array + unsigned int tmp7[2]; + char tmp8[2]; + +// define sc_bool_vector + sc_bv<4> tmp10; + tmp10[3] = 0; tmp10[2] = 1; tmp10[1] = 0; tmp10[0] = 1; + +// define 2 dimentional array + sc_bv<1> tmp11[2]; + +// reset_loop + if (reset.read() == true) { + out_valid.write(false); + out_ack.write(false); + wait(); + } else wait(); + +// +// main loop +// + +// initialization of sc_array + + tmp7[0] = 3; + tmp7[1] = 12; + tmp8[0] = 'S'; + tmp8[1] = 'C'; + tmp11[0][0] = "1"; + tmp11[1][0] = "0"; + + + while(1) { + while(in_valid.read()==false) wait(); + + //reading the inputs + tmp1 = in_value1.read(); + tmp2 = in_value2.read(); + tmp3 = in_value3.read(); + tmp4 = in_value4.read(); + tmp5 = in_value5.read(); + tmp6 = in_value6.read(); + + out_ack.write(true); + + //execute mixed data type addition operations + tmp1r = tmp1 >> (tmp7[0] % 9); + tmp2r = tmp2 >> 2; + tmp3r = tmp3 >> 1; + tmp4r = tmp4 >> (tmp7[1] % 9); + tmp5r = tmp3 >> (((unsigned int)tmp1.to_int()) % 32); + tmp6r = tmp6 >> 1; + + //write outputs + out_value1.write(tmp1r); + out_value2.write(tmp2r); + out_value3.write(tmp3r); + out_value4.write(tmp4r); + out_value5.write(tmp5r); + out_value6.write(tmp6r); + + out_valid.write(true); + wait(); + out_ack.write(false); + out_valid.write(false); + + //execute mixed data type addition operations + tmp1r = tmp1 >> (tmp7[0] % 9); + tmp2r = tmp2 >> (tmp4 % 9); + tmp3r = tmp3 >> (tmp5 % 33); + tmp4r = tmp4 >> 2; + tmp5r = tmp3 >> (((unsigned int)tmp5) % 33); + tmp6r = tmp6 >> (tmp2.to_uint() % 9); + + //write outputs + out_value1.write(tmp1r); + out_value2.write(tmp2r); + out_value3.write(tmp3r); + out_value4.write(tmp4r); + out_value5.write(tmp5r); + out_value6.write(tmp6r); + + out_valid.write(true); + wait(); + out_ack.write(false); + out_valid.write(false); + + } + +} // End + diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.f b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.f new file mode 100644 index 000000000..998e0f309 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.f @@ -0,0 +1,4 @@ +sharing/display.cpp +sharing/main.cpp +sharing/sharing.cpp +sharing/stimulus.cpp diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.h b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.h new file mode 100644 index 000000000..5552db43a --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/sharing.h @@ -0,0 +1,126 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + sharing.h -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "common.h" + +SC_MODULE( sharing ) +{ + SC_HAS_PROCESS( sharing ); + + sc_in_clk clk; + + //==================================================================== + // [C] Always Needed Member Function + // -- constructor + // -- entry + //==================================================================== + + const sc_signal<bool>& reset ; + const sc_signal_bool_vector& in_value1; // Input port + const sc_signal_bool_vector& in_value2; // Input port + const sc_signal<long>& in_value3; // Input port + const sc_signal<int>& in_value4; // Input port + const sc_signal<short>& in_value5; // Input port + const sc_signal<char>& in_value6; // Input port + const sc_signal<bool>& in_valid; // Input port + sc_signal<bool>& out_ack; // Output port + sc_signal_bool_vector& out_value1; // Output port + sc_signal_bool_vector& out_value2; // Output port + sc_signal<long>& out_value3; // Output port + sc_signal<int>& out_value4; // Output port + sc_signal<short>& out_value5; // Output port + sc_signal<char>& out_value6; // Output port + sc_signal<bool>& out_valid; // Output port + + // + // Constructor + // + + sharing( + sc_module_name NAME, // referense name + sc_clock& CLK, // clock + const sc_signal<bool>& RESET, + const sc_signal_bool_vector& IN_VALUE1, + const sc_signal_bool_vector& IN_VALUE2, + const sc_signal<long>& IN_VALUE3, + const sc_signal<int>& IN_VALUE4, + const sc_signal<short>& IN_VALUE5, + const sc_signal<char>& IN_VALUE6, + const sc_signal<bool>& IN_VALID, + + sc_signal<bool>& OUT_ACK, + sc_signal_bool_vector& OUT_VALUE1, + sc_signal_bool_vector& OUT_VALUE2, + sc_signal<long>& OUT_VALUE3, + sc_signal<int>& OUT_VALUE4, + sc_signal<short>& OUT_VALUE5, + sc_signal<char>& OUT_VALUE6, + sc_signal<bool>& OUT_VALID + ) + : + reset (RESET), + in_value1 (IN_VALUE1), + in_value2 (IN_VALUE2), + in_value3 (IN_VALUE3), + in_value4 (IN_VALUE4), + in_value5 (IN_VALUE5), + in_value6 (IN_VALUE6), + in_valid (IN_VALID), + out_ack (OUT_ACK), + out_value1 (OUT_VALUE1), + out_value2 (OUT_VALUE2), + out_value3 (OUT_VALUE3), + out_value4 (OUT_VALUE4), + out_value5 (OUT_VALUE5), + out_value6 (OUT_VALUE6), + out_valid (OUT_VALID) + + { + clk (CLK); + SC_CTHREAD( entry, clk.pos() ); + reset_signal_is(reset,true); + }; + +//Process Functionality: Described in the member function below + void entry(); +}; + +// EOF + + + diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/stimulus.cpp b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/stimulus.cpp new file mode 100644 index 000000000..1263da802 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/stimulus.cpp @@ -0,0 +1,85 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + stimulus.cpp -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "stimulus.h" + +void stimulus::entry() { + + reset.write(true); + wait(); + reset.write(false); + + sc_signed tmp1(8); + sc_signed tmp2(8); + long tmp3; + int tmp4; + short tmp5; + char tmp6; + + int counter = 0; + + tmp1 = "0b11011011"; + tmp2 = "0b00000001"; + tmp3 = 1; + tmp4 = -1; + tmp5 = 20000; + tmp6 = 'R'; + + while(counter<100){ + out_valid.write(true); + out_value1.write(tmp1); + out_value2.write(tmp2); + out_value3.write(tmp3); + out_value4.write(tmp4); + out_value5.write(tmp5); + out_value6.write(tmp6); + cout << "Stimuli: " << tmp1 << " " << tmp2 << " " << tmp3 << " " << tmp4 << " " << tmp5 << " " << endl; + tmp1 = tmp1 + 1; + tmp2 = tmp2 + 1; + tmp3 = tmp3 + 1; + tmp4 = tmp4 + 1; + tmp5 = tmp5 + 1; + tmp6 = tmp6 + 1; + do { wait(); } while (in_ack==false); + out_valid.write(false); + counter++; + wait(); + } + sc_stop(); +} +// EOF diff --git a/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/stimulus.h b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/stimulus.h new file mode 100644 index 000000000..6f7aeefc8 --- /dev/null +++ b/src/systemc/tests/systemc/misc/cae_test/general/bitwise/shr/sharing/stimulus.h @@ -0,0 +1,90 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + stimulus.h -- + + Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-30 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + + +#include "common.h" + +SC_MODULE( stimulus ) +{ + SC_HAS_PROCESS( stimulus ); + + sc_in_clk clk; + + sc_signal<bool>& reset; + sc_signal_bool_vector& out_value1; // Output port + sc_signal_bool_vector& out_value2; // Output port + sc_signal<long>& out_value3; // Output port + sc_signal<int>& out_value4; // Output port + sc_signal<short>& out_value5; // Output port + sc_signal<char>& out_value6; // Output port + sc_signal<bool>& out_valid; // Output port + const sc_signal<bool>& in_ack; + + // + // Constructor + // + + stimulus( + sc_module_name NAME, // reference name + sc_clock& CLK, // clock + sc_signal<bool>& RESET, + sc_signal_bool_vector& OUT_VALUE1, + sc_signal_bool_vector& OUT_VALUE2, + sc_signal<long>& OUT_VALUE3, + sc_signal<int>& OUT_VALUE4, + sc_signal<short>& OUT_VALUE5, + sc_signal<char>& OUT_VALUE6, + sc_signal<bool>& OUT_VALID, + const sc_signal<bool>& IN_ACK + ) + : + reset (RESET), + out_value1 (OUT_VALUE1), + out_value2 (OUT_VALUE2), + out_value3 (OUT_VALUE3), + out_value4 (OUT_VALUE4), + out_value5 (OUT_VALUE5), + out_value6 (OUT_VALUE6), + out_valid (OUT_VALID), + in_ack (IN_ACK) + { + clk (CLK); + SC_CTHREAD( entry, clk.pos() ); + }; + void entry(); +}; +// EOF |