An aim of ESL modelling was to be able to easily replace parts of the high-level model with greater detail where necessary. So-called transactors are commonly needed at the boundaries.
Example blocking transactors: convert from transaction to pin-level modelling.
// Write transactor 4/P handshake b_putbyte(char d) { while(ack) do wait(10, SC_NS); data = d; settle(); req = 1; while(!ack) do wait(10, SC_NS); req = 0; } | // Read transactor 4/P handshake char b_getbyte() { while(!req) do wait(10, SC_NS); char r = data; ack = 1; while(req) do wait(10, SC_NS); ack = 0; return r; } |
Try the practical materials: ultra-simple SystemC implementation »`Toy ESL'
11: (C) 2008-17, DJ Greaves, University of Cambridge, Computer Laboratory. |