Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by scsc

  1. scsc

    sc_port zero copy?

    Thanks for pointing the binding process out. I do see slave_port is being used.
  2. scsc

    sc_port zero copy?

    sc_port<simple_bus_slave_if, 0> slave_port; In the above snippet, how many slave_port copies of simple_bus_slave_if are initialized, given N=0? The default of sc_port is N=1.
  3. scsc

    Read in customized structs

    Yes, I figured this one out by inserting a process ...
  4. I had a struct defined as struct pixel { sc_uint<8> r; sc_uint<8> g; sc_uint<8> b; }; Then I try to pass actual pixel values to the ports, defined as pixel data type in main.cpp sc_signal<pixel> p1; sc_signal<pixel> p2; p1.write(pixel(1, 2, 3)); p2.write(pixel(4, 5, 6)); But it seems p1.write() and p2.write() didn't initialize p1 and p2 correctly as I still see they don't have the expected pixel values (1,2,3) and (4,5,6). Do I need to use sc_interface to pass this customized data type around? Thanks
  5. scsc

    sc_interface binding incorrectly

    Cool, thanks. That definitely helps. Appreciate it.
  6. I modified an example (similar to SystemC's simple_fifo example) to have sc_interface to write/read stack. There is no error and can run. But the characters are all messed up. The display looks like this: SystemC 2.3.2-Accellera --- Nov 1 2018 16:37:26 Copyright (c) 1996-2017 by all Contributors, ALL RIGHTS RESERVED binding C1.port_0 to interface: class stack_read_if binding P1.port_0 to interface: class stack_write_if ╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠ Does it mean the sc_interface was not bound correctly? Can someone take a quick look and let me know the issue? This is on VIsual Studio 2015, if that matters. consumer.h main.cpp producer.h stack_if.h hierarchical_stack_channel.vcxproj hierarchical_stack_channel.vcxproj.filters
  7. scsc

    Read in customized structs

    That's a quick response. Thanks. p1 and p2 are in an SC_METHOD process so I didn't put in clocks. I checked their contents by printing out their struct values. Could "the next delta cycle" mean a wait()?