Jump to content

bitfield

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Hello, so the underlying idea of the whole model I'm working on is that it should be generated from a configuration file during runtime. Thats also the reason for the split between BasePort and Port: The component between the adder and the memory (which is a DMA) doesn't need the data as access to the data would require a dynamic cast. See this EDAPlayground link for an example how its used. If the actual data is needed you would have to do a dynamic_cast<> as was already mentioned. Now that I'm thinking about it, you are probably right that this is not a good solution and
  2. Hello, I am currently working on a model that consists of three components: memory, adder and link element between the two of them. The data transmission between them happens via ports that look like sc_in<BasePort*>, so a pointer to the BasePort class. This class only contains the status bits (e.g. valid), while the actual data is part of a child class of BasePort that is just callled Port. Inside the memory an object of type Port will be instatiated, the data will be written to that object, and finally the oject is static casted to an object of type BasePort that will then be writ
×
×
  • Create New...