+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Full Member level 2
    Points: 3,225, Level: 13

    Join Date
    Feb 2002
    Posts
    128
    Helped
    7 / 7
    Points
    3,225
    Level
    13

    systemc question

    what 's the easiest way to convert and connect sc_clock to sc_in<sc_logic> port.

    eg.

    sc_clock clk;

    ....
    ....

    inst *a;

    a = new inst("instance");

    a->clk( ***** ); // in a, clk is declared as sc_in<sc_logic>

    I need to connect sc_clock to this a->clk but due to the different types, the compile forbids me from doing that.

    any ideas?

    THX

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 3
    Points: 9,432, Level: 23

    Join Date
    Jul 2004
    Posts
    892
    Helped
    177 / 177
    Points
    9,432
    Level
    23

    Re: systemc question

    Your statement itself
    Code:
    sc_clock clk;
    is wrong!
    It should be something like
    Code:
    sc_clock clk ("clk", 10, SC_NS, 0.5);
    Checkout this and let us know!



    •   AltAdvertisement

        
       

  3. #3
    Full Member level 2
    Points: 3,225, Level: 13

    Join Date
    Feb 2002
    Posts
    128
    Helped
    7 / 7
    Points
    3,225
    Level
    13

    systemc question

    sorry, i just typed in an example, the sc_clock constructor is NOT complete....

    in the real code, I did use the code piece like you wrote.

    that's not what my question is about.



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 3
    Points: 9,432, Level: 23

    Join Date
    Jul 2004
    Posts
    892
    Helped
    177 / 177
    Points
    9,432
    Level
    23

    Re: systemc question

    Can you post ur complete code here ??



--[[ ]]--