Jump to content

T. Zimmermann

  • Content count

  • Joined

  • Last visited

  1. Hi, I am using transaction recording with the latest version of SCV (version 2.0.1) and currently I am getting a segmentation fault. I have just searched for a list or something similar with known bugs but I haven't found one. Is there a bug list or a list of known problems somewhere? Regards, Thomas PS: I will create a minimal model in the next few days.
  2. Initialization of nested sc_vector< sc_vector< > >

    Hi, regarding my last post. Is it possible to call the constructor 'sca_element_model( sc_core::sc_module_name name, double r_value = 1.0)' within the function 'element_vector_creator()' and pass values to the variable 'name' and 'r_value' (second parameter of the constructor). How is this implemented? How is the construct in the C++ standard called?
  3. Hi Torsten, thanks for the fast and detailed reply. Yes, I also want to calculate the energy, but first I wanted to start with a simple example. I attached an example that should correspond to your suggestion. The ELN primitive is in this case a simple resistor and the source code compiles without warnings. But, as soon as the simulation is started, the program stops and throws the error: Error: (E109) complete binding failed: port not bound: port 'my_adv_primitive.isink.n' (sca_eln::sca_terminal) In file: ../../../../src/sysc/communication/sc_port.cpp:231 The port is connected in the example. So, I can only explain the error by the fact that the TDF cluster has no sample time. In this case, the sample time depends on the trace file itself or on other signals in the trace file. Is there a way to pass the sample time via the function sca_trace() to the calculation module? Kind regards Thomas
  4. Hi community, I would like to build an advanced ELN primitive which acts as the primitive and automatically calculates for instance the power of the primitive. Furthermore, the power should be traceable when it is needed but it should also be possible to leave the power information dangling. My first idea was to create an ELN module (sca_eln::sca_module) that consists of the ELN primitive, a voltage sink (sca_eln::sca_tdf_vsink), a current sink (sca_eln::sca_isink) and a variable (sca_tdf::sca_trace_variable). The sca_trace_variable should contain the current power p(t) and it would be traceable when needed and could also be dangling. Due the sca_trace_variable is a TDF MOC, in the AMS-LRM § is mentioned that the sca_trace_variable should only be read or written in the member function processing(). Now the problem arise, that in an ELN module (sca_eln::sca_module) no member function processing() can be called because ELN modules have no one. Does anyone have an idea, of how to build an advanced ELN primitive that can provide additional (traceable) information without affecting the ELN equation system? Kind regards Thomas
  5. Hello Martin, thank you for the link to the latest version. I've installed the new version but the problem remains. I'm using Microsoft Visual Studio Community 2015 Version 14.0.25425.01 Update 3, the used compiler is Visual C++ 2015 00322-20000-00000-AA002. The debugger stops in the file 'xutility' at the function call: void _Adopt(const _Container_base12 *_Parent) { // adopt this iterator by parent if (_Parent == 0) The design uses both types of modules, ELN and TDF.Best regards, Thomas
  6. Hi Karsten, in the working application are 949 dataflows, 761 modules, 191 inputs and 381 outputs. The application uses about 25 MByte RAM, installed are 16 GByte. The application is compiled as Win32 application. As I know, it should be the curent version of SystemC-AMS: Version: 2.0_beta1 BuildRevision: 1739 Best regards Thomas
  7. Hallo, I build up a scalable simulation model with the 'systemc-ams-2.0_beta1'. I have 1 data flow cluster with 949 dataflow modules/solver which can be simulated. When I increase the model size, the simulation breaks after the instantiation of the modules with no SystemC error message (windows stops the application and offers the possibility to debug or to close the application). My question, is there a limitation on the number of useable solvers? Best regards Thomas
  8. Torsten, thank you for the well explanation. I could solve it by modeling a real source.
  9. Hi, I want to model a constant power source, which has a p and a n ELN terminal and tdf input port to control the constant power. I connected a TDF voltage sink parallel to a TDF current source but this constellation does not work. So my question is, how can I model a constant power source? Kind regards Thomas
  10. Initialization of nested sc_vector< sc_vector< > >

    Hello Torsten, Hello Philipp, thanks to both of you. I haven't seen the wood for the trees (idiom in german: den Wald vor lauter Bäumen nicht sehen). For those who are interested in, you can find a working example in the attachment. Kind regards, Thomas workingExample.zip
  11. Initialization of nested sc_vector< sc_vector< > >

    Thank you Philipp, now the project compiles without errors and I get the grid of modules e.g. the modules are named <grid1.vector_0_0_0>, <grid1.vector_0_0_1>, <grid1.vector_0_0_2>, <grid1.vector_0_1_0>, <grid1.vector_0_1_1>, <...> Can you give me a tip, how I can call functions of the individual elements, for example in the nested loop to initialize the elements: for (int i = 0; i < no_of_y_element; i++) { for (int j = 0; j < no_of_x_element; j++) { grid1[j][i].foo() // <-- the function call does not work } }
  12. Initialization of nested sc_vector< sc_vector< > >

    In the attachment is a minimal example that's not working yet. miniExample.zip
  13. Initialization of nested sc_vector< sc_vector< > >

    Philipp, thanks for the quick response. I implemented the following code in the module.h file : class module_model : public sc_core::sc_module { public: module_model( sc_core::sc_module_name name, int no_of_y_module=1, int no_of_x_module=1); ~module_model(); static sc_core::sc_vector< sca_element_model >* element_vector_creator(size_t size, const char* name, size_t); private: sc_core::sc_vector< sc_core::sc_vector< sca_element_model > > element; } and in the module.cpp file: In the module.cpp file: sc_core::sc_vector< sca_element_model >* module_model::element_vector_creator(size_t size, const char* name, size_t) { return new sc_core::sc_vector< sca_element_model >( name, size); } Afterwards, I call the element.init() function in the constuctor of the module class: module_model::module_model( sc_core::sc_module_name name, int no_of_y_module, int no_of_x_module){ // Create elements element.init( no_of_y_module, sc_bind( element_vector_creator, no_of_x_module, sc_unnamed::_1, sc_unnamed::_2) ); // Initialize elements // Interconnect elements } Now, the compiler throws the error that the sc_bind()-function is not defined and the 'sc_unnamed' is no class or namespace. Has the sc_bind()-function implemented by the user?
  14. Hi, I need a two dimensional array of SystemC-AMS objects. I read that it should be possible to use nested sc_vector to realize a two dimensional grid of SystemC objects. Therefore, I defined it as in the following code segement: sc_core::sc_vector< sc_core::sc_vector< sca_module > > element; Now, I want to initialize each elememt, but I don't know how to call the init()-function to set the size.