Jump to content

Marwan

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. #include <systemc> SC_MODULE (counter) { sc_in_clk clock ; // Clock input of the design sc_in<bool> reset ; // active high, synchronous Reset input sc_in<bool> enable; // Active high enable signal for counter sc_out<sc_uint<4> > counter_out; // 4 bit vector output of the counter //Local Variables sc_uint<4> count; // Counter logic void incr_count () { // At every rising edge of clock we check if reset is active // If active, we load the counter output with 4'b0000 if (reset.read() == 1) { count = 0
×
×
  • Create New...