HOME       UP       PREV       FURTHER NOTES       NEXT (Transactor Configurations)  

Example H/W Protocol: 4/P Handshake

A commonly-used, asynchronous, simplex protocol, with flow control.

  putbyte(char d)
    while(!ack) do wait(0, SC_NS);
    data = d;
    req = 1;
    while(ack) do wait(0, SC_NS);
    req = 0;
  char getbyte()
    while(!req) do wait(0, SC_NS);
    char r = data;
    ack = 1;
    while(req) do wait(0, SC_NS);
    ack = 0;
    return r;

Example, untimed, blocking transactor: converts from transaction to pin-level modelling.

See working SystemC versions in the 'Toy ESL' practical material.

9: (C) 2008-11, DJ Greaves, University of Cambridge, Computer Laboratory.