00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2004 by all Contributors. 00005 All Rights reserved. 00006 00007 The contents of this file are subject to the restrictions and limitations 00008 set forth in the SystemC Open Source License Version 2.4 (the "License"); 00009 You may not use this file except in compliance with such restrictions and 00010 limitations. You may obtain instructions on how to receive a copy of the 00011 License at http://www.systemc.org/. Software distributed by Contributors 00012 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00013 ANY KIND, either express or implied. See the License for the specific 00014 language governing rights and limitations under the License. 00015 00016 *****************************************************************************/ 00017 00018 /***************************************************************************** 00019 00020 fir_fsm.h -- 00021 00022 Original Author: Rocco Jonack, Synopsys, Inc. 00023 00024 *****************************************************************************/ 00025 00026 /***************************************************************************** 00027 00028 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 00029 changes you are making here. 00030 00031 Name, Affiliation, Date: 00032 Description of Modification: 00033 00034 *****************************************************************************/ 00035 00036 SC_MODULE(fir_fsm) { 00037 00038 sc_in<bool> clock; 00039 sc_in<bool> reset; 00040 sc_in<bool> in_valid; 00041 sc_out<unsigned> state_out; 00042 00043 // defining the states of the ste machine 00044 enum {reset_s, first_s, second_s, third_s, output_s} state; 00045 00046 SC_CTOR(fir_fsm) 00047 { 00048 SC_METHOD(entry); 00049 dont_initialize(); 00050 sensitive_pos(clock); 00051 }; 00052 void entry(); 00053 }; 00054