Feb 2, 2016 #1 U u24c02 Advanced Member level 1 Joined May 8, 2012 Messages 404 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,298 Activity points 4,101 Hi. When I use initial statement in interface block in systemverilog, it have some compile error. Can't we use inital statement in interface block?
Hi. When I use initial statement in interface block in systemverilog, it have some compile error. Can't we use inital statement in interface block?
Feb 2, 2016 #2 D dave_59 Advanced Member level 3 Joined Dec 15, 2011 Messages 838 Helped 365 Reputation 734 Reaction score 360 Trophy points 1,353 Location Fremont, CA, USA Activity points 7,369 You can certainly use initial or always blocks inside an interface. Please provide the error.
Feb 2, 2016 #3 U u24c02 Advanced Member level 1 Joined May 8, 2012 Messages 404 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,298 Activity points 4,101 The error message is following that ' a clocking output must be driven by a clocking drive' Why is the error happening? Code: clocking cb@ (posedge clk); Output data, read , addr; Read enable; Endclocking ... Module tb(...) initial begin ... tb.cb.read = 1 ; ... End I found it. It should be <= not =..the reason but I don't know.
The error message is following that ' a clocking output must be driven by a clocking drive' Why is the error happening? Code: clocking cb@ (posedge clk); Output data, read , addr; Read enable; Endclocking ... Module tb(...) initial begin ... tb.cb.read = 1 ; ... End I found it. It should be <= not =..the reason but I don't know.
Feb 2, 2016 #4 D dave_59 Advanced Member level 3 Joined Dec 15, 2011 Messages 838 Helped 365 Reputation 734 Reaction score 360 Trophy points 1,353 Location Fremont, CA, USA Activity points 7,369 Your error message had nothing to do with initial blocks. See 14.16.1 Drives and nonblocking assignments in the 1800-2012 LRM for an explanation of the syntax.
Your error message had nothing to do with initial blocks. See 14.16.1 Drives and nonblocking assignments in the 1800-2012 LRM for an explanation of the syntax.