Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Thanks a lot but, your code use a bool as output. I need to put together all the bool line in input as one line in output. For istance if I have a vector of 2 bool input I want to took the two bit (i.e. a and b) and convert into a sc_uint<2> in out a*2^1+b*2^0 with 3 input, a,b, and c it would be a sc_uint<3> with a*2^2+b*2^1+c*2^0 and so on
  2. I was wondering if it's possible to create a module that given as input an sc_vector<sc_in<bool> > containing a known number of sc_in<bool> (let's say 2) it would convert into a sc_out<sc_uint<2> >
  3. Hi, I'm trying to understand if there's the chance of bind a vector of 4 sc_signal<bool> with an sc_signal<sc_uint<4> > I have a Ripple Carry Adder composed of 4 1-bit Full Adder. I create and bind my RIpple Carry Adder with the below code sc_vector<sc_signal<bool> > Gen_1; Gen_1.init(N); sc_vector<sc_signal<bool> > Gen_2; Gen_2.init(N); sc_signal<bool > Cin; sc_vector<sc_signal<bool> > Out; Out.init(N); sc_signal<bool> Cout; Where Gen_1 and Gen_2 are the input signals, Cin and Cout are the carry IN and OUT and
  4. Hi, is there a function that return the actual time at which the simulation is? I know sc_time_stamp() but it actually returns a string with the measure unit. I would like something like int i; i = sc_time_stamp().time(ns); (where ns is, for istance, the measure unit)
  5. Ok find the issue. I needed to compile all the .cpp dependencies as well with g++ -I/usr/local/systemc-2.3.3/include -L/usr/local/systemc-2.3.3/lib-linux64/ -lsystemc -lm -o out counter.cpp shifter.cpp testbench.cpp main.cpp
  6. So, I'm trying to compile my main.cpp that includes three modules. For instance I got a module counter with this .h file #include <systemc.h> SC_MODULE(counter) { sc_in<bool> clk; //porta ingresso clock sc_in<bool> load; //porta ingresso load sc_in<bool> clear; //porta ingresso clear sc_in<sc_uint<8> > din; //porta ingresso dato (intero 8 bit) sc_out<sc_uint<8> > dout; //porta uscita dato (intero 8 bit) unsigned int countval; //valore del contatore (intero senza segno) void counting(); //funzione conteggio (il mio processo)
  • Create New...