Jump to content

Timer with interrupts using Loosely Timed Implementation


Sanchi
 Share

Recommended Posts

I am beginner in SystemC and wants to learn concept of loosely timed implementation on my timer code. I got some idea on LT but unable to implement following functionalities .

How can I apply following functionalities in my code

  1. Timer model should not have pin for clock and there should be some provision through which clock interval can be provided to timer model. Either it can be a constructor argument or may add an API.
  2. Timer should not count/increment at every clock edge, rather we should apply mathematical formulas to calculate when the interrupts will be generated.

 Please help me out.

My code link:https://www.edaplayground.com/x/Dqzi

Thanks,

Sanchi

Link to comment
Share on other sites

This looks suspiciously like assigned homework at a university. The description of the task is quite clear. I don't believe it would be fair to you or your classmates for anybody here to provide you with a solution.

I will provide you with a few function clues:

  1. sc_core::wait( sc_time )
  2. sc_core::sc_time_stamp()

You should be able to solve this problem. Read the textbook if all else fails.

 

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.

 Share

×
×
  • Create New...