Search the Community

Showing results for tags 'systemc'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Synthesizable Subset v1.4 Public Review
    • SystemC Verification (UVM-SystemC, SCV)
  • UVM (Universal Verification Methodology)
    • UVM 1.2 Public Review
    • Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • Simulator Specific Issues
    • UVM Commercial Announcements
  • IP-XACT
    • IP-XACT Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • OCP (Open Core Protocol)
  • UCIS (Unified Coverage Interoperability Standard)
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Calendars

  • Community Calendar

Found 74 results

  1. Is there a way to identify each generic payload transactions with id? I need some id that I can print out as my transaction flows from initiator to target via different modules. Thanks
  2. I created vector of fifos: sc_vector<sc_fifo> fifos; and in my constructor: template <unsigned S> class my_chnl : public my_chnl_if, public sc_channel { sc_vector<sc_fifo> fifos; //vectors of fifos //----------------------------------------------------------- public: //----------------------------------------------------------- //constructor //----------------------------------------------------------- explicit my_chnl(sc_module_name nm, unsigned _size = 4) : sc_channel(nm), fifos("FIFO") { fifos.init(S, _size); } ..... I am getting compile error saying that include/sysc/utils/sc_vector.h:634: error: \u2018c\u2019 cannot be used as a function If I do fifos.init(S), it works, but I get default size of 16. How do I set custom size? Any help? Thanks
  3. Hi there, I'm an engineering student from Venezuela and working on systemC for a class project. I'm having a bad time trying to make a tri-state buffer model on system C. I know there is sc_logic and sc_lv but I just don't know how to work with this two data types. I'm working a project (a microprocessor) and I need to model a tri-state module to hook up with my registers so I'll be able to have control on the data coming out of the registers. In case you wonder here is more info https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Build/implRegFile.html Any idea on how to model a tri-state buffer module?. thanks in advance.
  4. I'm trying out the example for UVM-Connect 2.3 and I can't get a successful compile. The error message is about the "undefined reference to `m__uvm_report_dpi'. I'm using: GCC 4.5.2 on CentOS 5.11 VCS 2015.09-SP2-3 SystemC 2.3.1 SCV 2.0.0 UVM 1.2 UVMC 2.3.0 Appreciate all the help!
  5. I'm trying out the example for UVM-Connect 2.3 and I can't get a successful compile. The error message is about the "undefined reference to `m__uvm_report_dpi'. I'm using: GCC 4.5.2 on CentOS 5.11 VCS 2015.09-SP2-3 SystemC 2.3.1 SCV 2.0.0 UVM 1.2 UVMC 2.3.0 Appreciate all the help!
  6. Hello All, I want to understand usage of noexcept with SystemC. I read that using noexcept will provide me performance benefits! My doubt is how shall I label a member function noexcept, if it is using a SystemC or a library which throws. Following piece of code is self explanatory and needs assistance on correct usage of noexcept. # ifndef MYNOEXCEPTSCCLASS_H_ # define MYNOEXCEPTSCCLASS_H_ # include <systemc> # include <aLibraryThatThrows> template < typename Tinp , typename Tout > class myNoExceptSCClass : public sc_core::sc_module { private : static Tinp correctVersionForSure() { std::throw "Throwing for fun!" ; } void isThisCorrectVersion1() noexcept { sigOut.write(sigInp.read()); } void isThisCorrectVersion2() { sigOut.write(sigInp.read()); } void isThisCorrectVersion3() noexcept { sigOut.write(aLibraryThatThrows::functionThatThrows()); } void isThisCorrectVersion4() { sigOut.write(aLibraryThatThrows::functionThatThrows()); } public : sc_core::sc_in < Tinp > sigInp ; sc_core::sc_out < Tout > sigOut ; SC_HAS_PROCESS (myNoExceptSCClass) ; explicit myNoExceptSCClass (const sc_core::sc_module_name moduleName_) : sc_core::sc_module (moduleName_) , sigInp ("sigInp") , sigOut ("sigOut") { // Regular Stuffs } ~myNoExceptSCClass() final = default ; myNoExceptSCClass& operator=(const myNoExceptSCClass& other) = delete ; myNoExceptSCClass(const myNoExceptSCClass& other) = delete ; }; # endif Thanks in advance. Regards, Sumit
  7. Hi, I have 2 modules: one Test Bench (TB) and a Device under Test (DUT). The TB has an output port (p_out) to simulate a power on (bool). The DUT has an input multiport (p_in) and inside the DUT there are many modules M with one input port (x_in) connected to (p_in). The idea is to simulate a power on througn TB that is distributed to all internal modules of DUT. Here are the declarations: in TB : sc_out<bool> p_out; In internal moules of DUT: sc_in<bool> x_in; In DUT: sc_port< sc_signal_in_if<bool> , 10, SC_ZERO_OR_MORE_BOUND> p_in; Each time I create an internal modules of DUT, I create automatically a channel of type sc_signal <bool> sig, that I connect between p_in and x_in by doing : sc_signal <bool>* sig = new sc_signal <bool> (); p_in(*sig); x_in(*sig); in main program : sc_signal < bool> sig_power_on; tb->p_out(sig_power_on); I try to connect the signal to the input multiport p_in by : p_in(sig_power_on); But I have the error port cannot be used as a function. Perhaps I don't use the multiport as it would be. Please have you got an idea. Regards
  8. I am new to systemc in ubuntu 14.04 and I am trying to setup up eclipse for a systemc small project. I followed the the provided README in systemc-2.3.1 and the INSTALL to install the library. I then used tutorial here to set up eclipse. The problem is that I have a syntax error tell me that sc_signal_resolved could not be resolved. below is a sample of my code: #include <systemc.h> int sc_main(int argc, char ** argv) { sc_signal_resolved zero, one; // in the rest of the code I will use the zero and one passing them to some gates. return(0); } Please how do I solve this. In Windows with visual studio I have no problem.
  9. Hi all. I'm testing some codes to better understanding tlm. In this moment I have a block with this variable : std::map <tlm::tlm_generic_payload*, unsigned int> queue; Basically a place when I store my transactions using trans pointer as key. This variable is accessed by 2 threads. On as input and one as output. Input is fast, output is slow. Threads Input wait until a location (I check my max size) is free and fill it. In system C I used sc_mutex to check lock and check it every X ns (wait(X,SC_NS)). In tlm I don't want to used fixed time but wait until a location is free. Is there a simple approach to do this or I need to use sc_mutex or similar to share variable among multiple process ? Thanks for every suggestion. I need it!
  10. I am trying to code a very generic module that takes the number of elements of a sc_vector of sc_in from an argument. This module looks like: transformation_arbiter.h using namespace sc_core; using namespace sc_dt; class transformation_arbiter : public sc_module { public: sc_in<bool> clk; sc_vector< sc_in<bool> > enable_in; . . . private: unsigned pre_rep; public: SC_HAS_PROCESS( transformation_arbiter ); transformation_arbiter( sc_module_name trans_arbiter, unsigned ext_pre_rep ): sc_module( trans_arbiter ), pre_rep( ext_pre_rep ), enable_in( "enable_in" ) { SC_THREAD( arbitrate ); sensitive << clk; } void arbitrate() { enable_in.init( pre_rep ); . . . } Then I am instantiating this module, along with a sc_vector of another module (request_generator.cpp) in a top module (top.cpp): request_generator.h . . . using namespace sc_core; using namespace sc_dt; class req_generator : public sc_module { public: //ports: sc_in_clk clk; sc_out<bool> enable_out; . . . top.h #include "trans_arbiter.h" #include "request_generator.h" . . . sc_signal<bool> signal[4]; sc_vector<req_generator> req_gen; transformation_arbiter trans_1_arb; . . . and top.cpp #include top.h top::top(sc_module_name sys_m): sc_module(top_m), trans_1_arb ( "trans_1_arb", 4 ), req_gen( "req_gen", 4) { . . . for ( auto i = 0; i < REQ_MODULES; ++i ) { trans_1_arb.enable_in[i].bind ( signal[i] ); } . . . } The problem is that this causes a segmentation fault in the bind instruction: Program received signal SIGSEGV, Segmentation fault. 0x0000000000412501 in sc_core::sc_vector<sc_core::sc_in<bool> >::operator[] (this=0x7fffffffcec0, i=0) at ./systemc-2.3.1/include/sysc/utils/sc_vector.h:384 384 { return *static_cast<element_type*>( base_type::at(i) ); } If I don't use de delayed initialization of the sc_vector like this: public: SC_HAS_PROCESS( transformation_arbiter ); transformation_arbiter( sc_module_name trans_arbiter ): sc_module( trans_arbiter ), enable_in( "enable_in", 4) { SC_THREAD( arbitrate ); sensitive << clk; } void arbitrate() { . . . } The code works, but then it is not generic anymore, since several instances of the module could have different number of ports, and not always 4. I'd really appreciate any help on this issue. Thanks, Fernando
  11. Hi, I have some situations in my models where I have to write a signal from different drivers. To avoid 'multiple drivers to a signal' error I add SC_MANY_WRITERS flag. Is there any way to allow multiple driers to a signal other than putting above flag? I know about sc_resolved but it works only for sc_logic. whenever i regenerate netlist using tool I had to add the flag manually as the tool doesn't have any way to know its a signal with multiple writers.
  12. I didn't find an efficient bug report entrance so I decided to post it here to see whether people think this is a bug or not. I'm trying to use Ralph's solution to reset the sim context (see http://forums.accellera.org/topic/2273-problem-with-re-instatiation-of-modules/). However, that only works well with those modules that don't have a reset signal. I spent some time debugging this with reset signal and found that: This method, sc_reset::reconcile_resets() at src/sysc/kernelsc_reset.cpp:160, is supposed to iterate over all things in reset_finder_q, a static linked list of sc_reset_finder, and delete sc_reset_finder one by one (see line 168-170 for the nature of a linked list, line 195 for delete). Here comes the bug: after the loop, it should but it forgot to set reset_finder_q to NULL! If reset_finder_q is not NULL when I reset the sim context, the next reset signal at line 97 will append itself to a non-existing queue node, which makes the next reconcile_reset cast seg fault. I could see that it's indeed undefined behavior to reset the sim context, but in general it is not a good idea to forget to reset some pointer. Thanks, Shunning
  13. I am a bit confused about the correct usage of the SC_REPORT_* macros. In "sysc/kernel/sc_simcontext.cpp" we have: SC_REPORT_INFO("/OSCI/SystemC","Simulation stopped by user."); The above is helpful as it produces easily parseable output. Whereas in "sysc/kernel/sc_object_manager.cpp" we have: std::string message = result_orig_string; message += ". Latter declaration will be renamed to "; message += result_string; SC_REPORT_WARNING( SC_ID_INSTANCE_EXISTS_, message.c_str()); This is not so helpful, since it is not clear where the error comes from when analysing output. A quick grep showed that there are a lot of instances where the first argument to a SC_REPORT_* macro is some ID and not the source of the error. Those IDs are resolved to error message strings, which in my opinion should go into the second argument. Could someone please clarify which way is correct? I would like to be able to handle the sc_report messages with our own message handler.
  14. I'm trying to run uvm-systemc on macosx. Link to download: http://accellera.org/images/downloads/drafts-review/uvm-systemc-1.0-alpha1.tar.gz In the install flow, ../configure works fine, but on make i get this error: Making all in macros CCLD libmacros.laar: no archive members specifiedusage: ar -d [-TLsv] archive file ... ar -m [-TLsv] archive file ... ar -m [-abiTLsv] position archive file ... ar -p [-TLsv] archive [file ...] ar -q [-cTLsv] archive file ... ar -r [-cuTLsv] archive file ... ar -r [-abciuTLsv] position archive file ... ar -t [-TLsv] archive [file ...] ar -x [-ouTLsv] archive [file ...]make[4]: *** [libmacros.la] Error 1make[3]: *** [all-recursive] Error 1make[2]: *** [all-recursive] Error 1make[1]: *** [all] Error 2make: *** [all-recursive] Error 1 I've looked online, and it seems that it is a makefile problem. However the uvm-systemc makefile is way to complex for me to comprehend where the issue could reside. Any ideas on why is this happening? Thanks
  15. I am writing I2C model (as per my requirement) which include master.cpp and slave.cpp. There are 2 signals: SDA and SCL, both are type of sc_inout_resolved in both the files. Connection and Port binding is done perfectly in test bench as well. I am controlling SDA & SCL in file called master.cpp. While transferring ack from slave to master, SDA will be controlled by slave.cpp (writes SDA 0). After this again master.cpp should control the SDA line for further transactions. But once controlling on SDA switches to slave.cpp, unable to control SDA again from master.cpp. Writing values(0,1) on SDA is not making any difference. I confirmed this issue using gtkwave. Am I missing anything here? Can anyone tell how to handle sc_inout_resolved between 2 models?.
  16. I am writing I2C model (as per my requirement) which include master.cpp and slave.cpp. There are 2 signals: SDA and SCL, both are type of sc_inout_resolved in both the files. Connection and Port binding is done perfectly in test bench as well. I am controlling SDA & SCL in file called master.cpp. While transferring ack from slave to master, SDA will be controlled by slave.cpp (writes SDA 0). After this again master.cpp should control the SDA line for further transactions. But once controlling on SDA switches to slave.cpp, unable to control SDA again from master.cpp. Writing values(0,1) on SDA is not making any difference. I confirmed this issue using gtkwave. Am I missing anything here? Can anyone tell how to handle sc_inout_resolved between 2 models?.
  17. Hello all, I am finding that SystemC 2.2 cannot harmoniously compile with boost 1.58 when -DSC_INCLUDE_DYNAMIC_PROCESSES is defined. It creates a condition where SystemC's embedded boost declarations are previously defined in the real boost. Is there any workaround for this without completely hacking SystemC's boost sources to properly embed boost in "sc_boost" namespace instead of it colliding with the boost namespace from a different release? Details of an example error: In file included from /tmp/systemc/include/sysc/kernel/sc_boost.h:58:0, from /tmp/systemc/include/sysc/kernel/sc_dynamic_processes.h:54, from /tmp/systemc/include/systemc:94, from ExampleX.h:32, from Example.h:32, from Example.cpp:25 /tmp/systemc/include/sysc/packages/boost/ref.hpp:31:25: error: redefinition of 'class boost::reference_wrapper<Type>' In file included from /tmp/boost/1.58.0/boost/ref.hpp:15:0, from /tmp/boost/1.58.0/boost/tuple/tuple.hpp:27, from /tmp/boost/1.58.0/boost/multi_index/detail/index_base.hpp:28, from /tmp/boost/1.58.0/boost/multi_index/detail/base_type.hpp:21, from /tmp/boost/1.58.0/boost/multi_index_container.hpp:34, from ExampleY.h:24, from Example.h:27, from Example.cpp:25: PS. We aren't able to move to SystemC 2.3, but would like to know if this was solved in recent editions?
  18. Good day, I have a question regarding how to determine the appropriate delay value for the wait( ) function call. In the target b_transport callback, we can add delay to the simulation time by passing delay amount to the wait( ) function. In simulation that uses quantum and temporal decoupling that targets super fast instruction accurate simulation, the timing does not have to be very detail (loosely timed). With or without delay in the target callback function will not cause any functional inaccuracy and still we could produce the platform that can support firmware/software development. Still if we want to put a delay to the wait( ), how can we determine the appropriate delay value for the function parameter? Thank you. Regards, Arya.
  19. Hi, I have just learned SystemC for a few days. I wonder what's the main function of wait(SC_ZERO_TIME). It means process will wait until the end of this time or wait for a cycle. But, when should I use wait(SC_ZERO_TIME) and what's the sequence if there's two wait(SC_ZERO_TIME) in two thread? Thank you all.
  20. Good Day All, I am a complete noob in SystemC. I am however, working on a simulator which utilizes a few concepts from SystemC. Kernel is picking up on either the Sc_Method or the Sc_Thread. I am aware of the wait command. It can only be used in the sc_thread. But in my code, (excerpt) I am currently using SC_thread and sc_method simultaneously. I wanted to introduce a delay in simulation time in the sc_thread (using the wait command). Is there a way to forward the simulation time in SC_METHOD that is analogous to wait() in SC_Thread. I did change one of the functions to SC_Thread, and the other to SC_Method. But, on simulation, if the kernel picks up on the SC_Method, it continues to stay in SC_Method and not go on to SC_thread. Here is the code for SC_Method: (code for SC_THREAD is given after this code) void NoximRouter::rxProcess_local() { cout<<"rxProcess_local"; // Clear outputs and indexes of transmitting protocol ResetTable(); current_level_rx_local = 0; } else {//cout<<req_rx_local.read()<<" "<<current_level_rx_local<<endl; if((req_rx_local.read()== 1- current_level_rx_local) && !buffer_snd.IsFull()) { //current_level_rx = 1 + current_level_rx; NoximPacket received_packet = flit_rx_local.read(); //cout<<"Inside NoximRouter::rxProcess_local:"<<received_packet<<endl; buffer_snd.Push(received_packet); // cout<<"receiver"<<endl; if (NoximGlobalParams::verbose_mode > VERBOSE_OFF) { cout << sc_time_stamp().to_double() / 1000 << ": Router[" << local_id << "], Received packet from PE: " << received_packet << endl; } current_level_rx_local = 1 - current_level_rx_local; } ack_rx_local.write(current_level_rx_local); THIS IS PART OF THE CODE FOR SC_THREAD: void NoximRouter::txProcess_mode() { cout<<"txProcess_mode"; while( buffer_snd.Size()!=0) //Going with just one buffer(may be corresponding to the router,... but actually for the processing element) { NoximPacket packet = buffer_snd.Front(); NoximRouteData route_data; route_data.current_id = local_id; route_data.src_id = packet.src_id; route_data.dst_id = packet.dst_id; const vector < vector<int> > o = Route(route_data); //stats.power.Arbitration(o.size()); int src= packet.src_id; vector <int> path; int col =0; // checking in the global table the channels which are free and writhing to the respective channels path.push_back(src); packet.dir=checkdir(o); if(checkmode1(path,o,src,col,packet)==1) { buffer_snd.Pop(); cout<<"Mode1\n"; packet.seq_no=path; packet.mode_tx=1; flit_tx.write(packet); mode1_traffic++; stats.pkthist.push_back(makePacketHist(packet)); for(int i=0;i<path.size();i++) {
  21. I want to learn how to install systemc-2.3.1 or systemc-2.3.0 on ubuntu 13.04 precisely and step by step. can you help me?
  22. Hi, I have two files. In header file I have two modules `camkii` and `camkii_ring`. The `camkii_ring` contains N number of `camkii` submodule. I thought of using std::vector to instantiate the submodules. See the code below. #ifndef CAMKII_H #define CAMKII_H #include <systemc.h> #include <vector> using namespace std; SC_MODULE(camkii) { sc_in_clk clock; sc_in<double> ca_conc_in; sc_signal<double> v1, v2, v3; void init() { cout << "[Ca] " << ca_conc_in << endl; //cout << sc_get_time_resolution() << endl; } void compute_rate() { // do something } SC_CTOR(camkii) { init(); SC_METHOD(compute_rates); sensitive << clock.pos(); } }; /* * This module is a ring of CamKII holoenzyme. It has total of 6 camkii * holoenzymes. */ SC_MODULE( camkii_ring ) { sc_in_clk clock; sc_in<double> ca_in; /* It has 6 subunits of holoenzymes */ vector<camkii*> subunits; void init() { for( int i = 0; i < 6; i++) { stringstream name; name << "sub" << i; camkii* c = new camkii(name.str().c_str()); c->clock(clock); c->ca_conc_in(ca_in); subunits.push_back(c); } } void compute() { } SC_CTOR(camkii_ring) { init(); SC_METHOD(compute); sensitive << clock.pos(); } }; #endif /* end of include guard: CAMKII_H */ And here is my main.cc file. #include "camkii.h" #include <systemc.h> #include <iostream> using namespace std; int sc_main(int argc, char** argv) { sc_clock clock_("GlobalClock", 10, SC_MS, 0.5); sc_signal<double> ca_conc, i1p_conc; sc_signal<double> camkii_out; /* connect the camkii ring to ports */ camkii_ring camkii_ring("cakii_ring"); camkii_ring.clock(clock_); camkii_ring.ca_in(ca_conc); cout << "Starting ..." << endl; sc_start(100, SC_MS); return 1; } It compiles fine but when I run it Error: (E112) get interface failed: port is not bound: port 'cakii_ring.sub0.port_1' (sc_in) In file: sc_port.cpp:230
  23. Hi, I'm newbie to SystemC TLM, coming from SystemVerilog UVM world. I would like to model our RTL in SystemC using TLM2.0 to speed up our Software Development process. Our RTL is not memory mapped bus architecture and we would like to use custom transaction class instead of generic payload. Is it possible to do that using TLM2.0? If yes, could you please provide me with an example. Also, I have four TLM ports communicating with each other in the same model. How does one b_transport method works with all four ports? Is it a good idea to make a model in SystemC rather than having it in SV UVM? Thanks Zubin
  24. Hi, Does SystemC support queue like SystemVerilog? I want to create dynamic array in SystemC TLM2.0, can any one suggest a better way to do it? Thanks Zubin
  25. Hello, I am having an SC_THREAD as follows // // SC_THREAD(my_proc); sensitive << event_1; dont_initialize(); // // // void my_proc() { while(1) { wait(10,SC_NS); cout << " Display ok"; wait(event_1); } } My question is i am having an situation where this event get triggered repetedly in short instance of time, lets say at time t=2 ns it get triggered then SC_THREAD starts, then again it get triggered at t=4ns, but this triggerring of event goes unnoticed. I saw some post and from them i got to know that i cant even use sc_event_queue as i am using wait in my thread. What can be alternative to implement this logic. Thanks.