Questions tagged [systemc]

C++ library used for system-level modeling of hardware designs. Used by engineers in making architectural decisions, modeling performance and enabling software/firmware development concurrently with traditional hardware development.

Wiki

SystemC is a collection C++ classes and macros which provide an event-driven simulation interface in C++. These facilities enable a designer to simulate concurrent processes, each described using plain C++ syntax. SystemC processes can communicate in a simulated real-time environment, using signals of all the datatypes offered by C++, some additional ones offered by the SystemC library, as well as user defined. In certain respects, SystemC deliberately mimics the hardware description languages VHDL (tag ) and Verilog (tag ), but is more aptly described as a system-level modelling language.

SystemC is standardized as IEEE 1666-2011 (available as a free download). SystemC-AMS is standardized as IEEE 1666-2011.1 (also available as a free download).

Example

#include "systemc.h"
 
SC_MODULE(adder)          // module (class) declaration
{
  sc_in<int> a, b;        // ports
  sc_out<int> sum;
 
  void do_add()           // process
  {
    sum.write(a.read() + b.read()); //or just sum = a + b
  }
 
  SC_CTOR(adder)          // constructor
  {
    SC_METHOD(do_add);    // register do_add to kernel
    sensitive << a << b;  // sensitivity list of do_add
  }
};

Tag usage

The tag can be used for programming related problems in system level modelling and other related fields. Please avoid theoretical and "refer-a-book"-type questions on stackoverflow.

Read more

279 questions
-2
votes
1 answer

Simulation speed of SystemC vs SystemVerilog

Does anyone have a pointer to measurements of how fast a behavioral model written in SystemC is compared to the same model written in SystemVerilog? Or at least first hand experience of the relative simulation speed of the two, when modeling the…
seanhalle
  • 973
  • 7
  • 27
-2
votes
1 answer

SystemC: read() and write() to port doesnt work

I am new to systemC It might look stupid but I would appreciate help. In the below code In main function :write() to aa and bb shows value 0 when read using aa.read() and bb.read() which should be 10 and 20 And also I think it should enter the…
-2
votes
2 answers

Class method returning reference C++/SystemC

To pass user-defined datatypes into SystemC channels templates requires these datatypes to be defined as a class that implements also different kind of operators <<, =, ==. I need to define a sc_fifo such as: sc_fifo For this to be…
Theo
  • 41
  • 1
  • 9
-3
votes
1 answer

How to integrate Eclipse, systemc-2.3.3, and cygwin on Windows?

How to integrate Eclipse, systemc-2.3.3, and cygwin on Windows?
HmdRmz
  • 1
  • 2
-3
votes
1 answer

How can fix Access Noxim installation Error

Plz Help what is the error when I run the "make" g++ -g -O3 -I. -I.. -I../src -I/usr/local/systemc-2.3.2/include/systemc-2.2 -c ../src/NoximNoC.cpp ../src/NoximNoC.cpp:14:10: fatal error: systemc.h: No such file or directory 14 | #include…
-3
votes
2 answers

the equality operator is not matched in the code

for the following code I am getting error receive_cmd.cpp:12:40: error: no match for 'operator==' in 'tmp_cmd == gold_rom[tmp_cmd.cmd::cmd_id]' void tb::receive_cmds(){ cmd tmp_cmd; cmd gold_rom[128]; wait(1, SC_NS); cmd_error = false; …
uzmeed
  • 21
  • 5
-3
votes
1 answer

compare images using systemC

I wrote in this forum asking for help to solve this problem that took ame a lot of my time,i write my first program using systemC, I will expain my aim as much as I can , I stored 2 matrix of pixel value of image in two different text files, I write…
-3
votes
1 answer

C++/ SystemC : Is there a way to select only a range of values from array? ( For example selecting 5 values from an array of 10 values)

OK here's what I am trying. I have passed an array to a function. And while returning I want to send in only those values which are defined in a array. For example, say I have an array definition of 10, I want to return only 5 values from that…
Harish
  • 3
  • 3
-4
votes
1 answer

Access violation reading location 0x00000000

when i put the code below in my solution and then debug it, a massage containing this "Unhandled exception at 0x0016ec86 in Q2.exe: 0xC0000005: Access violation reading location 0x00000000." come up on my screen. i think it's due to "cout" but i…
Ali Banagozar
  • 11
  • 1
  • 3
1 2 3
18
19