Jump to content

Recommended Posts

Hi all,

i'm implementing a timer/counter(8-bit) that should not increment on every clock and i'm not supposed to provide any input clock port . But i need clock period in my design so my question is " How would i provide clock period(through constructor)?" 

here is the link to my working code on EDAplayground : http://www.edaplayground.com/x/4_dY

if there is any problem in my code please feel free to tell me. 

regards,

jatin

Share this post


Link to post
Share on other sites

Seems like a lot more code than needed. Where's the specification?

Why are you using sc_int<8> everywhere instead of std::uint8_t ? HINT: sc_int<W> slows down performance and is not needed for 8, 16, 32 or 64 bit types

Passing time through the constructor is fine.

Share this post


Link to post
Share on other sites

Hello Sir,

I am a noob i have just started learning systemC(It's been just 3 weeks) and i did not know about uint8_t, now i will try it and explore it.

Sir please check the attached file for specification. also can you please give me a simple example in which time period has passed through constructor actually i want to see the syntax.

In my design there is one more problem : "whenever i enable my constructor after disabling, it gives wrong output".!!

regards,

jatin 

up_timer.pdf

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.


×
×
  • Create New...