Changes between Version 1 and Version 2 of SrlApi
- Timestamp:
- Feb 1, 2007, 2:22:37 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SrlApi
v1 v2 1 1 = SrlApi = 2 2 3 Srl API is your gateway to software resources.3 Srl API is your gateway to [wiki:DsxResource "software resources"]. 4 4 5 == Log API==5 == Logging == 6 6 7 7 Log API let you define message levels. Levels allow you to let your debug code in the source, and only compile it when needed. 8 8 9 9 * {{{srl_log(level, "message")}}} prints a message 10 * {{{srl_log_printf(level, "message_with_format", arguments )}}} prints a printf-like message10 * {{{srl_log_printf(level, "message_with_format", arguments...)}}} prints a printf-like message 11 11 12 == Mwmr fifos API==12 == Mwmr fifos == 13 13 14 14 * {{{srl_mwmr_read(fifo, buffer, size)}}} reads {{{size}}} 32-bit words from fifo to buffer. {{{size}}} must be a multiple of fifo width. 15 15 * {{{srl_mwmr_write(fifo, buffer, size)}}} writes {{{size}}} 32-bit words from buffer to fifo. {{{size}}} must be a multiple of fifo width. 16 17 == Locks == 18 19 * {{{srl_lock_lock( lock )}}} takes the lock, waiting if necessary 20 * {{{srl_lock_unlock( lock )}}} releases the lock 21 22 == Barriers == 23 24 * {{{srl_barrier_wait( barrier )}}} waits for a barrier-global synchronization 25 26 == Other APIs == 27 28 * {{{srl_run_cycles( N )}}} tells the simulation environment the simulation should run at least N cycles while in this call. This makes sense only for virtually sunthetised tasks, otherwise, this call is a noop. 29 * {{{srl_mwmr_config( controller_name, reg_n, value )}}} puts value {{{value}}} in config register {{{reg_n}}} of specified controller 30 * {{{srl_mwmr_status( controller_name, reg_n )}}} reads status register {{{reg_n}}} of specified controller, returns a int32_t 31 * {{{srl_assert( cond )}}} checks {{{cond}}} is true, fatally fails otherwise