scsc Posted November 6, 2018 Report Share Posted November 6, 2018 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 Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted November 8, 2018 Report Share Posted November 8, 2018 Your consumer process is wrong: void do_reads() { char c; while (true) { if ( in->nb_read(c) ) { // only print valid characters cout << c << flush; } // wait for the next clock wait(); } } Hope that helps, Philipp Quote Link to comment Share on other sites More sharing options...
scsc Posted November 8, 2018 Author Report Share Posted November 8, 2018 Cool, thanks. That definitely helps. Appreciate it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.