Changes between Version 111 and Version 112 of library_stdio
- Timestamp:
- Sep 15, 2015, 6:23:30 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v111 v112 1 1 = GIET_VM / User-Level System Calls = 2 2 3 The [source:soft/giet_vm/giet_libs/stdio.c stdio.c] and [source:soft/giet_vm/giet_libs/stdio.h stdio.h] files define all system calls provided to user applications by the GIET-VM. They are generallyprefixed by ''giet_''.3 The [source:soft/giet_vm/giet_libs/stdio.c stdio.c] and [source:soft/giet_vm/giet_libs/stdio.h stdio.h] files define all system calls provided to user applications by the GIET-VM. System calls are prefixed by ''giet_''. 4 4 5 5 [[PageOutline]] … … 13 13 These system calls access the MIPS32 protected registers CP0_PROCID and CP0_TIME. 14 14 15 === 1) void '''giet_proc_xyp'''( unsigned int* cluster_x, unsigned int* cluster_y unsigned int* lpid )=== 16 This function returns the processor identifiers (X,Y,P) from the wired global processor index in CP0_PROCID. 17 * cluster_x : X cluster coordinate 18 * cluster_y : Y cluster coordinate 19 * lpid : local processor index 20 No error possible, as the fixed format is gpid = ( ( cluster_x << Y_WIDTH + cluster_y ) << P_WIDTH ) + lpid 15 === 1) void '''giet_proc_xyp'''( unsigned int* cluster_x, unsigned int* cluster_y unsigned int* p )=== 16 This function returns the processor identifiers (x,y,p) from the wired global processor index in CP0_PROCID. 17 The <x> and <y> arguments are the the cluster coordinates. The <p> argument is the processor local index. 18 The format is CP0_PROCID = ( ( cluster_x << Y_WIDTH + cluster_y ) << P_WIDTH ) + lpid 21 19 22 20 === 2) unsigned int '''giet_proctime'''() === 23 21 This function returns the local processor time from the CP0_TIME register (number of cycles from reset). 24 No error possible, as the processor implements a 32 bits wrapping register.22 The processor implements a 32 bits wrapping register. 25 23 26 24 === 3) unsigned int '''giet_rand'''() === 27 25 This function returns a pseudo-random value derived from both the CP0_PROCID and CP0_TIME registers. 28 No error possible, as the returnvalue is always between 0 & 65535.26 The value is always between 0 & 65535. 29 27 30 28