Jump to content

Dev

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. hello, i have jus started working with the systemC implementations for high level synthesis I need to implement the bit slicing paradigm in systemC which i tried with the variable.range() method and it works fine. But when i used with the fixed point types as shown in the code below, it didnt not work. define SC_INCLUDE_FX #include "systemc.h" SC_MODULE(slice){ sc_in<sc_fixed<42,12,SC_TRN,SC_SAT> > input sc_out<sc_fixed<14,14,SC_TRN,SC_SAT> > output void do_slice(){ // output=input.read().range(42,28); //ERROR IN THIS LINE } SC_CTOR(slice){
  2. Yes casting explicitly would be the perfect idea. Thanks for pointing it out.
  3. hi all, I am just starting to do some practical implementations in systemC. Here i am trying to do a casting of data type ufixed to uint data type. i have tried the follwing code. #define SC_INCLUDE_FX #include "systemc.h" SC_MODULE(casting){ sc_in<sc_ufixed<8,8, SC_TRN, SC_SAT> > castin; sc_out<sc_uint<8> > castout; void do_cast(){ castout.write(castin.read()); // error in this line } SC_CTOR(casting){ SC_METHOD(do_cast); sensitive<< castin; } }; the problem is, it could not write th
  4. Thanks for the response Alan Fitch, It so thoughtful that you pointed out the problem of FIFO dead lock when the read_en is trying to read a data on empty FIFO . I tested the code changing to nb.read(data) which works fine as expected. and also will try the code the changing the structure as you suggested and let know whether its working.
  5. Is my question clear/ understandable?
  6. Is your vcd file opening in GTK wave viewer? if yes did u try to double click the parameter in SST workspace( on the top left ) on your GTKwave viewer.
  7. Thanks alot Alan Fitch for the response. I tried to clear my fifo with some looping logic as shown below #ifndef FIFO_H_ #define FIFO_H_ #define SC_INCLUDE_FX #include "systemc.h" #include<iostream> SC_MODULE(FIFO){ sc_in<sc_ufixed<8,8,SC_TRN,SC_SAT> > din; sc_in<bool> read_en; // Read enable sc_in<bool> write_en; sc_in<bool> reset; sc_out<sc_ufixed<8,8,SC_TRN,SC_SAT> > dout; sc_out<sc_ufixed<9,9,SC_TRN,SC_SAT> > data_count; sc_fifo<sc_ufixed<8,8, SC_TRN, SC_SAT> > buffer; // FIFO declaration sc_ufixed<8,8,SC_TRN,
  8. hi all, I have started working in systemC and started with the implementation of a simple FIFO. #ifndef FIFO_H_ #define FIFO_H_ #define SC_INCLUDE_FX #include "systemc.h" #include<iostream> SC_MODULE(FIFO){ sc_in<bool> read_en; // Read enable sc_in<bool> write_en; sc_in<sc_ufixed<8,8,SC_TRN,SC_SAT> > din; sc_in<bool> reset; sc_out<sc_ufixed<8,8,SC_TRN,SC_SAT> > dout; sc_out<sc_ufixed<9,9,SC_TRN,SC_SAT> > data_count; sc_fifo<sc_ufixed<8,8> > buffer; // FIFO declaration sc_ufixed<8,8,SC_TRN,SC_SAT>
×
×
  • Create New...