A deterministic unary sequence template, construction, storage and reuse method, and integrated circuit, electronic device
By constructing ordered and permutation-deterministic unary sequence templates in the storage array, the deterministic and low-correlation problem of threshold templates in random computation is solved, realizing efficient and stable unary bitstream generation and application.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI JIAOTONG UNIV
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies lack deterministic threshold templates that can be directly used within storage arrays in random computation, making it difficult to simultaneously satisfy both precise numerical mapping and low correlation under finite length. Furthermore, the overhead of template generation and deployment is too high, making it difficult to achieve reuse across batches after a single initialization.
A deterministic unary sequence template construction method is adopted. By forming static threshold rows in the storage array through ordered and permutation threshold templates, the accurate conversion from binary to unary sequence is achieved. Furthermore, the threshold position distribution is optimized by fixed permutation to reduce bit stream correlation.
It achieves deterministic, reusable, low-correlation unary bitstream generation, reduces conversion errors and correlations, improves system efficiency and stability, and is suitable for random computing and in-memory computing scenarios.
Smart Images

Figure CN122173053A_ABST
Abstract
Description
Technical Field
[0001] This disclosure pertains to the field of random computing, and particularly relates to a deterministic unary sequence generation and management, as well as a memory integrated circuit. Background Technology
[0002] In the field of randomized computation (SC), there are currently several technological evolutions in the generation and computation architecture of unary sequences. The following is an overview of each technological route.
[0003] Traditionally, random computation relies on random number sources or pseudo-random sequence generators (such as LFSRs) to convert binary numbers to unary bitstreams (B2S) using comparators, and then implements complex operators such as multiplication and addition through simple bitwise operations. This approach is simple to implement, but it is limited by variance and correlation issues due to the finite sequence length, often requiring a relatively long bitstream to achieve acceptable accuracy. Furthermore, the generation of the unary bitstream accounts for a significant portion of system resource consumption and latency overhead, constituting a major performance bottleneck.
[0004] To suppress random fluctuations and correlation errors in random computation, researchers introduced low-discrepancy (LD) sequences (Sobol / Halton) such as Halton and Sobol sequences as thresholds or sampling benchmarks to obtain more uniform distribution coverage, thereby improving the accuracy of multiplication operations with limited sequence length. Among them, Sobol sequences typically exhibit stable performance advantages when the sequence length is a power of 2.
[0005] In the framework of deterministic stochastic computation (SC), structured sequences can be used to achieve stochastic computation with precise or controllable errors. However, the sequence length increases rapidly with the required precision, which limits scalability. Subsequent research has reduced the cost of expansion to some extent by introducing downsampling techniques and error compensation mechanisms. In addition, some schemes have implemented reproducible unary computation, time-domain computation, and general matrix multiplication core operations through explicit correlation control or counting / time-domain mechanisms.
[0006] In-memory bitstream / probability stream generation is used in arrays such as resistive random access memory (RAM) and STT-MRAM. Existing solutions utilize the randomness of the device or fine-grained write control to generate probability / bitstreams or achieve precise multiplication within the memory array.
[0007] In the field of non-volatile memory, array architectures based on resistive random access memory and spin-torque magnetic random access memory can directly generate probability streams or bit streams within the memory array, or achieve precise multiplication operations, by utilizing the inherent random characteristics of the devices or fine-grained write control capabilities.
[0008] For dynamic random access memory (DRAM), mechanisms such as RowClone support row data copying and initialization at the subarray level with low data transport overhead. Ambit, TRA, and other technologies utilize multi-row charge sharing to implement bitwise primitives. Experimental studies show that by precisely controlling timing violation sequences, row copying and logical AND / OR operations can be implemented on commercial DRAM. Additionally, exploratory work has explored schemes to construct true random number generators using the weak write behavior of DRAM. Summary of the Invention
[0009] One aspect of this disclosure is a method for constructing, storing, and reusing a deterministic unary sequence template. The method writes a threshold set as template content into a memory array to form a first ordered threshold template with static threshold rows. This first ordered threshold template enables accurate binary-to-unary sequence conversion, where the ordered threshold template is a deterministic unary sequence template. The method then performs fixed positional permutations on the thresholds of the first ordered threshold template to optimize the threshold position distribution, obtaining a second ordered threshold template. This second ordered threshold template results in a more uniformly distributed distribution of valid bits in the unary sequence after binary-to-unary sequence conversion. This second ordered threshold template is a permuted deterministic unary sequence template.
[0010] In one aspect of this disclosure, an integrated circuit includes a deterministic unary sequence template constructed using the method described above.
[0011] One aspect of this disclosure is an electronic device that includes the integrated circuit described above.
[0012] One aspect of this disclosure is a deterministic unary sequence template, constructed using the method described above, for use in a stochastic computing system or an in-memory computing system.
[0013] This disclosure presents a method for constructing deterministic unary sequence templates. Through a predefined set of thresholds, it achieves a deterministic, one-to-one mapping between binary values and unary bitstream density, thereby avoiding uncertainties introduced by random or pseudo-random methods. A mechanism for rearranging bit positions while maintaining the numerical mapping is employed. By using fixed deterministic permutations, the positions of unary bits are rearranged to reduce local clustering and bitstream correlation under finite length conditions. This disclosure utilizes a static storage and reusability mechanism for unary sequence templates, storing and reusing unary sequences in template form to avoid redundant generation and improve system efficiency and stability. The aforementioned template construction, rearrangement, and reuse mechanisms are comprehensively applied in random computation. By combining these key technologies in random computation scenarios, high-precision, low-correlation unary bitstream generation can be achieved without relying on a random number generator. Attached Figure Description
[0014] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:
[0015] Figure 1 A schematic diagram of binary-to-random bitstream B2S conversion error under different bitstream lengths according to one embodiment of the present disclosure, wherein the data comes from 10,000 Monte Carlo simulations.
[0016] Figure 2 (a) Schematic diagram of random correlation (SCC) and (b) schematic diagram of random independence (ZCE) for different random number generator types under different bit stream lengths according to one of the embodiments of this disclosure.
[0017] Figure 3 (a) Schematic diagram of random multiplication error and (b) schematic diagram of random scaling addition error for different random number generator types under different bit stream lengths according to one of the embodiments of this disclosure.
[0018] Figure 4 An error result diagram of Sobel image edge detection according to one embodiment of this disclosure. Detailed Implementation
[0019] This disclosure examines existing technical solutions and finds the following problems in the construction, storage, and reusability of deterministic unary sequence templates:
[0020] (1) Random / pseudo-random schemes lack deterministic and reproducible correlation control, and errors and correlations are difficult to define under finite lengths. Among them, LFSR / random sources are prone to clustering and correlation artifacts under short bit streams, causing significant deviations in correlation-sensitive operators such as multiplication. Accuracy improvement usually depends on increasing the bit stream length, resulting in energy consumption and latency increasing nearly linearly with length.
[0021] (2) While sequences such as LD (Sobol / Halton) can improve the quality of finite length sequences, they typically rely on digital logic such as recursive updates, counters / Gray-code / XOR networks, and are not suitable for direct static template generation within the DRAM array. LD sequence generation often requires runtime recursion and direction / state updates. These mechanisms typically rely on periodic timing control and bit-by-bit update logic, and their hardware configuration is incompatible with DRAM row-level activation and fixed inductor / bit line behavior, making it difficult to achieve templated storage and direct reuse without altering the DRAM core array.
[0022] (3) Deterministic SC / unary-time-domain frameworks are feasible on the CMOS accelerator side, but they generally rely on bit-by-bit state checks, conditional emission, or time-domain accumulation mechanisms, making them difficult to map to in-DRAM memory-type threshold templates. Counting-type and time-domain / hybrid unary frameworks can achieve high precision and reproducibility in digital logic, but their core often includes: bit-by-bit update / traversal and conditional control; and runtime state machines / counters / accumulators. These characteristics are not favorable for DRAM row activation and the execution model of a single decision by the sensor amplifier, and therefore cannot be directly converted into a mechanism that pre-writes unary sequence templates into DRAM and reuses them repeatedly.
[0023] (4) Non-DRAM in-memory schemes rely on device characteristics (random switching, fine-grained writing, cell-level programmability). Under the row-granular access semantics of DRAM, memristor / STT-MRAM schemes can utilize device randomness or fine-grained write control to achieve in-memory bit streams or precise calculations. However, commodity DRAM is limited by row-granular activation, lacks cell-level programmable write control and fixed access semantics, making it difficult to reuse the above paths to construct controllable deterministic unary templates.
[0024] (5) While DRAM primitives such as RowClone / TRA provide row copying and bit operations, a deterministic threshold template system for B2S is still lacking, especially a template construction method that reduces correlation while maintaining numerical accuracy. RowClone provides efficient row transport and initialization capabilities, and Ambit / ComputeDRAM demonstrates the feasibility of implementing bit operations using charge sharing. However, these primitives are geared towards row-level data transport or Boolean logic and do not provide a threshold set template that can be directly used for B2S (ensuring numerical density / mapping accuracy), or a structured construction that suppresses multi-stream correlation under fixed template conditions. Therefore, existing DRAM primitives are still insufficient to support a complete closed-loop mechanism from the construction of deterministic unary sequence templates to storage to cross-batch multiplexing.
[0025] In summary, when this disclosure addresses the threshold sequence / template requirements for B2S (binary to unary bitstream) conversion in random computing (SC) and in-memory computing (PIM) scenarios, the following technical issues need to be addressed:
[0026] (1) Lack of deterministic threshold templates that can be used directly within the storage array.
[0027] Existing random / pseudo-random schemes cannot guarantee a consistent mapping between determinism and reusability, while low-dispersion (LD) sequences typically rely on recursive / state update logic, making it difficult to reside in the storage array as static templates for a long time and be directly reused.
[0028] (2) It is difficult to simultaneously satisfy both numerically accurate mapping and low correlation under finite length.
[0029] Simply using an ordered threshold can lead to the clustering of unary "1" positions, which increases the correlation when multiple bit streams interact, thus introducing correlation errors in operators such as multiplication.
[0030] (3) The cost of template generation and deployment is too high and difficult to amortize.
[0031] If the threshold sequence needs to be generated or frequently rewritten each time it runs, it will lead to significant write energy consumption and latency, reducing system-level benefits. Therefore, a closed-loop mechanism is needed that initializes the write once and reuses it across batches.
[0032] Therefore, this disclosure proposes a method for constructing a deterministic unary sequence threshold template (ADUS / SDUS), and provides its storage layout and cross-batch reuse process in a storage array. This enables a deterministic, reusable, and low-correlation threshold reference system without relying on recursive logic or bit-by-bit state updates. Here, ADUS stands for Ascending Deterministic Unary Sequence, which is an ordered deterministic unary sequence template (also known as an ascending deterministic unary sequence template), and SDUS stands for Shuffled Deterministic Unary Sequence, which is a permutation deterministic unary sequence template.
[0033] According to one or more embodiments, a method for constructing, storing and reusing deterministic unary sequence templates is provided. The core of this method is to use a threshold set as template content and write it into a storage array at once to form a static threshold row. The ordered threshold template ensures the accuracy of binary-to-unary sequence conversion. At the same time, the permutation threshold template optimizes the threshold position distribution without changing the threshold set, thereby reducing bitstream correlation under finite sequence length.
[0034] This disclosure defines two complementary threshold template structures. The first type is an ordered deterministic unary sequence template, which provides a strictly increasing set of thresholds, ensuring that any input operand obtains an accurate unary density representation and a precise numerical mapping relationship under the comparison rules. The second type is a permutation deterministic unary sequence template, which, while maintaining the same threshold set as the ordered template, performs fixed permutations on the positions of the thresholds in the sequence, making the positions of the effective bits in the numerical mapping result more evenly distributed. This reduces correlation during multi-bitstream interaction, and the effect is particularly significant in finite-length scenarios. Both types of templates employ a unified threshold comparison rule: for any bit position, the output unary bit is determined by the relationship between the input operand and the corresponding threshold term at that position.
[0035] For constructing ordered deterministic unary sequence templates, for an n-bit precision requirement, the length N of the unary sequence is defined as a power of 2. The template threshold set is constructed in a strictly increasing manner, with the threshold at each position equal to its position index. Under this construction, when the input operand is compared bit-by-bit with the template, the number of valid bits in the output bitstream is strictly equal to the value of the input operand, thereby achieving precise control and deterministic numerical mapping of the unary density, ensuring that the same input operand produces a completely consistent bitstream density at all times.
[0036] In this embodiment, a deterministic unary sequence template is constructed to overcome the problem of effective bits clustering at the beginning of the sequence due to the monotonically increasing structure of the ordered template. This template employs a fixed permutation strategy based on modulo operations, selecting integers coprime to the sequence length N as multipliers. The threshold for each position is defined as the product of the multiplier and the position index modulo N. Since the multiplier is coprime to N, this operation constitutes a bijection on the set of integers from zero to N minus one, ensuring that the permutation template and the ordered template have the exact same set of thresholds, only changing the positional arrangement of the thresholds. Under the same comparison rules, this template still guarantees that the number of effective bits in the output bitstream is strictly equal to the number of input operands, maintaining accurate numerical mapping. Simultaneously, the positions of the effective bits no longer form consecutive prefixes but are dispersed throughout the entire sequence length, thereby significantly improving the correlation performance between bitstreams under finite length conditions.
[0037] The parameters for the permutation template are selected offline, optimized from the candidate coprime set based on independence metrics such as sequence correlation coefficient or zero correlation intervals. This process only needs to be executed once. Once the parameters are determined, they remain fixed for all operands of the same sequence length, thus forming a static row template. No recursive calculations or dynamic updates are required during runtime, achieving zero runtime overhead.
[0038] According to one or more embodiments, a method for constructing, storing, and reusing deterministic unary sequence templates is provided. This method uses a threshold set as template content, forming static threshold rows by writing them once to a storage array; it ensures B2S mapping accuracy through ordered threshold templates (ADUS); and it improves the threshold position distribution without changing the threshold set through permuted threshold templates (SDUS), thereby reducing correlation at finite lengths.
[0039] This disclosure includes two complementary threshold templates, as shown in Table 1. The first type is ADUS (Ascending Deterministic Unary Sequence), which provides a strictly increasing set of thresholds, ensuring that any input operand M obtains an accurate unary density / accurate B2S mapping under the comparison rules. The second type is SDUS (Shuffled Deterministic Unary Sequence), which, while maintaining complete consistency of the threshold set, performs fixed permutations on the threshold positions, making the positions of "1" more evenly distributed, thereby reducing the correlation error in multi-bitstream operations when the bitstream length is limited.
[0040] In this embodiment of the disclosure, the threshold comparison rule for the deterministic unary sequence template is as follows: for any bit position i, the output unary bit is: , where T(i) comes from the threshold term of the ADUS or SDUS template. See the example in Table 1.
[0041] In the construction method of the ADUS template, to ensure accurate mapping, a univariate length N=2 is defined for n-bit precision. n The ADUS template threshold set is defined as follows (for example, Table 1(a)): for all i Let ADUS(i) = i, given the expression {0, 1, ..., N-1}. Using this ADUS template, the comparison rules... The output bitstream contains exactly M "1"s, ensuring that the number of "1"s is strictly equal to the unary density precision of M. The same M generates a completely consistent bitstream density each time, thus determining the accuracy of the corresponding B2S conversion. This is because in random computation, a random bitstream is represented by the number of "1"s divided by the total length. For example, "0011 1101" is "5 / 8".
[0042] To maintain accurate mapping and reduce correlation, and to overcome the "1" clustering problem caused by the monotonic structure of ADUS (see Table 1(a) which produces prefix clustering), this disclosure proposes a fixed permutation construction method for SDUS (see Table 1(b)). An integer a is chosen to satisfy... (Coprime to N), Define the permutation threshold: .in,
[0043] Since a and N are coprime, the above equation is a bijection over {0,1,…,N-1}. Therefore, SDUS and ADUS have the exact same threshold set (only rearranged). Under the same comparison rules... Under the same conditions, the number of "1"s in the output bitstream is still guaranteed to be M, meaning the B2S mapping remains precisely consistent; however, the positions of the "1"s no longer form a continuous prefix but are distributed across the entire length, thus being more conducive to reducing the correlation between bitstreams within a finite length. Regarding the improvement of correlation, such as... Figure 2 The SCC / ZCE experimental results shown are supported by two sub-figures, which are the SCC / ZCE experimental results respectively.
[0044] Therefore, a further parameter selection method is proposed to achieve offline operation once and zero runtime overhead: 'a' is selected from a set of coprime candidates by the offline process, and the evaluation index can be an independence measure such as SCC / ZCE; once determined, 'a' remains unchanged for all operands of the same N, and the SDUS template becomes a static row template, requiring no recursion / update at runtime.
[0045] Table 1
[0046]
[0047] Table 1 shows examples of DUS proposed in this disclosure with 4-bit precision (N=16). (a) Incremental DUS (ADUS), where each input value is represented by a monotonic unary prefix. (b) Shuffled DUS (SDUS), obtained by applying a full-cycle multiplicative permutation to ADUS, which uniformly distributes unary numbers while preserving the representation value. In Table 1,
[0048] DUS – Deterministic Unary Sequence
[0049] ADUS stands for Ascending Deterministic Unary Sequence.
[0050] SDUS — Shuffled Deterministic Unary Sequence.
[0051] Input Value — Input value
[0052] Represented Value — The value represented.
[0053] To evaluate the accuracy of the proposed deterministic unary sequence template in numerical mapping for binary-to-random bitstream (B2S) conversion, this disclosure systematically evaluates the B2S conversion error under different unary bitstream lengths. Specifically, by performing 10,000 Monte Carlo simulations on the input operands, the generated unary bitstream is reconstructed into numerical values and compared with the theoretical expected value, and the average error is statistically analyzed. Figure 1 As shown, experimental results demonstrate that the proposed method maintains stable and predictable B2S conversion errors at various bitstream lengths, and the error exhibits a consistent convergence trend as the bitstream length increases, verifying the effectiveness and stability of the deterministic threshold template used at the numerical mapping level.
[0054] To evaluate the impact of the proposed deterministic univariate sequence template on the correlation and independence of random computation under finite bitstream length conditions, this disclosure selects two commonly used metrics in random computation—random computation correlation (SCC) and zero correlation error (ZCE)—and compares and analyzes the performance of different types of random number generators under different bitstream lengths. For example... Figure 2 As shown, where Figure 2 (a) presents the results of SCC as a function of bitstream length. Figure 2 (b) The corresponding ZCE results are presented. Experimental results show that the proposed method exhibits a low and stable correlation level throughout the test range. Its SCC and ZCE values are comparable to those of low-discrepancy sequences and significantly better than those of random or pseudo-random sequences, indicating that the deterministic template has good independence characteristics among unary bitstreams of finite length.
[0055] To evaluate the numerical accuracy of the proposed deterministic unary sequence template in random arithmetic operations, this disclosure further compares and analyzes the computational errors of random multiplication and randomized scaling addition under different bitstream lengths. Random multiplication is implemented using standard bitwise logic operations, and randomized scaling addition is implemented using a multiplexed structure. Figure 3 As shown, Figure 3 (a) presents the results of random multiplication error as a function of bitstream length. Figure 3 (b) The corresponding results for the random scaling addition error are given. Experimental results show that the bitstream generated based on the deterministic unary sequence template of this disclosure can achieve stable and predictable error performance in both types of arithmetic operations. Its error level is comparable to that of low-discrepancy sequence methods and is significantly better than traditional random or pseudo-random methods, verifying the effectiveness of this technical solution at the level of random arithmetic operations.
[0056] To evaluate the numerical performance of this disclosure in practical operator-level applications, this disclosure uses the Sobel image edge detection operator as an example to compare and analyze the computation results generated by different random computation methods with those of accurate floating-point computation (Exact FPbaseline). Figure 4 The figure shows the comparison results of computational errors when using the Sobel edge detection operator for image processing. The floating-point accurate computation result is used as a reference value, and the output images obtained by each random computation method are compared pixel-by-pixel with this reference value, and the mean absolute error (MAE) is calculated. The figure shows the error magnitude of the proposed DUS method and existing random computation methods (Halton, Sobol, uGEMM, tubGEMM, Downscale, HTC) under the same task conditions, used to characterize the computational accuracy of the proposed method. The results show that the method using the deterministic univariate sequence template of this disclosure can effectively approximate the accurate floating-point computation result at the Sobel operator level, and its error level is comparable to advanced deterministic or low-difference random computation methods, indicating that the scheme has good applicability in practical image processing operators.
[0057] To further verify the stability and effectiveness of the proposed technical solution at the full application task level, this disclosure conducted task-level evaluations of various random computation methods under a unified configuration on the BSDS500 standard dataset. All methods used a 256-bit unary bitstream to eliminate the impact of bitstream length on the results. As shown in Table 2, the experiments compared the overall performance of the proposed DUS method with several contrasting methods in edge detection tasks. The evaluation results show that, under unified configuration conditions, the method using the deterministic unary sequence template of this disclosure can maintain a performance level comparable to state-of-the-art methods at the task level, verifying the feasibility and robustness of this technical solution in practical application scenarios. Table 2: Task-level evaluation results on the BSDS500 dataset; all methods were uniformly set to 256 bits.
[0058] Table 2
[0059]
[0060] The threshold set in the deterministic unary sequence template described in this embodiment is not limited to a strictly increasing sequence of natural numbers. It can also be any ordered or unordered threshold set that satisfies a one-to-one mapping relationship, as long as it ensures that a deterministic correspondence between the input value and the number of "1"s in the unary bit stream can be achieved under the binary comparison rule.
[0061] The permutation mechanism used to improve the uniformity of the univariate bit space distribution is not limited to full-cycle multiplication permutation based on modular arithmetic. Other deterministic permutation methods can also be used, such as table lookup mapping, cyclic shifting, segmented interleaving, or predefined index rearrangement, as long as the permutation achieves the redistribution of bit positions without changing the numerical mapping relationship.
[0062] The unary sequence templates disclosed herein can exist in a continuous storage manner, or they can be reused in a distributed storage, logical mapping, or multi-template sharing manner; the granularity of template reuse can be adjusted according to application requirements without affecting the technical effects of the deterministic unary representation and correlation suppression described herein.
[0063] The unary sequence template disclosed herein is not only applicable to random multiplication and random addition, but can also be extended to other arithmetic or logical operation scenarios based on unary representation. Such extended applications should be considered to fall within the protection scope of this disclosure.
[0064] Compared with existing technologies, the proposed method for constructing, storing, and reusing deterministic unary sequence templates has at least the following advantages:
[0065] (1) Achieve deterministic and predictable binary-to-unary bitstream (B2S) numerical mapping, significantly reducing conversion error.
[0066] This disclosure constructs a unary sequence template based on an ordered threshold set and a fixed permutation mechanism, ensuring that the number of "1"s in each unary bitstream strictly corresponds to the input binary value, thereby achieving a deterministic B2S mapping relationship. Experimental results (e.g.) Figure 1 As shown in the figure, under 10,000 Monte Carlo simulations, the proposed method exhibits stable and predictable B2S conversion error characteristics under different bitstream lengths, and the error shows a consistent convergence trend with increasing bitstream length. Therefore, this disclosure effectively avoids the density deviation problem caused by finite length in traditional random or pseudo-random methods, and improves the numerical reliability of B2S conversion.
[0067] (2) Effectively suppress the correlation between unary bit streams under finite bit stream length and improve the independence of random computation.
[0068] To address the common bitstream correlation problem in random computation, this disclosure reduces local clustering by performing a deterministic full-cycle permutation of the threshold set, thereby uniformly distributing unary bits temporally while maintaining complete consistency in numerical mapping. Experimental results show (e.g.) Figure 2As shown, the unary bitstream generated based on the method of this disclosure maintains low and stable levels in both random computation correlation (SCC) and zero correlation error (ZCE) across different bitstream lengths. Its performance is comparable to low-discrepancy sequence methods and significantly outperforms random or pseudo-random methods. This effect directly improves the numerical stability of multi-operand parallel operations in random computation.
[0069] (3) It achieves computational accuracy comparable to low-discrepancy sequences in random arithmetic operations, making it suitable for practical operators and task-level applications.
[0070] The bitstream generated based on the deterministic unary sequence template of this disclosure exhibits good numerical accuracy in basic random arithmetic operations such as random multiplication and random scaling addition. Figure 3 As shown, under different bitstream lengths, its average error level is comparable to that of low-difference sequence methods and is significantly better than traditional random or pseudo-random generation methods.
[0071] Furthermore, in the Sobel image edge detection operator and in task-level evaluations of the BSDS500 dataset (such as...), Figure 4 As shown in Table 2, the calculation results using the method of this disclosure can effectively approximate the accurate floating-point calculation benchmark, maintaining stable performance at both the operator and task levels. These results demonstrate that this disclosure not only has advantages in theoretical indicators but also exhibits good applicability and robustness in practical applications.
[0072] (4) A unary sequence template can be stored and reused as a static data structure, avoiding the overhead of repeated generation.
[0073] The unary sequence template disclosed herein exists in the form of a static threshold, and its content can be repeatedly invoked after generation without reconstruction, which helps to reduce the repetitive computation and storage overhead associated with bitstream generation in random computing systems. This characteristic makes this disclosure more suitable for application scenarios with high reusability requirements for unary representations.
[0074] It should be understood that in the embodiments of this disclosure, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0075] It is worth noting that although the foregoing has described the spirit and principles of this disclosure with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that the features in these aspects cannot be combined; such division is merely for the convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A method for constructing a deterministic univariate sequence template, characterized in that, A first ordered threshold template with static threshold rows is formed by writing the threshold set as template content into a memory array, so that the accurate conversion from binary to unary sequence can be achieved through the first ordered threshold template. The ordered threshold template is a deterministic unary sequence template.
2. The method according to claim 1, characterized in that, The threshold positions of the first ordered threshold template are fixed and permuted to optimize the threshold position distribution and obtain a second ordered threshold template. This makes the effective bits of the unary sequence after binary-to-unary sequence conversion more evenly distributed. The second ordered threshold template is a permutation deterministic unary sequence template.
3. The method according to claim 2, characterized in that, Let the length of the univariate sequence be N=2. n Where n is the number of bits of precision, the threshold set of the first ordered threshold template is constructed in an incremental manner, and the threshold of each position is equal to its position index value. When the input operand is compared bit by bit with the template, the number of valid bits in the output bit stream is equal to the value of the input operand.
4. The method according to claim 3, characterized in that, The first ordered threshold template is subjected to a fixed position permutation using modulo operation. An integer coprime to the sequence length N is selected as the multiplier. The threshold for each position is defined as the result of taking the product of the multiplier and the position index modulo N.
5. The method according to claim 1, characterized in that, The template can be stored in three ways: contiguous storage, distributed storage, or mapped storage.
6. A method for storing a deterministic univariate sequence template, characterized in that, Obtain the deterministic unary sequence template as described in claim 1, write the template into the memory array in the form of static threshold rows at once, and support multiple reads and reuse.
7. A method for reusing a deterministic univariate sequence template, characterized in that, In multiple binary-to-unary conversion operations, the deterministic unary sequence template as described in claim 1 is repeatedly invoked to achieve template reuse across batches.
8. An integrated circuit, characterized in that, This includes deterministic unary sequence templates constructed using the methods described in claims 1 to 5.
9. An electronic device, characterized in that, Including the integrated circuit as described in claim 8.
10. A deterministic univariate sequence template, characterized in that, The template is constructed using the method described in claim 1 and is used in random computing systems or in-memory computing systems.