diff options
author | Gabe Black <gabeblack@google.com> | 2018-05-24 01:37:55 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-08-08 10:09:54 +0000 |
commit | 16fa8d7cc8c92f5ab879e4cf9c6c0bbb3567860f (patch) | |
tree | 7b6faaacb4574a555e561534aa4a8508c0624c32 /src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.h | |
parent | 7235d3b5211d0ba8f528d930a4c1e7ad62eec51a (diff) | |
download | gem5-16fa8d7cc8c92f5ab879e4cf9c6c0bbb3567860f.tar.xz |
systemc: Import tests from the Accellera systemc distribution.
Change-Id: Iad76b398949a55d768a34d027a2d8e3739953da6
Reviewed-on: https://gem5-review.googlesource.com/10845
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.h')
-rw-r--r-- | src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.h b/src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.h new file mode 100644 index 000000000..99bfbfcdd --- /dev/null +++ b/src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.h @@ -0,0 +1,111 @@ +/***************************************************************************** + + 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. + + *****************************************************************************/ + +/***************************************************************************** + + a2901_alu.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 A2901_ALU_H +#define A2901_ALU_H + +#include "common.h" + +SC_MODULE( a2901_alu ) +{ + SC_HAS_PROCESS( a2901_alu ); + + // inputs + const sig9& I; + const sig4& RE; + const sig4& S; + const sig1& C0; + + // outputs + sig5& R_ext; + sig5& S_ext; + sig4& F; + sig1& OVR; + sig1& C4; + sig1& Pbar; + sig1& Gbar; + sig1& F3; + sig1& F30; + + // temporaries + int5 result; + int5 R_ext_v; + int5 S_ext_v; + int5 temp_p; + int5 temp_g; + + // constructor + a2901_alu( sc_module_name, + const sig9& I_, + const sig4& RE_, + const sig4& S_, + const sig1& C0_, + sig5& R_ext_, + sig5& S_ext_, + sig4& F_, + sig1& OVR_, + sig1& C4_, + sig1& Pbar_, + sig1& Gbar_, + sig1& F3_, + sig1& F30_ ) + : I( I_ ), + RE( RE_ ), + S( S_ ), + C0( C0_ ), + R_ext( R_ext_ ), + S_ext( S_ext_ ), + F( F_ ), + OVR( OVR_ ), + C4( C4_ ), + Pbar( Pbar_ ), + Gbar( Gbar_ ), + F3( F3_ ), + F30( F30_ ) + { + SC_METHOD( entry ); + sensitive << I; + sensitive << RE; + sensitive << S; + sensitive << C0; + } + + void entry(); +}; + +#endif + |