//////////////////////////////////////////////////////////////////// // What A Record Is // Records depend on the process, meaning that they depend on the // particulars of the Stream Processor. A record is abstracted here // into the form of a matrix, R x C. The geometry R x C is: // R is the number of rows of data, (addresses) // C is the number of columns (byte selects). // // Each column, is one byte, so a 4x3 record would be 4 rows of 3 bytes: // byte2, byte1, byte0 | addr m+0 // byte2, byte1, byte0 | addr m+1 // byte2, byte1, byte0 | addr m+2 // byte2, byte1, byte0 | addr m+3 // // The beginning of a record is column 0, row 0. A base address pointer // points to the zeroeth element. That implies that the // natural word size is based on the number of columns. Above, the // natural word size is 3 columns. 3 bytes. 24 bits. //////////////////////////////////////////////////////////////////// `ifndef DUT_PKG `define DUT_PKG package dut_pkg ; //---------------------------------------------------------------------------- // This is the *specific* record format for the "Hello World" StreamProc, // HWSP, pearsons_r computational unit. CMMD == CORR. // It is a 64 byte record of 16 32-bit words organized as follows: // 31:24 23:16 15:8 7:0 // byte3 byte2 byte1 byte0 // 0 arg1 arg0 CMMD frameID when arg0==1 it means end when cc >= arg1 // 1 l e H 11 // 2 w o l // 3 d l r o // 4 S[2] S[1] S[0] 32 // 5 S[6] S[5] S[4] S[3] // 6 S[10] S[9] S[8] S[7] // 7 S[14] S[13] S[12] S[11] // 8 S[18] S[17] S[16] S[15] // 9 S[22] S[21] S[20] S[19] // 10 S[26] S[25] S[24] S[23] // 11 S[30] S[29] S[28] S[27] // 12 unused offset cc S[31] // 13 unused unused unused unused // 14 unused unused unused unused // 15 unused unused unused unused // // CORR : with arg0 == 0, arg1 is ignored // CORR : with arg0 == 1 the end-at-threshold is enabled, and arg1 is // the threshold value for pearson's r. // Normally device will try all 21 possible correlations by // using the 21 different possible offsets, but with end-of-threshold // enabled it will stop the firts time the cc comes back >= arg1. //---------------------------------------------------------------------------- // This is the *specific* record format for the "Hello World" StreamProc, // HWSP, smoothing computational unit. CMMD == SMOOTH. // It is a 64 byte record of 16 32-bit words organized as follows: // 31:24 23:16 15:8 7:0 // byte3 byte2 byte1 byte0 // 0 arg1 arg0 CMMD frameID arg0 and arg1 not yet specified // 1 res res res N (length of array S) // 2 S[3] S[2] S[1] S[0] // 3 S[7] S[6] S[5] S[4] // 4 S[11] S[10] S[9] S[8] // ... // X S[N] S[N-1] S[N-2] S[N-3] (for example) // 15 ... // // SMOOTH is not yet implemented //---------------------------------------------------------------------------- // This is the *specific* record format for the "Hello World" StreamProc, // HWSP, test computational unit. CMMD == TEST. // It is a 64 byte record of 16 32-bit words organized as follows: // 31:24 23:16 15:8 7:0 // byte3 byte2 byte1 byte0 // 0 arg1 arg0 CMMD frameID arg0 and arg1 not yet specified // 1 rslt3 rslt2 rslt1 rslt0 for initial DMA tests, details coming later // 2 < address pointer 1 > for initial DMA tests, details coming later // 3 < address pointer 2 > for initial DMA tests, details coming later // 4 unused unused unused unused // ... // 15 unused unused unused unused // // TEST is not yet implemented `define RECORDSIZE 64 // The defines below specify a 32-bit write data width and 4-bit write address // configuration. // One will note that with REC_ADDRWIDTH, REC_ROWS could be determined, and // vice-versa. HOWEVER, rather than spread that little calculation around to // every block that needs the non-given value, I'll just put them both here. `define REC_DATAWIDTH 32 `define REC_ADDRWIDTH 4 `define REC_ROWS 16 // This is a placeholder for loading all oneprocs in parallel or serial. It is // not connected to any functioning yet. `define LOADMODE 1 typedef bit[`REC_DATAWIDTH-1:0] DataRec [`REC_ROWS] ; typedef enum bit[2:0] { NONE, WRITE_REQ, WRITE, READ_REQ, READ } c_type ; typedef enum byte { NOP, CORR, SMOOTH, OP3, OP4, OP5, OP6, TEST } i_type ; endpackage `endif