main.cpp
Generated by CapsimTMK SystemC Development System
/*
Copyright (C) 2006-2007 Silicon DSP Corporation, Portland, Oregon
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://capsimtmk.sourceforge.net
*/
/* * Generated by Capsim Topology to SystemC Conversion */ #include <systemc.h> #include "../BLOCKS/genrst.h"
/* * Block Model Includes */ #include "../BLOCKS/sinesc.h" #include "../BLOCKS/gainsc.h" #include "../BLOCKS/printsc.h"
int sc_main (int argc , char *argv[]) { sc_clock clock; sc_signal<bool> rst_n;
/* * Connection Signals Definitions */ sc_signal<float> sinesc0_y; sc_signal<float> gainsc0_x; sc_signal<float> gainsc0_y; sc_signal<float> printsc0_x;
/* * Block Instantiation */ genrst genrst0("genrst0"); sinesc sinesc0("sinesc0"); gainsc gainsc0("gainsc0"); printsc printsc0("printsc0");
/* * Block Clock Connections */ genrst0.CLK(clock.signal());
sinesc0.CLK(clock.signal()); gainsc0.CLK(clock.signal()); printsc0.CLK(clock.signal());
/* * Block Reset Connections */ genrst0.rst_n(rst_n); sinesc0.rst_n(rst_n); gainsc0.rst_n(rst_n); printsc0.rst_n(rst_n);
/* * Connection Hookups */ sinesc0.y(sinesc0_y); gainsc0.x(sinesc0_y); gainsc0.y(gainsc0_y); printsc0.x(gainsc0_y);
/* * Block Parameter Setting */ sinesc0.num_of_samples=9999; sinesc0.magnitude=1; sinesc0.fs=32000; sinesc0.freq=1000; sinesc0.phase=0; gainsc0.factor=1; printsc0.factor=1;
sc_start(clock, -1);
return 0;
}