Jump to content

Solved: Signal has no driver


Recommended Posts

Dear reader,

I recently started exploring SystemC and SystemC AMS.

I'm working through this presentation/tutorial by TU Delft. I'm trying to connect two SCA_TDF modules through a sca_tdf::sca_signal to build the Binary Amplitude Shift Keying modulator. 

In the constructor of my 'transmitter' I creating two instantiations of a 'mixer' and a 'sine'. 

mix = new mixer("mixer", rate );
  mix->in_bit(in);
  mix->carrier(wave);
  mix->mixed(out);

sin = new sine("sin", freq, rate );
  sin->out(wave);

 Whereas signals, ports and pointers of this transmitter are defined as follows:

sca_tdf::sca_in<bool> in;
sca_tdf::sca_out<double> out;

mixer * mix;
sine * sin;

sca_tdf::sca_signal<double> wave;

The ports of the mixer are as follows: 

sca_tdf::sca_in<bool> in_bit;
sca_tdf::sca_in<double> carrier;
sca_tdf::sca_out<double> mixed;

And the port of the sine is as follows: 

sca_tdf::sca_out<double> out; 

When I compile and run this, the following message appears: 


Error: SystemC-AMS: sca_tdf::sca_signal has no driver the following modules are connected to the channel: 
    transmit.mixer


In file: ../../../../../src/scams/impl/synchronization/sca_synchronization_alg.cpp:256

I'm pretty sure I've connected this channel (as shown above). 

Does anyone know what this problem actually means and how I can resolve it? 

Solved

A module that had a sca_out port was inherited from standard SystemC module (SC_MODULE) instead of AMS module (SCA_TDF_MODULE). 

Link to comment
Share on other sites

Thanks for your reply Karsten,

2 hours ago, karsten said:

Each tdf signal must be connected to exactly one tdf outport-sca_tdf::sca_out  (LRM 5.2 d) p.83)

2

I already attached the wave signal to the sca_out of the sine model: 

sin->out(wave);

The other connection is to the sca_in of the mixer model. 

So, I don't see any problems here but I might be mistaking. 

With kind regards,

Link to comment
Share on other sites

38 minutes ago, unglaublich said:

Thanks for your reply Karsten,

I already attached the wave signal to the sca_out of the sine model: 


sin->out(wave);

The other connection is to the sca_in of the mixer model. 

So, I don't see any problems here but I might be mistaking. 

With kind regards,

Yes, you can connect the other connection directly to the input port of the mixer model, but outside your mixer, you will need to instantiate a TDF signal, which is connected to the mixer.in port. That signal then has to be driven by some other signal generator, which output port is connected to that top-level signal. Otherwise, SystemC-AMS will give an error that the input signal is not driven.

Link to comment
Share on other sites

1 hour ago, maehne said:

Yes, you can connect the other connection directly to the input port of the mixer model, but outside your mixer, you will need to instantiate a TDF signal, which is connected to the mixer.in port. That signal then has to be driven by some other signal generator, which output port is connected to that top-level signal. Otherwise, SystemC-AMS will give an error that the input signal is not driven.

 
 

Dear maehne,

UPDATE 22:23, I've found the error. Posted below. 


On the top-most level I have connected TDF signals from a signal source to the transmitter, then from the transmitter to the receiver and finally from the receiver to a dummy drain.

bitsource -> transmitter -> receiver -> drain

sca_tdf::sca_signal<bool> bit_in, bit_out;
sca_tdf::sca_signal<double> wave;

bitsource bs("bitsource", 1);
  bs.out( bit_in );

transmitter tx("transmitter", 10000. , 1000 );
  tx.in( bit_in );
  tx.out( wave );

receiver rx("receiver", 10000., 1000, 0.02 );
  rx.in( wave );
  rx.out( bit_out );

drain drn("drain");
  drn.in( bit_out );

The transmitter consists of a mixer and a carrier wave generator:

in -> mixer -> out
The mixer has a second input (sca_in) that accepts a carrier wave. Source is shown in opening post. 

The receiver consists of rectifier, LPF and bit-recovery

in -> rectifier -> LPF -> bit-recovery -> out

Link to comment
Share on other sites

Guys, thank you for your time. As you suggested it is important to connect the TDF input, outputs and signals properly. I erroneously had the bitsource module inherit from a standard SystemC module SC_MODULE although it contained a sca_out. Changing this to a AMS module (SCA_TDF_MODULE) solved the error. 

Again, thanks for your valuable time. You indirectly pointed me to my error which helped me a lot. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...