gabriel123

Members

3

1. How to create a vector of fifos and add new fifos values depending on an input?

Thanks @eyck the solution worked
2. How to create a vector of fifos and add new fifos values depending on an input?

This is all in the constructor so they are created during construction if i understand correctly. I want to know how to add members to my sc_vector. In C++ the method push_back would be used. If it isnt possible does that mean if i need 1000 fifos i would have to write the below code 1000 times? sc_fifo<int> *fifos1; fifos1 = new sc_fifo<int>(50000);
3. How to create a vector of fifos and add new fifos values depending on an input?

Hi, im new to systemC. I want to know how to create a specific amount of sc_fifos<int> depending on an argument. Usually something like this is done with a vector in c++. That is why i thought that an sc_vector is appropriate here. My original code (static). I would have to write new fifos depending on how much i need: sc_fifo<int> *fifos1; sc_fifo<int> *fifos2; sc_fifo<int> *fifos3; fifos1 = new sc_fifo<int>(50000); fifos2 = new sc_fifo<int>(50000); fifos3 = new sc_fifo<int>(50000); The approach with vectors: sc_vector< sc_fifo<int> > fifos; fifos(outputs) for (int i = 0; i < outputs; i++) { fifos[i] = new sc_fifo<int>(50000); } The above code doesn't work. How am i supposed to initialize the vector and add new sc_fifos?
×
×
• Create New...