MCPcopy Create free account
hub / github.com/accellera-official/systemc / burst_write

Method burst_write

examples/sysc/simple_bus/simple_bus.cpp:244–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244simple_bus_status simple_bus::burst_write(unsigned int unique_priority
245 , int *data
246 , unsigned int start_address
247 , unsigned int length
248 , bool lock)
249{
250 if (m_verbose)
251 sb_fprintf(stdout, "%s %s : burst_write(%d) @ %x\n",
252 sc_time_stamp().to_string().c_str(), name(), unique_priority,
253 start_address);
254
255 simple_bus_request *request = get_request(unique_priority);
256
257 request->do_write = true; // we are writing
258 request->address = start_address;
259 request->end_address = start_address + (length-1)*4;
260 request->data = data;
261
262 if (lock)
263 request->lock = (request->lock == SIMPLE_BUS_LOCK_SET) ?
264 SIMPLE_BUS_LOCK_GRANTED : SIMPLE_BUS_LOCK_SET;
265
266 request->status = SIMPLE_BUS_REQUEST;
267
268 wait(request->transfer_done);
269 wait(clock->posedge_event());
270 return request->status;
271}
272
273//----------------------------------------------------------------------------
274//-- BUS methods:

Callers 1

main_actionMethod · 0.80

Calls 4

sb_fprintfFunction · 0.85
c_strMethod · 0.80
waitFunction · 0.50
to_stringMethod · 0.45

Tested by

no test coverage detected