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_top.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 #include <systemc.h> 00037 #include "fir_fsm.h" 00038 #include "fir_data.h" 00039 00040 SC_MODULE(fir_top) { 00041 00042 sc_in<bool> CLK; 00043 sc_in<bool> RESET; 00044 sc_in<bool> IN_VALID; 00045 sc_in<int> SAMPLE; 00046 sc_out<bool> OUTPUT_DATA_READY; 00047 sc_out<int> RESULT; 00048 00049 sc_signal<unsigned> state_out; 00050 00051 fir_fsm *fir_fsm1; 00052 fir_data *fir_data1; 00053 00054 SC_CTOR(fir_top) { 00055 00056 fir_fsm1 = new fir_fsm("FirFSM"); 00057 fir_fsm1->clock(CLK); 00058 fir_fsm1->reset(RESET); 00059 fir_fsm1->in_valid(IN_VALID); 00060 fir_fsm1->state_out(state_out); 00061 00062 fir_data1 = new fir_data("FirData"); 00063 fir_data1 -> reset(RESET); 00064 fir_data1 -> state_out(state_out); 00065 fir_data1 -> sample(SAMPLE); 00066 fir_data1 -> result(RESULT); 00067 fir_data1 -> output_data_ready(OUTPUT_DATA_READY); 00068 00069 } 00070 }; 00071