Home
last modified time | relevance | path

Searched refs:seed (Results 1 – 25 of 47) sorted by relevance

12

/Zephyr-latest/lib/crc/
Dcrc16_sw.c9 uint16_t crc16(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len) in crc16() argument
11 uint16_t crc = seed; in crc16()
30 uint16_t crc16_reflect(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len) in crc16_reflect() argument
32 uint16_t crc = seed; in crc16_reflect()
52 uint16_t crc16_ccitt(uint16_t seed, const uint8_t *src, size_t len) in crc16_ccitt() argument
57 e = seed ^ *src; in crc16_ccitt()
60 seed = (seed >> 8) ^ ((uint16_t)f << 8) ^ ((uint16_t)f << 3) ^ ((uint16_t)f >> 4); in crc16_ccitt()
63 return seed; in crc16_ccitt()
66 uint16_t crc16_itu_t(uint16_t seed, const uint8_t *src, size_t len) in crc16_itu_t() argument
69 seed = (seed >> 8U) | (seed << 8U); in crc16_itu_t()
[all …]
Dcrc7_sw.c9 uint8_t crc7_be(uint8_t seed, const uint8_t *src, size_t len) in crc7_be() argument
12 uint8_t e = seed ^ *src++; in crc7_be()
15 seed = (f << 1) ^ (f << 4); in crc7_be()
18 return seed; in crc7_be()
Dcrc4_sw.c40 uint8_t crc4_ti(uint8_t seed, const uint8_t *src, size_t len) in crc4_ti() argument
47 index = seed ^ ((src[i] >> (4*(1-j))) & 0xf); in crc4_ti()
48 seed = (lookup[index >> 1] >> (1 - (index & 1)) * 4) & 0xf; in crc4_ti()
52 return seed; in crc4_ti()
Dcrc_shell.c76 uint32_t seed = 0; in cmd_crc() local
105 seed = (size_t)strtoul(optarg, NULL, 16); in cmd_crc()
106 if (seed == 0 && errno == EINVAL) { in cmd_crc()
143 shell_print(sh, "0x%x", crc_by_type(type, addr, size, seed, poly, reflect, first, last)); in cmd_crc()
/Zephyr-latest/include/zephyr/sys/
Dcrc.h93 uint16_t crc16(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len);
123 uint16_t crc16_reflect(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len);
173 uint16_t crc16_ccitt(uint16_t seed, const uint8_t *src, size_t len);
210 uint16_t crc16_itu_t(uint16_t seed, const uint8_t *src, size_t len);
306 uint8_t crc7_be(uint8_t seed, const uint8_t *src, size_t len);
321 uint8_t crc4_ti(uint8_t seed, const uint8_t *src, size_t len);
389 uint32_t seed, uint32_t poly, bool reflect, bool first, in crc_by_type() argument
394 return crc4(src, len, poly, seed, reflect); in crc_by_type()
396 return crc4_ti(seed, src, len); in crc_by_type()
398 return crc7_be(seed, src, len); in crc_by_type()
[all …]
/Zephyr-latest/lib/libc/minimal/source/stdlib/
Drand.c14 int rand_r(unsigned int *seed) in rand_r() argument
16 *seed = (MULTIPLIER * *seed + INCREMENT) & OUTPUT_BITS; in rand_r()
18 return *seed; in rand_r()
/Zephyr-latest/tests/subsys/lorawan/frag_decoder/src/
Dfrag_encoder.c36 static int32_t prbs23(int32_t seed) in prbs23() argument
38 int32_t b0 = seed & 1; in prbs23()
39 int32_t b1 = (seed & 32) / 32; in prbs23()
41 return (seed / 2) + ((b0 ^ b1) << 22); in prbs23()
/Zephyr-latest/drivers/entropy/
Dfake_entropy_native_bottom.c19 void entropy_native_seed(unsigned int seed, bool seed_random) in entropy_native_seed() argument
22 srandom(seed); in entropy_native_seed()
Dfake_entropy_native_sim.c34 static unsigned int seed = 0x5678; variable
84 entropy_native_seed(seed, seed_random); in entropy_native_sim_init()
116 .dest = (void *)&seed, in add_fake_entropy_option()
DKconfig.native_sim14 initialized with the same seed.
21 Apply a seed by default, even if the user does not request it through the command line.
22 Disabling this feature allows some other component to seed the host standard library random
Dentropy_mcux_rnga.c62 uint32_t seed = k_cycle_get_32(); in entropy_mcux_rnga_init() local
74 RNGA_Seed(RNG, seed); in entropy_mcux_rnga_init()
Dfake_entropy_native_bottom.h15 void entropy_native_seed(unsigned int seed, bool seed_random);
/Zephyr-latest/tests/subsys/ipc/ipc_sessions/remote/src/
Dremote.c32 unsigned int seed; member
210 ipc_rx_params.seed = cmd_rxstart->seed; in ep_recv()
221 ipc_tx_params.seed = cmd_txstart->seed; in ep_recv()
284 uint8_t expected = (uint8_t)rand_r(&ipc_rx_params.seed); in ep_recv()
420 LOG_INF("Initial seed: %u", ipc_tx_params.seed); in main()
431 cmd_data->data[n] = (uint8_t)rand_r(&ipc_tx_params.seed); in main()
/Zephyr-latest/scripts/native_simulator/common/src/
Dnsi_host_trampolines.c64 void nsi_host_srandom(unsigned int seed) in nsi_host_srandom() argument
66 srandom(seed); in nsi_host_srandom()
/Zephyr-latest/scripts/tests/twister_blackbox/
Dtest_device.py56 def test_seed(self, capfd, out_path, seed): argument
75 …eed_native_sim.dummy FAILED Failed \(rc=1\) \(native (\d+\.\d+)s/seed: {} <host>\)'.format(seed[0])
Dtest_shuffle.py53 def test_shuffle_tests(self, out_path, seed, ratio, expected_order): argument
57 ['--shuffle-tests', '--shuffle-tests-seed', seed] + \
/Zephyr-latest/lib/libc/minimal/include/
Dstdlib.h55 int rand_r(unsigned int *seed);
57 void srand(unsigned int seed);
/Zephyr-latest/tests/subsys/ipc/ipc_sessions/src/
Dmain.c312 .seed = SEED_TXSTART_VALUE }; in ZTEST()
315 unsigned int seed = SEED_TXSTART_VALUE; in ZTEST() local
347 cmd_txdata.data[n] = (uint8_t)rand_r(&seed); in ZTEST()
378 unsigned int seed; member
393 uint8_t expected = (uint8_t)rand_r(&test_rx_long_data.seed); in test_rx_long_rec_cb()
419 .seed = SEED_RXSTART_VALUE }; in ZTEST()
428 test_rx_long_data.seed = SEED_RXSTART_VALUE; in ZTEST()
/Zephyr-latest/scripts/native_simulator/common/src/include/
Dnsi_host_trampolines.h37 void nsi_host_srandom(unsigned int seed);
/Zephyr-latest/tests/subsys/ipc/ipc_sessions/common/
Dtest_commands.h61 uint32_t seed; member
/Zephyr-latest/samples/modules/tflite-micro/magic_wand/train/
Ddata_split_person.py43 random.seed(30)
Ddata_split.py67 random.seed(30)
/Zephyr-latest/include/zephyr/drivers/
Dw1.h706 static inline uint16_t w1_crc16(const uint16_t seed, const uint8_t *src, in w1_crc16() argument
709 return crc16_reflect(W1_CRC16_POLYNOMIAL, seed, src, len); in w1_crc16()
/Zephyr-latest/subsys/random/
DKconfig73 the entropy driver as a seed source. This is a fast general-purpose
127 shall use the entropy API for an initialization seed. The CTR-DRBG
142 default "zephyr ctr-drbg seed"
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_sar.c176 static void array_random_fill(uint8_t array[], uint16_t len, int seed) in array_random_fill() argument
179 srand(seed); in array_random_fill()

12