Jump to content
Sign in to follow this  
jsmith125x

vhdl after construct

Recommended Posts

There's no easy equivalent. You could do

int atemp;  // or whatever data type a and b are

void proc() {
    while (true) {
         atemp = a.read();
         wait (10, SC_NS);
         b.write(atemp);
    }
}

SC_THREAD(proc);
sensitive << b;

You might possibly be able to build some kind of wrapper around sc_event_queue

 

regards

Alan

Share this post


Link to post
Share on other sites

I've often thought of writing a delayed assignment channel for SystemC. Probably just a new signature for sc_signal::write(...).

 

Of course that begs the question of transport vs inertial delay, which would be interesting to use. I think both are likely to have their uses.

 

Perhaps:

 

template<typename T>

class sc_signal_delayed

: public sc_core::sc_signal<T>

{

    ...

    void write(const T& value, sc_time delay, bool transport=true) { ...details left to the implementor... }

};

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...