richpodraza Posted January 18, 2013 Report Share Posted January 18, 2013 I have roughly the following clock scheme set up double refclk_period = 8000; double ck1_ratio = 10; double ck2_ratio = 5; double ck3_ratio = 6; sc_clock refclk("refclk", refclk_period, SC_PS); sc_clock ck1("ck1", refclk_period/ck1_ratio, SC_PS); sc_clock ck2("ck2", refclk_period/ck2_ratio, SC_PS); sc_clock ck3("ck3", refclk_period/ck3_ratio, SC_PS); Then I have SC_THREADs sensitive to each clock's pos(). I've realized a problem which is that eventually ck3 will get quite out of sync since it does not divide the refclk period evenly. For example at 8000 ps, the SC_THREAD watching ck3 last hit at 7998 ps. Ideally all the clocks should be firing at 8000 ps. This has got to be a common problem. Is there a recommended way to sync clocks with SystemC? Thanks! Quote Link to comment Share on other sites More sharing options...
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.