main.cpp
Generated from topology using top2sysc.xsl.
/* * Generated by Capsim Topology to SystemC Conversion */ #include <systemc.h> #include "../BLOCKS/genrst.h"
/* * Block Model Includes */ #include "../BLOCKS/imp.h" #include "../BLOCKS/biquad.h" #include "../BLOCKS/biquad.h" #include "../BLOCKS/biquad.h" #include "../BLOCKS/printsc.h" #include "../BLOCKS/gainsc.h"
int sc_main (int argc , char *argv[]) { sc_clock clock; sc_signal<bool> rst_n;
/* * Connection Signals Definitions */ sc_signal<float> imp0_y; sc_signal<float> biquad0_x; sc_signal<float> biquad0_y; sc_signal<float> biquad1_x; sc_signal<float> biquad1_y; sc_signal<float> biquad2_x; sc_signal<float> biquad2_y; sc_signal<float> gainsc0_x; sc_signal<float> gainsc0_y; sc_signal<float> printsc0_x;
/* * Block Instantiation */ genrst genrst0("genrst0"); imp imp0("imp0"); biquad biquad0("biquad0"); biquad biquad1("biquad1"); biquad biquad2("biquad2"); printsc printsc0("printsc0"); gainsc gainsc0("gainsc0");
/* * Block Clock Connections */ genrst0.CLK(clock.signal());
imp0.CLK(clock.signal()); biquad0.CLK(clock.signal()); biquad1.CLK(clock.signal()); biquad2.CLK(clock.signal()); printsc0.CLK(clock.signal()); gainsc0.CLK(clock.signal());
/* * Block Reset Connections */ genrst0.rst_n(rst_n); imp0.rst_n(rst_n); biquad0.rst_n(rst_n); biquad1.rst_n(rst_n); biquad2.rst_n(rst_n); printsc0.rst_n(rst_n); gainsc0.rst_n(rst_n);
/* * Connection Hookups */ imp0.y(imp0_y); biquad0.x(imp0_y); biquad0.y(biquad0_y); biquad1.x(biquad0_y); biquad1.y(biquad1_y); biquad2.x(biquad1_y); biquad2.y(biquad2_y); gainsc0.x(biquad2_y); gainsc0.y(gainsc0_y); printsc0.x(gainsc0_y);
/* * Block Parameter Setting */ imp0.numberOfSamples=128; biquad0.zsec1=1; biquad0.zsec2=0; biquad0.psec1=-1.43573093414306641; biquad0.psec2=0.888672351837158203; biquad1.zsec1=-1.25983858108520508; biquad1.zsec2=1; biquad1.psec1=-1.30410051345825195; biquad1.psec2=0.594399511814117432; biquad2.zsec1=-0.703423857688903809; biquad2.zsec2=0.999999880790710449; biquad2.psec1=-0.608502566814422607; biquad2.psec2=0; printsc0.control=1; gainsc0.factor=0.02682019855;
sc_start(clock, -1); return 0; }