diff --git a/bmw/autogen_f1.rb b/bmw/autogen_f1.rb new file mode 100644 index 0000000..b956083 --- /dev/null +++ b/bmw/autogen_f1.rb @@ -0,0 +1,75 @@ +# autogen f1 function for BMW + +header = <h, block); dump_x(q, 16, 'Q'); bmw_small_f1(q, block, ctx->h); - dump_x(q, 32, 'Q'); + dump_x(q+16, 16, 'Q'); bmw_small_f2(ctx->h, q, block); ctx->counter += 1; ctx_dump(ctx); @@ -348,3 +382,5 @@ void bmw256(void* dest, const void* msg, uint32_t length_b){ bmw256_ctx2hash(dest, &ctx); } +#include "f1_autogen.c" + diff --git a/bmw/f1_autogen.c b/bmw/f1_autogen.c new file mode 100644 index 0000000..31217b7 --- /dev/null +++ b/bmw/f1_autogen.c @@ -0,0 +1,200 @@ +/* BEGIN of automatic generated code */ + +static inline +void bmw_small_f1(uint32_t* q, const void* m, const void* h){ +/* expand_1( 0) */ + q[16] = + (( ROTL32(((uint32_t*)m)[ 0], 1) + + ROTL32(((uint32_t*)m)[ 3], 4) + - ROTL32(((uint32_t*)m)[10], 11) + + 0x55555550UL + )^ ((uint32_t*)h)[ 7] + ) + + S32_1(q[ 0]) + S32_2(q[ 1]) + S32_3(q[ 2]) + S32_0(q[ 3]) + + S32_1(q[ 4]) + S32_2(q[ 5]) + S32_3(q[ 6]) + S32_0(q[ 7]) + + S32_1(q[ 8]) + S32_2(q[ 9]) + S32_3(q[10]) + S32_0(q[11]) + + S32_1(q[12]) + S32_2(q[13]) + S32_3(q[14]) + S32_0(q[15]); +/* expand_1( 1) */ + q[17] = + (( ROTL32(((uint32_t*)m)[ 1], 2) + + ROTL32(((uint32_t*)m)[ 4], 5) + - ROTL32(((uint32_t*)m)[11], 12) + + 0x5aaaaaa5UL + )^ ((uint32_t*)h)[ 8] + ) + + S32_1(q[ 1]) + S32_2(q[ 2]) + S32_3(q[ 3]) + S32_0(q[ 4]) + + S32_1(q[ 5]) + S32_2(q[ 6]) + S32_3(q[ 7]) + S32_0(q[ 8]) + + S32_1(q[ 9]) + S32_2(q[10]) + S32_3(q[11]) + S32_0(q[12]) + + S32_1(q[13]) + S32_2(q[14]) + S32_3(q[15]) + S32_0(q[16]); +/* expand_2( 2) */ + q[18] = + (( ROTL32(((uint32_t*)m)[ 2], 3) + + ROTL32(((uint32_t*)m)[ 5], 6) + - ROTL32(((uint32_t*)m)[12], 13) + + 0x5ffffffaUL + )^ ((uint32_t*)h)[ 9] + ) + + q[ 2] + R32_1(q[ 3]) + q[ 4] + R32_2(q[ 5]) + + q[ 6] + R32_3(q[ 7]) + q[ 8] + R32_4(q[ 9]) + + q[10] + R32_5(q[11]) + q[12] + R32_6(q[13]) + + q[14] + R32_7(q[15]) + S32_4(q[16]) + S32_5(q[17]); +/* expand_2( 3) */ + q[19] = + (( ROTL32(((uint32_t*)m)[ 3], 4) + + ROTL32(((uint32_t*)m)[ 6], 7) + - ROTL32(((uint32_t*)m)[13], 14) + + 0x6555554fUL + )^ ((uint32_t*)h)[10] + ) + + q[ 3] + R32_1(q[ 4]) + q[ 5] + R32_2(q[ 6]) + + q[ 7] + R32_3(q[ 8]) + q[ 9] + R32_4(q[10]) + + q[11] + R32_5(q[12]) + q[13] + R32_6(q[14]) + + q[15] + R32_7(q[16]) + S32_4(q[17]) + S32_5(q[18]); +/* expand_2( 4) */ + q[20] = + (( ROTL32(((uint32_t*)m)[ 4], 5) + + ROTL32(((uint32_t*)m)[ 7], 8) + - ROTL32(((uint32_t*)m)[14], 15) + + 0x6aaaaaa4UL + )^ ((uint32_t*)h)[11] + ) + + q[ 4] + R32_1(q[ 5]) + q[ 6] + R32_2(q[ 7]) + + q[ 8] + R32_3(q[ 9]) + q[10] + R32_4(q[11]) + + q[12] + R32_5(q[13]) + q[14] + R32_6(q[15]) + + q[16] + R32_7(q[17]) + S32_4(q[18]) + S32_5(q[19]); +/* expand_2( 5) */ + q[21] = + (( ROTL32(((uint32_t*)m)[ 5], 6) + + ROTL32(((uint32_t*)m)[ 8], 9) + - ROTL32(((uint32_t*)m)[15], 16) + + 0x6ffffff9UL + )^ ((uint32_t*)h)[12] + ) + + q[ 5] + R32_1(q[ 6]) + q[ 7] + R32_2(q[ 8]) + + q[ 9] + R32_3(q[10]) + q[11] + R32_4(q[12]) + + q[13] + R32_5(q[14]) + q[15] + R32_6(q[16]) + + q[17] + R32_7(q[18]) + S32_4(q[19]) + S32_5(q[20]); +/* expand_2( 6) */ + q[22] = + (( ROTL32(((uint32_t*)m)[ 6], 7) + + ROTL32(((uint32_t*)m)[ 9], 10) + - ROTL32(((uint32_t*)m)[ 0], 1) + + 0x7555554eUL + )^ ((uint32_t*)h)[13] + ) + + q[ 6] + R32_1(q[ 7]) + q[ 8] + R32_2(q[ 9]) + + q[10] + R32_3(q[11]) + q[12] + R32_4(q[13]) + + q[14] + R32_5(q[15]) + q[16] + R32_6(q[17]) + + q[18] + R32_7(q[19]) + S32_4(q[20]) + S32_5(q[21]); +/* expand_2( 7) */ + q[23] = + (( ROTL32(((uint32_t*)m)[ 7], 8) + + ROTL32(((uint32_t*)m)[10], 11) + - ROTL32(((uint32_t*)m)[ 1], 2) + + 0x7aaaaaa3UL + )^ ((uint32_t*)h)[14] + ) + + q[ 7] + R32_1(q[ 8]) + q[ 9] + R32_2(q[10]) + + q[11] + R32_3(q[12]) + q[13] + R32_4(q[14]) + + q[15] + R32_5(q[16]) + q[17] + R32_6(q[18]) + + q[19] + R32_7(q[20]) + S32_4(q[21]) + S32_5(q[22]); +/* expand_2( 8) */ + q[24] = + (( ROTL32(((uint32_t*)m)[ 8], 9) + + ROTL32(((uint32_t*)m)[11], 12) + - ROTL32(((uint32_t*)m)[ 2], 3) + + 0x7ffffff8UL + )^ ((uint32_t*)h)[15] + ) + + q[ 8] + R32_1(q[ 9]) + q[10] + R32_2(q[11]) + + q[12] + R32_3(q[13]) + q[14] + R32_4(q[15]) + + q[16] + R32_5(q[17]) + q[18] + R32_6(q[19]) + + q[20] + R32_7(q[21]) + S32_4(q[22]) + S32_5(q[23]); +/* expand_2( 9) */ + q[25] = + (( ROTL32(((uint32_t*)m)[ 9], 10) + + ROTL32(((uint32_t*)m)[12], 13) + - ROTL32(((uint32_t*)m)[ 3], 4) + + 0x8555554dUL + )^ ((uint32_t*)h)[ 0] + ) + + q[ 9] + R32_1(q[10]) + q[11] + R32_2(q[12]) + + q[13] + R32_3(q[14]) + q[15] + R32_4(q[16]) + + q[17] + R32_5(q[18]) + q[19] + R32_6(q[20]) + + q[21] + R32_7(q[22]) + S32_4(q[23]) + S32_5(q[24]); +/* expand_2(10) */ + q[26] = + (( ROTL32(((uint32_t*)m)[10], 11) + + ROTL32(((uint32_t*)m)[13], 14) + - ROTL32(((uint32_t*)m)[ 4], 5) + + 0x8aaaaaa2UL + )^ ((uint32_t*)h)[ 1] + ) + + q[10] + R32_1(q[11]) + q[12] + R32_2(q[13]) + + q[14] + R32_3(q[15]) + q[16] + R32_4(q[17]) + + q[18] + R32_5(q[19]) + q[20] + R32_6(q[21]) + + q[22] + R32_7(q[23]) + S32_4(q[24]) + S32_5(q[25]); +/* expand_2(11) */ + q[27] = + (( ROTL32(((uint32_t*)m)[11], 12) + + ROTL32(((uint32_t*)m)[14], 15) + - ROTL32(((uint32_t*)m)[ 5], 6) + + 0x8ffffff7UL + )^ ((uint32_t*)h)[ 2] + ) + + q[11] + R32_1(q[12]) + q[13] + R32_2(q[14]) + + q[15] + R32_3(q[16]) + q[17] + R32_4(q[18]) + + q[19] + R32_5(q[20]) + q[21] + R32_6(q[22]) + + q[23] + R32_7(q[24]) + S32_4(q[25]) + S32_5(q[26]); +/* expand_2(12) */ + q[28] = + (( ROTL32(((uint32_t*)m)[12], 13) + + ROTL32(((uint32_t*)m)[15], 16) + - ROTL32(((uint32_t*)m)[ 6], 7) + + 0x9555554cUL + )^ ((uint32_t*)h)[ 3] + ) + + q[12] + R32_1(q[13]) + q[14] + R32_2(q[15]) + + q[16] + R32_3(q[17]) + q[18] + R32_4(q[19]) + + q[20] + R32_5(q[21]) + q[22] + R32_6(q[23]) + + q[24] + R32_7(q[25]) + S32_4(q[26]) + S32_5(q[27]); +/* expand_2(13) */ + q[29] = + (( ROTL32(((uint32_t*)m)[13], 14) + + ROTL32(((uint32_t*)m)[ 0], 1) + - ROTL32(((uint32_t*)m)[ 7], 8) + + 0x9aaaaaa1UL + )^ ((uint32_t*)h)[ 4] + ) + + q[13] + R32_1(q[14]) + q[15] + R32_2(q[16]) + + q[17] + R32_3(q[18]) + q[19] + R32_4(q[20]) + + q[21] + R32_5(q[22]) + q[23] + R32_6(q[24]) + + q[25] + R32_7(q[26]) + S32_4(q[27]) + S32_5(q[28]); +/* expand_2(14) */ + q[30] = + (( ROTL32(((uint32_t*)m)[14], 15) + + ROTL32(((uint32_t*)m)[ 1], 2) + - ROTL32(((uint32_t*)m)[ 8], 9) + + 0x9ffffff6UL + )^ ((uint32_t*)h)[ 5] + ) + + q[14] + R32_1(q[15]) + q[16] + R32_2(q[17]) + + q[18] + R32_3(q[19]) + q[20] + R32_4(q[21]) + + q[22] + R32_5(q[23]) + q[24] + R32_6(q[25]) + + q[26] + R32_7(q[27]) + S32_4(q[28]) + S32_5(q[29]); +/* expand_2(15) */ + q[31] = + (( ROTL32(((uint32_t*)m)[15], 16) + + ROTL32(((uint32_t*)m)[ 2], 3) + - ROTL32(((uint32_t*)m)[ 9], 10) + + 0xa555554bUL + )^ ((uint32_t*)h)[ 6] + ) + + q[15] + R32_1(q[16]) + q[17] + R32_2(q[18]) + + q[19] + R32_3(q[20]) + q[21] + R32_4(q[22]) + + q[23] + R32_5(q[24]) + q[25] + R32_6(q[26]) + + q[27] + R32_7(q[28]) + S32_4(q[29]) + S32_5(q[30]); +} + +/* END of automatic generated code */ + diff --git a/bmw/f1_autogen_large.c b/bmw/f1_autogen_large.c new file mode 100644 index 0000000..75eff07 --- /dev/null +++ b/bmw/f1_autogen_large.c @@ -0,0 +1,200 @@ +/* BEGIN of automatic generated code */ + +static inline +void bmw_large_f1(uint64_t* q, const void* m, const void* h){ +/* expand_1( 0) */ + q[16] = + (( ROTL64(((uint64_t*)m)[ 0], 1) + + ROTL64(((uint64_t*)m)[ 3], 4) + - ROTL64(((uint64_t*)m)[10], 11) + + 0x5555555555555550ULL + )^ ((uint64_t*)h)[ 7] + ) + + S64_1(q[ 0]) + S64_2(q[ 1]) + S64_3(q[ 2]) + S64_0(q[ 3]) + + S64_1(q[ 4]) + S64_2(q[ 5]) + S64_3(q[ 6]) + S64_0(q[ 7]) + + S64_1(q[ 8]) + S64_2(q[ 9]) + S64_3(q[10]) + S64_0(q[11]) + + S64_1(q[12]) + S64_2(q[13]) + S64_3(q[14]) + S64_0(q[15]); +/* expand_1( 1) */ + q[17] = + (( ROTL64(((uint64_t*)m)[ 1], 2) + + ROTL64(((uint64_t*)m)[ 4], 5) + - ROTL64(((uint64_t*)m)[11], 12) + + 0x5aaaaaaaaaaaaaa5ULL + )^ ((uint64_t*)h)[ 8] + ) + + S64_1(q[ 1]) + S64_2(q[ 2]) + S64_3(q[ 3]) + S64_0(q[ 4]) + + S64_1(q[ 5]) + S64_2(q[ 6]) + S64_3(q[ 7]) + S64_0(q[ 8]) + + S64_1(q[ 9]) + S64_2(q[10]) + S64_3(q[11]) + S64_0(q[12]) + + S64_1(q[13]) + S64_2(q[14]) + S64_3(q[15]) + S64_0(q[16]); +/* expand_2( 2) */ + q[18] = + (( ROTL64(((uint64_t*)m)[ 2], 3) + + ROTL64(((uint64_t*)m)[ 5], 6) + - ROTL64(((uint64_t*)m)[12], 13) + + 0x5ffffffffffffffaULL + )^ ((uint64_t*)h)[ 9] + ) + + q[ 2] + R64_1(q[ 3]) + q[ 4] + R64_2(q[ 5]) + + q[ 6] + R64_3(q[ 7]) + q[ 8] + R64_4(q[ 9]) + + q[10] + R64_5(q[11]) + q[12] + R64_6(q[13]) + + q[14] + R64_7(q[15]) + S64_4(q[16]) + S64_5(q[17]); +/* expand_2( 3) */ + q[19] = + (( ROTL64(((uint64_t*)m)[ 3], 4) + + ROTL64(((uint64_t*)m)[ 6], 7) + - ROTL64(((uint64_t*)m)[13], 14) + + 0x655555555555554fULL + )^ ((uint64_t*)h)[10] + ) + + q[ 3] + R64_1(q[ 4]) + q[ 5] + R64_2(q[ 6]) + + q[ 7] + R64_3(q[ 8]) + q[ 9] + R64_4(q[10]) + + q[11] + R64_5(q[12]) + q[13] + R64_6(q[14]) + + q[15] + R64_7(q[16]) + S64_4(q[17]) + S64_5(q[18]); +/* expand_2( 4) */ + q[20] = + (( ROTL64(((uint64_t*)m)[ 4], 5) + + ROTL64(((uint64_t*)m)[ 7], 8) + - ROTL64(((uint64_t*)m)[14], 15) + + 0x6aaaaaaaaaaaaaa4ULL + )^ ((uint64_t*)h)[11] + ) + + q[ 4] + R64_1(q[ 5]) + q[ 6] + R64_2(q[ 7]) + + q[ 8] + R64_3(q[ 9]) + q[10] + R64_4(q[11]) + + q[12] + R64_5(q[13]) + q[14] + R64_6(q[15]) + + q[16] + R64_7(q[17]) + S64_4(q[18]) + S64_5(q[19]); +/* expand_2( 5) */ + q[21] = + (( ROTL64(((uint64_t*)m)[ 5], 6) + + ROTL64(((uint64_t*)m)[ 8], 9) + - ROTL64(((uint64_t*)m)[15], 16) + + 0x6ffffffffffffff9ULL + )^ ((uint64_t*)h)[12] + ) + + q[ 5] + R64_1(q[ 6]) + q[ 7] + R64_2(q[ 8]) + + q[ 9] + R64_3(q[10]) + q[11] + R64_4(q[12]) + + q[13] + R64_5(q[14]) + q[15] + R64_6(q[16]) + + q[17] + R64_7(q[18]) + S64_4(q[19]) + S64_5(q[20]); +/* expand_2( 6) */ + q[22] = + (( ROTL64(((uint64_t*)m)[ 6], 7) + + ROTL64(((uint64_t*)m)[ 9], 10) + - ROTL64(((uint64_t*)m)[ 0], 1) + + 0x755555555555554eULL + )^ ((uint64_t*)h)[13] + ) + + q[ 6] + R64_1(q[ 7]) + q[ 8] + R64_2(q[ 9]) + + q[10] + R64_3(q[11]) + q[12] + R64_4(q[13]) + + q[14] + R64_5(q[15]) + q[16] + R64_6(q[17]) + + q[18] + R64_7(q[19]) + S64_4(q[20]) + S64_5(q[21]); +/* expand_2( 7) */ + q[23] = + (( ROTL64(((uint64_t*)m)[ 7], 8) + + ROTL64(((uint64_t*)m)[10], 11) + - ROTL64(((uint64_t*)m)[ 1], 2) + + 0x7aaaaaaaaaaaaaa3ULL + )^ ((uint64_t*)h)[14] + ) + + q[ 7] + R64_1(q[ 8]) + q[ 9] + R64_2(q[10]) + + q[11] + R64_3(q[12]) + q[13] + R64_4(q[14]) + + q[15] + R64_5(q[16]) + q[17] + R64_6(q[18]) + + q[19] + R64_7(q[20]) + S64_4(q[21]) + S64_5(q[22]); +/* expand_2( 8) */ + q[24] = + (( ROTL64(((uint64_t*)m)[ 8], 9) + + ROTL64(((uint64_t*)m)[11], 12) + - ROTL64(((uint64_t*)m)[ 2], 3) + + 0x7ffffffffffffff8ULL + )^ ((uint64_t*)h)[15] + ) + + q[ 8] + R64_1(q[ 9]) + q[10] + R64_2(q[11]) + + q[12] + R64_3(q[13]) + q[14] + R64_4(q[15]) + + q[16] + R64_5(q[17]) + q[18] + R64_6(q[19]) + + q[20] + R64_7(q[21]) + S64_4(q[22]) + S64_5(q[23]); +/* expand_2( 9) */ + q[25] = + (( ROTL64(((uint64_t*)m)[ 9], 10) + + ROTL64(((uint64_t*)m)[12], 13) + - ROTL64(((uint64_t*)m)[ 3], 4) + + 0x855555555555554dULL + )^ ((uint64_t*)h)[ 0] + ) + + q[ 9] + R64_1(q[10]) + q[11] + R64_2(q[12]) + + q[13] + R64_3(q[14]) + q[15] + R64_4(q[16]) + + q[17] + R64_5(q[18]) + q[19] + R64_6(q[20]) + + q[21] + R64_7(q[22]) + S64_4(q[23]) + S64_5(q[24]); +/* expand_2(10) */ + q[26] = + (( ROTL64(((uint64_t*)m)[10], 11) + + ROTL64(((uint64_t*)m)[13], 14) + - ROTL64(((uint64_t*)m)[ 4], 5) + + 0x8aaaaaaaaaaaaaa2ULL + )^ ((uint64_t*)h)[ 1] + ) + + q[10] + R64_1(q[11]) + q[12] + R64_2(q[13]) + + q[14] + R64_3(q[15]) + q[16] + R64_4(q[17]) + + q[18] + R64_5(q[19]) + q[20] + R64_6(q[21]) + + q[22] + R64_7(q[23]) + S64_4(q[24]) + S64_5(q[25]); +/* expand_2(11) */ + q[27] = + (( ROTL64(((uint64_t*)m)[11], 12) + + ROTL64(((uint64_t*)m)[14], 15) + - ROTL64(((uint64_t*)m)[ 5], 6) + + 0x8ffffffffffffff7ULL + )^ ((uint64_t*)h)[ 2] + ) + + q[11] + R64_1(q[12]) + q[13] + R64_2(q[14]) + + q[15] + R64_3(q[16]) + q[17] + R64_4(q[18]) + + q[19] + R64_5(q[20]) + q[21] + R64_6(q[22]) + + q[23] + R64_7(q[24]) + S64_4(q[25]) + S64_5(q[26]); +/* expand_2(12) */ + q[28] = + (( ROTL64(((uint64_t*)m)[12], 13) + + ROTL64(((uint64_t*)m)[15], 16) + - ROTL64(((uint64_t*)m)[ 6], 7) + + 0x955555555555554cULL + )^ ((uint64_t*)h)[ 3] + ) + + q[12] + R64_1(q[13]) + q[14] + R64_2(q[15]) + + q[16] + R64_3(q[17]) + q[18] + R64_4(q[19]) + + q[20] + R64_5(q[21]) + q[22] + R64_6(q[23]) + + q[24] + R64_7(q[25]) + S64_4(q[26]) + S64_5(q[27]); +/* expand_2(13) */ + q[29] = + (( ROTL64(((uint64_t*)m)[13], 14) + + ROTL64(((uint64_t*)m)[ 0], 1) + - ROTL64(((uint64_t*)m)[ 7], 8) + + 0x9aaaaaaaaaaaaaa1ULL + )^ ((uint64_t*)h)[ 4] + ) + + q[13] + R64_1(q[14]) + q[15] + R64_2(q[16]) + + q[17] + R64_3(q[18]) + q[19] + R64_4(q[20]) + + q[21] + R64_5(q[22]) + q[23] + R64_6(q[24]) + + q[25] + R64_7(q[26]) + S64_4(q[27]) + S64_5(q[28]); +/* expand_2(14) */ + q[30] = + (( ROTL64(((uint64_t*)m)[14], 15) + + ROTL64(((uint64_t*)m)[ 1], 2) + - ROTL64(((uint64_t*)m)[ 8], 9) + + 0x9ffffffffffffff6ULL + )^ ((uint64_t*)h)[ 5] + ) + + q[14] + R64_1(q[15]) + q[16] + R64_2(q[17]) + + q[18] + R64_3(q[19]) + q[20] + R64_4(q[21]) + + q[22] + R64_5(q[23]) + q[24] + R64_6(q[25]) + + q[26] + R64_7(q[27]) + S64_4(q[28]) + S64_5(q[29]); +/* expand_2(15) */ + q[31] = + (( ROTL64(((uint64_t*)m)[15], 16) + + ROTL64(((uint64_t*)m)[ 2], 3) + - ROTL64(((uint64_t*)m)[ 9], 10) + + 0xa55555555555554bULL + )^ ((uint64_t*)h)[ 6] + ) + + q[15] + R64_1(q[16]) + q[17] + R64_2(q[18]) + + q[19] + R64_3(q[20]) + q[21] + R64_4(q[22]) + + q[23] + R64_5(q[24]) + q[25] + R64_6(q[26]) + + q[27] + R64_7(q[28]) + S64_4(q[29]) + S64_5(q[30]); +} + +/* END of automatic generated code */ + diff --git a/test_src/config.h b/test_src/config.h index 853f359..db1f16d 100644 --- a/test_src/config.h +++ b/test_src/config.h @@ -18,27 +18,10 @@ */ #ifndef __CONFIG_H__ #define __CONFIG_H__ -// #define F_CPU 20000000 -// #define F_CPU 16000000 /* oscillator-frequency in Hz */ -// #define F_CPU 14745600 -#define F_CPU 20000000 /* this is out of spec but lets try it */ -#define DEBUG_METHOD uart +#include "sysclock.h" -#include "uart_defines.h" - -#define UART0_I 1 -#define UART0_BAUD_RATE 115200 -#define UART0_PARATY UART_PARATY_NONE -#define UART0_STOPBITS UART_STOPBITS_ONE -#define UART0_DATABITS UART_DATABITS_8 -#define UART0_RXBUFFER_SIZE 120 -#define UART0_TXBUFFER_SIZE 120 -#define UART0_SWFLOWCTRL 1 -#define UART0_THRESH_LOW 0 -#define UART0_THRESH_HIGH 32 - -#define CLI_AUTO_HELP +#define SYS_FREQ SYS_FREQ_50MHZ000 #endif diff --git a/test_src/main-blake-test.c b/test_src/main-blake-test.c index 5ac3cad..7a6fc12 100644 --- a/test_src/main-blake-test.c +++ b/test_src/main-blake-test.c @@ -23,6 +23,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -153,7 +154,7 @@ cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-bmw-test.c b/test_src/main-bmw-test.c index c027d74..5134743 100644 --- a/test_src/main-bmw-test.c +++ b/test_src/main-bmw-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -169,7 +170,7 @@ cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_freq(SYS_FREQ_40MHZ000); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-cubehash-test.c b/test_src/main-cubehash-test.c index ef96612..e4e7ce7 100644 --- a/test_src/main-cubehash-test.c +++ b/test_src/main-cubehash-test.c @@ -23,6 +23,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -112,7 +113,7 @@ cmdlist_entry_t cmdlist[] = { int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-echo-test.c b/test_src/main-echo-test.c index 79476c9..a754c2f 100644 --- a/test_src/main-echo-test.c +++ b/test_src/main-echo-test.c @@ -23,6 +23,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -183,7 +184,7 @@ cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-groestl-test.c b/test_src/main-groestl-test.c index cc3b3f0..3ed2409 100644 --- a/test_src/main-groestl-test.c +++ b/test_src/main-groestl-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -156,7 +157,7 @@ cmdlist_entry_t cmdlist[] = { int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-keccak-test.c b/test_src/main-keccak-test.c index 7686855..f6ba4de 100644 --- a/test_src/main-keccak-test.c +++ b/test_src/main-keccak-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -109,7 +110,7 @@ cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-sha1-test.c b/test_src/main-sha1-test.c index e40a077..17e6709 100644 --- a/test_src/main-sha1-test.c +++ b/test_src/main-sha1-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -219,7 +220,7 @@ const cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-sha256-test.c b/test_src/main-sha256-test.c index 6b6f41e..872e071 100644 --- a/test_src/main-sha256-test.c +++ b/test_src/main-sha256-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -163,7 +164,7 @@ const cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-shabal-test.c b/test_src/main-shabal-test.c index 6e4b67b..27a524a 100644 --- a/test_src/main-shabal-test.c +++ b/test_src/main-shabal-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -227,7 +228,7 @@ cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0); diff --git a/test_src/main-skein-test.c b/test_src/main-skein-test.c index 7bc66e6..b52fd43 100644 --- a/test_src/main-skein-test.c +++ b/test_src/main-skein-test.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" #include "cli.h" #include "dump.h" #include "uart_lowlevel.h" @@ -283,7 +284,7 @@ cmdlist_entry_t cmdlist[] = { }; int main(void) { - sysclk_set_80MHz(); + sysclk_set_freq(SYS_FREQ); sysclk_mosc_verify_enable(); uart_init(UART_0, 115200, 8, UART_PARATY_NONE, UART_STOPBITS_ONE); gptm_set_timer_32periodic(TIMER0);