Bryan Posted March 14 Report Share Posted March 14 Apologies for the poorly worded Title... I am experiencing an odd (to me) issue when constructing a model in which I have a hierarchy more than 1 level deep. ie: I have an sc_module instantiated within another sc_module, and I am attempting to bind an sc_fifo_in (also an out, but I've simplified to a single port for a testcase) from a testbench through the first sc_module to a second. The lowest-level module within the hierarchy has no static process defined by the constructor but instead spawns dynamic processes only which process the fifo. I can make this code work by either: defining a static process and not using the dynamic process (not ideal for my actual application as I have multiple of these to spawn) only have a single level of hierarchy such that I'm not passing the sc_fifo_in port through an sc_module to the second I created 3 examples on EDA Playground rather than posting 70+ lines of code here. If anyone prefers to see the code here instead, I'm happy to paste it. Here is the first example which works (only a single hierarchy level and using a dynamic process only): Working example Here is a second example which works (two levels of hierarchy and uses a static process only): Working example Here is the second example which fails (two levels of hierarchy and uses a dynamic process only): Failing example I have been trying to determine what I am doing wrong all day, and I have drastically simplified my actual code down to this very simple (not terribly interesting) example. In the Failing case, SystemC reports error E112 - port is not bound (I am building with SystemC 2.3.4). I assumed that there was an issue with not having a static process in my BottomHier module and only having a dynamic process, but when I remove the TopHier level as in my first Working Example above, the code compiles and binds ok. And the second example demonstrates that I can successfully pass an sc_fifo_in port through 2 sc_modules without issue. Is there some limitation I am experiencing when attempting to pass the sc_fifo_in through the TopHier module and binding it to the BottomHier module related to the use of a dynamic process? I simply want TopHier to be a pass-through in this example. I appreciate any advice here. 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.