gem5 v24.0.0.0
Loading...
Searching...
No Matches
design_rtl.h
Go to the documentation of this file.
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 design_rtl.h --
23
24 Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
25
26 *****************************************************************************/
27
28/*****************************************************************************
29
30 MODIFICATION LOG - modifiers, enter your name, affiliation, date and
31 changes you are making here.
32
33 Name, Affiliation, Date:
34 Description of Modification:
35
36 *****************************************************************************/
37
38#include <systemc.h>
39
41public:
42 sc_in<sc_uint<1> > clk;
43 sc_in<sc_uint<32> > count;
44 sc_out<sc_uint<9> > out_a0;
45 sc_out<sc_uint<9> > out_a1;
46 SC_CTOR(fun) {
47 SC_METHOD(p1);
48 sensitive << count << out_a1;
49 };
50private:
51
52 template<int w> sc_int<w> int_conv_from_sc_uint_to_sc_int ( sc_uint<w>
53 a) {
54 sc_int<w> a_temp;
55 for (int i=0;i<w; i++)
56 a_temp[i] = a[i];
57 return a_temp;
58 }
59
60 template<int w> sc_bigint<w> int_conv_from_sc_biguint_to_sc_bigint (
61 sc_biguint<w> a) {
62 sc_bigint<w> a_temp;
63 for (int i=0;i<w; i++)
64 a_temp[i] = a[i];
65 return a_temp;
66 }
67
68 template<int w> sc_int<w> int_conv_from_sc_uint_to_sc_int ( bool a) {
69 sc_int<w> a_temp;
70 a_temp[0] = a;
71 return a_temp;
72 }
73
74
75 sc_uint<32> C18_B, C18_REMAINDER;
76 bool N73, N74, N75, N76, N77, N78, N79, N80, N81, N82, N83, N84, N85,
77 N86, N87, N88, N89, N90, N91, N92, N93, N94, N95, N96, N97, N98,
78 N99, N100, N101, N102, N103, N104, N105, N106, N107, N108, N109,
79 N110, N111, N112, N113, N114, N115, N116, N117, N118, N119, N120,
80 N121, N122, N123, N124, N125, N126, N127, N128, N129, N130, N131,
81 N132, N133, N134;
82
83 void p1( ) {
84 out_a1[0].write( 0 );
85 out_a1[1].write( 0 );
86 out_a1[3].write( 1 );
87 out_a1[5].write( 1 );
88 out_a1[7].write( 0 );
89 out_a1[8].write( 0 );
90 out_a0[2].write( (0 ^ 1) );
91 out_a0[5].write( (0 ^ 1) );
92 C18_B[31] = 0 ;
93 C18_B[30] = 0 ;
94 C18_B[29] = 0 ;
95 C18_B[28] = 0 ;
96 C18_B[27] = 0 ;
97 C18_B[26] = 0 ;
98 C18_B[25] = 0 ;
99 C18_B[24] = 0 ;
100 C18_B[23] = 0 ;
101 C18_B[22] = 0 ;
102 C18_B[21] = 0 ;
103 C18_B[20] = 0 ;
104 C18_B[19] = 0 ;
105 C18_B[18] = 0 ;
106 C18_B[17] = 0 ;
107 C18_B[16] = 0 ;
108 C18_B[15] = 0 ;
109 C18_B[14] = 0 ;
110 C18_B[13] = 0 ;
111 C18_B[12] = 0 ;
112 C18_B[11] = 0 ;
113 C18_B[10] = 0 ;
114 C18_B[9] = 0 ;
115 C18_B[8] = 0 ;
116 C18_B[7] = 0 ;
117 C18_B[6] = 0 ;
118 C18_B[5] = 0 ;
119 C18_B[4] = 0 ;
120 C18_B[3] = 0 ;
121 C18_B[2] = 0 ;
122 C18_B[1] = 1 ;
123 C18_B[0] = 1 ;
124
125 // REM_UNS_OP(A,B,REMAINDER)
126 REM_UNS_OP( count.read(), C18_B, C18_REMAINDER );
127 }
128 out_a0[7].write( (0 ^ 0) );
129 out_a0[8].write( (0 ^ 0) );
130 N73 = !(C18_REMAINDER[31]);
131 N74 = !(C18_REMAINDER[30]);
132 N76 = !(C18_REMAINDER[29]);
133 N78 = !(C18_REMAINDER[28]);
134 N80 = !(C18_REMAINDER[27]);
135 N82 = !(C18_REMAINDER[26]);
136 N84 = !(C18_REMAINDER[25]);
137 N86 = !(C18_REMAINDER[24]);
138 N88 = !(C18_REMAINDER[23]);
139 N90 = !(C18_REMAINDER[22]);
140 N92 = !(C18_REMAINDER[21]);
141 N94 = !(C18_REMAINDER[20]);
142 N96 = !(C18_REMAINDER[19]);
143 N98 = !(C18_REMAINDER[18]);
144 N100 = !(C18_REMAINDER[17]);
145 N102 = !(C18_REMAINDER[16]);
146 N104 = !(C18_REMAINDER[15]);
147 N106 = !(C18_REMAINDER[14]);
148 N108 = !(C18_REMAINDER[13]);
149 N110 = !(C18_REMAINDER[12]);
150 N112 = !(C18_REMAINDER[11]);
151 N114 = !(C18_REMAINDER[10]);
152 N116 = !(C18_REMAINDER[9]);
153 N118 = !(C18_REMAINDER[8]);
154 N120 = !(C18_REMAINDER[7]);
155 N122 = !(C18_REMAINDER[6]);
156 N124 = !(C18_REMAINDER[5]);
157 N126 = !(C18_REMAINDER[4]);
158 N128 = !(C18_REMAINDER[3]);
159 N130 = !(C18_REMAINDER[2]);
160 N132 = !(C18_REMAINDER[1]);
161 N134 = !(C18_REMAINDER[0]);
162 N75 = (N73 && N74);
163 N77 = (N75 && N76);
164 N79 = (N77 && N78);
165 N81 = (N79 && N80);
166 N83 = (N81 && N82);
167 N85 = (N83 && N84);
168 N87 = (N85 && N86);
169 N89 = (N87 && N88);
170 N91 = (N89 && N90);
171 N93 = (N91 && N92);
172 N95 = (N93 && N94);
173 N97 = (N95 && N96);
174 N99 = (N97 && N98);
175 N101 = (N99 && N100);
176 N103 = (N101 && N102);
177 N105 = (N103 && N104);
178 N107 = (N105 && N106);
179 N109 = (N107 && N108);
180 N111 = (N109 && N110);
181 N113 = (N111 && N112);
182 N115 = (N113 && N114);
183 N117 = (N115 && N116);
184 N119 = (N117 && N118);
185 N121 = (N119 && N120);
186 N123 = (N121 && N122);
187 N125 = (N123 && N124);
188 N127 = (N125 && N126);
189 N129 = (N127 && N128);
190 N131 = (N129 && N130);
191 N133 = (N131 && N132);
192 out_a1[6].write( (N133 && N134) );
193 out_a1[4].write( out_a1.read()[6] );
194 out_a0[3].write( (0 ^ out_a1.read()[6]) );
195 out_a0[4].write( (0 ^ out_a1.read()[6]) );
196 out_a0[6].write( (0 ^ out_a1.read()[6]) );
197 out_a1[2].write( !(out_a1.read()[6]) );
198 out_a0[0].write( (out_a1.read()[2] ^ 0) );
199 out_a0[1].write( (out_a1.read()[6] ^ out_a1.read()[2]) );
200
201 }
202
203};
SwitchingFiber a
#define SC_METHOD(name)
Definition sc_module.hh:303
#define SC_MODULE(name)
Definition sc_module.hh:295
#define SC_CTOR(name)
Definition sc_module.hh:297
Definition design.h:41

Generated on Tue Jun 18 2024 16:24:07 for gem5 by doxygen 1.11.0