File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,21 @@ SCA_TDF_MODULE(adc)
2929 // Input analog voltage
3030 sca_tdf::sca_in<double > in;
3131 // Output digital code
32- sca_tdf::sca_out<sc_dt::sc_uint<BITS> > out;
32+ sca_tdf::sca_de:: sca_out<sc_dt::sc_uint<BITS> > out;
3333
3434 /* *
3535 * @brief Construct a new adc object
3636 *
3737 */
38- SCA_CTOR (adc) : in (" in" ), out (" out" ) {
38+ SCA_CTOR (adc) : in (" in" ), out (" out" )
39+ {
40+ }
41+
42+ void set_attributes ()
43+ {
3944 // Propagation time from input to output
40- set_timestep (sca_core::sca_time (13 , sc_core::SC_NS));
45+ set_timestep (sca_core::sca_time (1 , sc_core::SC_NS));
46+ this ->out .set_delay (13 );
4147 }
4248
4349 /* *
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ SCA_TDF_MODULE(dac)
2727 const double MAX_DIG = static_cast <double >((1 << BITS) - 1 );
2828public:
2929 // Input digital code
30- sca_tdf::sca_in<sc_dt::sc_uint<BITS> > in;
30+ sca_tdf::sca_de:: sca_in<sc_dt::sc_uint<BITS> > in;
3131 // Output analog voltage
3232 sca_tdf::sca_out<double > out;
3333
@@ -36,9 +36,14 @@ SCA_TDF_MODULE(dac)
3636 *
3737 */
3838 SCA_CTOR (dac) : in (" in" ), out (" out" )
39+ {
40+ }
41+
42+ void set_attributes ()
3943 {
4044 // Propagation time from input to output
41- set_timestep (sca_core::sca_time (17 , sc_core::SC_NS));
45+ set_timestep (sca_core::sca_time (1 , sc_core::SC_NS));
46+ this ->out .set_delay (17 );
4247 }
4348
4449 /* *
You can’t perform that action at this time.
0 commit comments