re1418ma Posted October 12, 2018 Report Share Posted October 12, 2018 hi Is it possible to write behavioral xor gate just like AND gate in systemc? and how i should add certain amount of delay? Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted October 12, 2018 Report Share Posted October 12, 2018 Hello @re1418ma, This has been already discussed before here: http://forums.accellera.org/topic/5715-delaying-simulated-execution/ Hope it helps and if you have further questions please feel to ask. Regards, Ameya Vikram Singh re1418ma 1 Quote Link to comment Share on other sites More sharing options...
re1418ma Posted October 12, 2018 Author Report Share Posted October 12, 2018 #include "systemc.h" SC_MODULE(and2) { sc_in<bool> A, B; sc_out<bool> F; void do_and2() { F.write( A.read() && B.read() ); } SC_CTOR(and2) { SC_METHOD(do_and2); sensitive << A << B; } }; Thanks for reply i use this code for AND Gate What changes should be made؟ Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted October 12, 2018 Report Share Posted October 12, 2018 Hello @re1418ma, You can look at this example: http://forums.accellera.org/topic/5678-clock-to-q-propagation-delay/?do=findComment&comment=13657 Or this one which shows how to add delay in full adder: http://forums.accellera.org/topic/5715-delaying-simulated-execution/?do=findComment&comment=13844 Hope it helps. Regards, Ameya Vikram Singh Shashank V M and re1418ma 2 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.