Parity bit generation circuit and binary counter
The parity bit generation circuit in binary counters is optimized to reduce size by generating parity bits based on bit patterns, achieving a smaller circuit area without compromising error detection.
Patent Information
- Application Number
- JP2023022630
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-16
- Publication Date
- 2024-08-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing parity bit generation circuits in binary counters are large in size, necessitating a reduction in circuit size without compromising functionality.
A parity bit generation circuit that generates parity bits based on the total number of bits with a value of 1, updating the parity bit value in conjunction with the count value update, using a combination of flip-flops and logic circuits to determine parity changes based on specific bit patterns.
The proposed solution allows for the generation of parity bits with a smaller circuit area, reducing the overall size of the binary counter while maintaining error detection capabilities.
Smart Images

Figure 2024116820000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a parity bit generation circuit and a binary counter. [Background technology]
[0002] In a binary counter, a parity bit may be generated for error detection or the like. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 11-031084 Summary of the Invention [Problem to be solved by the invention]
[0004] The circuit for generating the parity bits should be made as small in size as possible.
[0005] An object of the present disclosure is to provide a parity bit generation circuit and a binary counter that are capable of generating a parity bit in a small size. [Means for solving the problem]
[0006] The parity bit generation circuit of the present disclosure is a parity bit generation circuit that generates a parity bit of a binary counter that updates a count value by a count-up process or a count-down process, wherein the value of the parity bit represents the evenness of the total number of bits having a value of 1 among all bits of the count value, and determines the value of the parity bit after the count value is updated based on the value of the parity bit before the count value is updated and the values of each bit of the count value before the count value is updated. Effect of the Invention
[0007] According to the present disclosure, it is possible to provide a parity bit generation circuit and a binary counter that are small in size and capable of generating a parity bit. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is an overall configuration diagram of a binary counter according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a diagram showing a bit arrangement of a count value counted by a binary counter according to an embodiment of the present disclosure. [Diagram 3] FIG. 3 is a diagram showing input / output values of N flip-flops according to an embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram showing how the count value, the parity value, and the calculation value are updated sequentially according to an embodiment of the present disclosure. [Diagram 5] FIG. 5 is a configuration diagram of a parity bit generation circuit according to an embodiment of the present disclosure. [Figure 6] FIG. 6 is a diagram showing the relationship between the count value and the parity value in each of four cases according to an embodiment of the present disclosure. [Figure 7] FIG. 7 is a diagram for explaining change / non-change of evenness related to a parity bit in an up counter according to the first embodiment of the present disclosure. [Figure 8] FIG. 8 is a configuration diagram for generating parity bits according to an example EX1_1 belonging to the first embodiment of the present disclosure. [Figure 9] FIG. 9 is a configuration diagram for generating parity bits according to an example EX1_2 belonging to the first embodiment of the present disclosure. [Figure 10] FIG. 10 is a diagram showing a parity bit generating circuit according to a reference configuration. [Figure 11] FIG. 11 is a diagram comparing the circuit area of the parity bit generation circuit between the reference configuration and the configuration of the first embodiment. [Figure 12] FIG. 12 is a configuration diagram for generating parity bits according to an example EX1_3 belonging to the first embodiment of the present disclosure. [Figure 13] FIG. 13 is a configuration diagram for generating parity bits according to an example EX1_3 belonging to the first embodiment of the present disclosure. [Figure 14] FIG. 14 is a configuration diagram for generating parity bits according to an example EX1_4 belonging to the first embodiment of the present disclosure. [Figure 15] FIG. 15 is a configuration diagram for generating parity bits according to example EX1_4 belonging to the first embodiment of the present disclosure. [Figure 16] FIG. 16 relates to an example EX1_5 belonging to the first embodiment of the present disclosure, and is a modified diagram of a part of the circuit in FIG. [Figure 17] FIG. 17 relates to an example EX1_5 belonging to the first embodiment of the present disclosure, and is a modified diagram of a part of the circuit in FIG. [Figure 18] FIG. 18 is a diagram for explaining change / non-change of evenness related to a parity bit in a down counter according to the second embodiment of the present disclosure. [Figure 19] FIG. 19 is a configuration diagram for generating parity bits according to an example EX2_1 belonging to the second embodiment of the present disclosure. [Figure 20] FIG. 20 is a configuration diagram for generating parity bits according to an example EX2_2 belonging to the second embodiment of the present disclosure. [Figure 21] FIG. 21 is a configuration diagram for generating parity bits according to an example EX2_3 belonging to the second embodiment of the present disclosure. [Figure 22] FIG. 22 is a configuration diagram for generating parity bits according to an example EX2_3 belonging to the second embodiment of the present disclosure. [Figure 23] FIG. 23 is a configuration diagram for generating parity bits according to example EX2_4 belonging to the second embodiment of the present disclosure. [Figure 24] FIG. 24 is a configuration diagram for generating parity bits according to example EX2_4 belonging to the second embodiment of the present disclosure. [Diagram 25]FIG. 25 is a configuration diagram for generating parity bits according to an example EX3_1 belonging to the third embodiment of the present disclosure. [Figure 26] FIG. 26 is a configuration diagram for generating parity bits according to example EX3_2 belonging to the third embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, examples of embodiments of the present disclosure will be specifically described with reference to the drawings. In each of the drawings, the same parts are given the same reference numerals, and duplicated descriptions of the same parts are generally omitted. In this specification, for the sake of simplicity, by writing a symbol or code referring to information, signal, physical quantity, functional part, circuit, element, or part, the name of the information, signal, physical quantity, functional part, circuit, element, or part corresponding to the symbol or code may be omitted or abbreviated.
[0010] FIG. 1 shows an overall configuration of a binary counter 1 according to an embodiment of the present disclosure. The binary counter 1 can be formed by a semiconductor integrated circuit. The binary counter 1 is a binary counter with parity, and includes a count circuit 2 and a parity bit generation circuit 6. The count circuit 2 includes a holding circuit 3 and a processing circuit 4. The holding circuit 3 includes N flip-flops 5. The parity bit generation circuit 6 includes a parity calculation circuit 7 and a flip-flop 8. The flip-flops may be abbreviated as FF hereinafter. N represents any integer equal to or greater than 2.
[0011] The count circuit 2 counts an N-bit value. The value counted by the count circuit 2 is called a count value and is represented by the symbol "CV." The count value CV is an N-bit value. Therefore, the count value CV is equal to or greater than 0 and is equal to or less than (2 N -1) Has an integer value in the following range:
[0012] Referring to FIG. 2, the count value CV is expressed by the stored value of a storage circuit for N bits. The storage circuit for N bits is a storage circuit for bits b[0] to b[N-1]. Each of the bits b[0] to b[N-1] stores a binary value. The binary value is either 0 or 1. The binary value stored in the bit b[i] is represented by the symbol "D[i]", which is the initial letter "D" of the word "Data". i represents any integer. For any integer i, the bit b[i+1] is assumed to be a bit on the higher side than the bit b[i]. Therefore, among the bits b[0] to b[N-1], the bit b[0] is the least significant bit, and the bit b[N-1] is the most significant bit. The N FFs 5 in the holding circuit 3 correspond to the storage circuit for N bits.
[0013] 3, in the following, when the N FFs 5 in the holding circuit 3 are to be distinguished from one another, the N FFs 5 are referred to as FFs 5[0] to 5[N-1]. FFs 5[i] store and hold a binary value D[i], and output the held binary value D[i]. Therefore, the binary values D[0] to D[N-1] are output from the holding circuit 3.
[0014] The output values D[0] to D[N-1] of the holding circuit 3 (hence the count value CV) are output to a desired external circuit (not shown) and are also output to a processing circuit 4. The processing circuit 4 is a combinational circuit that generates an input value IV corresponding to the count value CV based on the count value CV. The input value IV is an N-bit value like the count value CV, and is expressed in detail by binary values E[0] to E[N-1]. Of the binary values E[0] to E[N-1], the binary value E[i+1] is the value of the bits on the higher side than the binary value E[i]. The count value CV and the input value IV are expressed by the following formulas (1) and (2).
[0015]
number
[0016] The signal CLK is a square wave signal that alternates between a low level and a high level. In any signal or voltage of interest, a transition from a low level to a high level is called an up edge, and a transition from a high level to a low level is called a down edge. An up edge may be read as a rising edge. A down edge may be read as a falling edge.
[0017] The signal CLK is an input signal to the binary counter 1. The signal CLK is input to the binary counter 1 from a signal supply circuit (not shown) provided outside the binary counter 1. The count circuit 2 updates the count value CV in synchronization with the input signal CLK. Here, the count value CV is updated at the rising edge of the signal CLK. As a modification, the count value CV may be updated at the falling edge of the signal CLK. The binary values E[0] to E[N-1] output from the processing circuit 4 are input to FF5[0] to 5[N-1], respectively. Each of FF5[0] to 5[N-1] takes in the binary value input to itself at the rising edge of the signal CLK, and updates its own stored value with the taken-in value. Therefore, FF5[i] takes in the binary value E[i] input to itself at the rising edge of the signal CLK, and updates its own stored value D[i] with the taken-in value (E[i]).
[0018] The processing circuit 4 can perform a count-up process to increment the count value CV by 1. In this case, the processing circuit 4 generates an input value IV based on the count value CV so that "IV=CV+1" is established. Therefore, when the count-up process is performed by the processing circuit 4, the count value CV is incremented by 1 each time an up edge of the signal CLK occurs. However, in the case where "CV=2 N When "CV=2 -1" holds (i.e., all bits b[0] to b[N-1] have a value of 1), the processing circuit 4 involved in the count-up process generates an input value IV that holds "IV=0" by overflow processing (i.e., sets all binary values E[0] to E[N-1] to 0). Therefore, when the processing circuit 4 performs the count-up process,N When a rising edge occurs in the signal CLK while the condition "-1" is satisfied, the count value CV is (2 N The count value CV changes from -1 to the minimum value that the count value CV can take (i.e. 0).
[0019] The processing circuit 4 can perform countdown processing to decrement the count value CV by 1. In this case, the processing circuit 4 generates an input value IV based on the count value CV so that "IV=CV-1" holds. Therefore, when the countdown processing is performed by the processing circuit 4, the count value CV is decremented by 1 each time a rising edge of the signal CLK occurs. However, when "CV=0" holds (i.e., when all bits b[0] to b[N-1] have a value of 0), the processing circuit 4 involved in the countdown processing decrements the count value CV by 1 due to underflow processing. N Therefore, when the processing circuit 4 performs a countdown process, if a rising edge occurs in the signal CLK in a state where "CV=0" is true, the count value CV is incremented from 0 to the maximum value that the count value CV can take (i.e., 2 N -1).
[0020] The parity bit generation circuit 6 generates a parity bit for the binary counter 1. The binary value represented by the parity bit is called a parity value and is referred to by the symbol "PRT." Generating the parity bit for the binary counter 1 is equivalent to deriving the parity value PRT. The parity value PRT can be used to perform error detection and the like regarding the contents stored in the holding circuit 3.
[0021] The parity value PRT, which is the value of the parity bit, represents the evenness of the total number of bits having a value of 1 among the bits b[0] to b[N-1]. Hereinafter, for convenience of explanation, the total number of bits having a value of 1 among the bits b[0] to b[N-1] will be referred to as the target number and referred to by the symbol "TG". The parity value PRT represents the evenness of the target number TG, that is, whether the target number TG is an even number or an odd number. The parity bit generation circuit 6 sets the parity value PRT to 0 when the target number TG is an even number, and sets the parity value PRT to 1 when the target number TG is an odd number. Therefore, a parity value PRT of "0" indicates that the target number TG is an even number, and a parity value PRT of "1" indicates that the target number TG is an odd number.
[0022] For example, if the binary values D[0] to D[3] are 1 and the binary values D[4] to D[N-1] are 0, then "TG=4". In this case, the parity bit generation circuit 6 sets the parity value PRT to 0. Alternatively, for example, if the binary values D[0] to D[3] and D[N-1] are 1 and the binary values D[4] to D[N-2] are 0, then "TG=5". In this case, the parity bit generation circuit 6 sets the parity value PRT to 1.
[0023] The binary values D[0] to D[N-1] output from the holding circuit 3 are input to the parity calculation circuit 7. In addition, the parity value PRT output from the parity bit generation circuit 6 is fed back and input to the parity calculation circuit 7. The parity calculation circuit 7 generates and outputs the calculation value NEXT based on the binary values D[0] to D[N-1] and the parity value PRT. The calculation value NEXT is input to FF8. FF8 takes in the input value (hence the calculation value NEXT) at the rising edge of the signal CLK, and updates its own stored value with the taken-in value. FF8 outputs its own stored value as the parity value PRT. In this way, the parity value PRT is updated at each rising edge of the signal CLK. The calculation value NEXT indicates the value to be substituted for the parity value PRT at the next update.
[0024] Refer to FIG. 4. Assume that the i-th rising edge occurs in the signal CLK at time t1, and then the (i+1)-th rising edge occurs in the signal CLK at time t2. Focusing on time t2, an outline of a method for generating a parity bit by the parity bit generation circuit 6 will be described. The count value CV is updated at each of times t1 and t2, and the parity value PRT is updated at each of times t1 and t2. However, the parity value PRT may not change before and after the update.
[0025] The count value CV immediately after time t1 is referred to as the count value CV_t1, and the count value CV immediately after time t2 is referred to as the count value CV_t2. That is, the count value CV is updated from the count value CV_t1 to the count value CV_t2 at the rising edge of the signal CLK at time t2. The parity value PRT immediately after time t1 is referred to as the parity value PRT_t1, and the parity value PRT immediately after time t2 is referred to as the parity value PRT_t2. That is, the parity value PRT is updated from the parity value PRT_t1 to the parity value PRT_t2 at the rising edge of the signal CLK at time t2.
[0026] The calculated value NEXT is updated in conjunction with updates of the count value CV and the parity value PRT. The calculated value NEXT immediately after time t1 is referred to as the calculated value NEXT_t1, and the calculated value NEXT immediately after time t2 is referred to as the calculated value NEXT_t2. The calculated value NEXT_t1 is the calculated value NEXT determined based on the count value CV_t1 and the parity value PRT_t1. The calculated value NEXT_t2 is the calculated value NEXT determined based on the count value CV_t2 and the parity value PRT_t2.
[0027] That is, during the period between times t1 and t2, the parity calculation circuit 7 derives the calculation value NEXT_t1 based on the count value CV_t1 during that period and the parity value PRT_t1 during that period. Then, at the rising edge of the signal CLK at time t2, the calculation value NEXT_t1 is set to the parity value PRT_t2 by the FF8, and thereafter, "PRT_t2=NEXT_t1" is satisfied until the next rising edge occurs in the signal CLK.
[0028] For the sake of concrete explanation, the following focuses on the update of the count value CV at time t2. When focusing on the update of the count value CV at time t2, the count value CV before the update is the count value CV_t1, the count value CV after the update is the count value CV_t2, the parity value PRT before the update of the count value CV is the parity value PRT_t1, and the parity value PRT after the update of the count value CV is the parity value PRT_t2.
[0029] The parity bit generation circuit 6 determines the parity value after the count value CV is updated (i.e., PRT_t2) based on the parity value before the count value CV is updated (i.e., PRT_t1) and the values of bits b[0] to b[N-1] before the count value CV is updated (i.e., CV_t1).
[0030] As shown in FIG. 5, the parity calculation circuit 7 includes a judgment circuit 11 and a decision circuit 12. The judgment circuit 11 judges whether the count value CV before the update corresponds to a predetermined first numerical pattern or a predetermined second numerical pattern based on the count value CV before the update (CV_t1). A signal indicating the judgment result by the judgment circuit 11 is supplied to the decision circuit 12. The decision circuit 12 determines the parity value PRT (PRT_t2) after the count value CV is updated based on the parity value PRT (PRT_t1) before the count value CV is updated and the judgment result of the judgment circuit 11, and outputs the determined value as the calculation value NEXT (NEXT_t1). As a result, when the next up edge of the signal CLK occurs, the parity value PRT is updated by the determined value (NEXT_t1) by the decision circuit 12. That is, when the count value CV is updated, the decision circuit 12 can update the parity value PRT by its own determined value (NEXT_t1) in cooperation with the FF8. The parity value PRT output from the FF8 is fed back to the decision circuit 12.
[0031] The first numerical pattern is a pattern that changes the parity of the target number TG, and the second numerical pattern is a pattern that does not change the parity of the target number TG. That is, when the count value CV (CV_t1) before the update corresponds to the first numerical pattern and the count value CV is updated, the parity of the target number TG changes. On the other hand, when the count value CV (CV_t1) before the update corresponds to the second numerical pattern and the count value CV is updated, the parity of the target number TG remains unchanged.
[0032] Therefore (see FIG. 6), in the first case where “PRT_t1=0” and the count value CV_t1 corresponds to the first numerical pattern, when the count value CV is updated from the count value CV_t1 to the count value CV_t2, the decision circuit 12 changes the parity value PRT from “0” to “1” in conjunction with the update of the count value CV (i.e., sets “PRT_t2=1”). In addition, in the second case where "PRT_t1=1" and the count value CV_t1 corresponds to the first numerical pattern, when the count value CV is updated from the count value CV_t1 to the count value CV_t2, the decision circuit 12 changes the parity value PRT from "1" to "0" in conjunction with the update of the count value CV (i.e., sets "PRT_t2=0"). In addition, in a third case where “PRT_t1=0” and the count value CV_t1 corresponds to the second numerical pattern, when the count value CV is updated from the count value CV_t1 to the count value CV_t2, the decision circuit 12 maintains the parity value PRT at “0” before and after the update of the count value CV (i.e., sets it to “PRT_t2=0”). In addition, in the fourth case where "PRT_t1=1" and the count value CV_t1 corresponds to the second numerical pattern, when the count value CV is updated from the count value CV_t1 to the count value CV_t2, the decision circuit 12 maintains the parity value PRT at "1" before and after the update of the count value CV (i.e., sets it to "PRT_t2=1").
[0033] The initial value of the parity value PRT is determined depending on the binary values D[0] to D[N-1] in the initial state of the binary counter 1. Since the binary values D[0] to D[N-1] in the initial state are determined, the initial value of the parity value PRT (i.e., the parity value PRT in the initial state) may be determined according to the binary values D[0] to D[N-1] in the initial state. For example, if the binary values D[0] to D[N-1] are all 0 in the initial state of the binary counter 1, the parity value PRT in the initial state of the binary counter 1 has an initial value of "0". Also, for example, if N is an even number, and the binary values D[0] to D[N-1] are all 1 in the initial state of the binary counter 1, the parity value PRT in the initial state of the binary counter 1 has an initial value of "0". Alternatively, for example, when N is an odd number, if the binary values D[0] to D[N-1] are all 1 in the initial state of the binary counter 1, the parity value PRT in the initial state of the binary counter 1 has an initial value of "1".
[0034] Hereinafter, first to third embodiments related to the binary counter 1 will be described. The above matters are applied to the following first to third embodiments unless otherwise specified and unless there is a contradiction. In the first to third embodiments, if there are matters that contradict the above matters, the descriptions in the first to third embodiments may take precedence. Furthermore, unless there is a contradiction, matters described in any of the first to third embodiments shown below can also be applied to any other embodiment.
[0035] <<First embodiment>> A first embodiment will be described. A processing circuit 4 according to the first embodiment performs count-up processing. Therefore, a binary counter 1 according to the first embodiment is an N-bit up counter that increments a count value CV by 1 through count-up processing. In an N-bit up counter, there is a rule as to whether the parity of a target number TG (the total number of bits having a value of 1 among bits b[0] to b[N-1]) changes with an update of the count value CV.
[0036] 7, a situation where the parity of the target number TG changes and a situation where it does not change in an N-bit up counter will be described. Hereinafter, bits b[0] to b[N-1] constituting the count value CV will be collectively referred to as a bit string (the same applies to other embodiments described later).
[0037] In the bit string of the count value CV before updating, if the least significant bit b[0] has a value of 0, the even number of consecutive bits b[0] to b[2k A +1] has a value of 1 and the most significant bit b[2k A A predetermined condition Cu1 is satisfied when N is an odd number and all bits b[0] to b[N-1] have a value of 0, or when N is an odd number and all bits b[0] to b[N-1] have a value of 1. In other cases, the condition Cu1 is not satisfied. When the condition Cu1 is satisfied, the evenness of the target number TG changes with the update of the count value CV. When the evenness of the target number TG changes, the target number TG changes from an even number to an odd number, or from an odd number to an even number. Note that k A is “2k Arepresents an integer greater than or equal to 0 and any integer that satisfies "+2 < N".
[0038] When the bit sequence of the count value CV before update satisfies the condition Cu1, the count value CV before update corresponds to the first numerical pattern described above. Therefore, the determination circuit 11 (see FIG. 5) can determine whether the count value CV before update corresponds to the first numerical pattern based on whether the bit sequence of the count value CV before update satisfies the condition Cu1. When the bit sequence of the count value CV before update satisfies the condition Cu1, the determination circuit 11 determines that the count value CV before update corresponds to the first numerical pattern. The method for updating the parity value PRT when the first numerical pattern is applicable is as described above (see FIG. 6).
[0039] For example, if "D[0]=0" in the bit sequence of the count value CV before update, then when the count value CV is updated, it changes to "D[0]=1", so the parity of the target number TG changes. Also, for example, the case where "(D[2], D[1], D[0])=(0, 1, 1)" in the bit sequence of the count value CV before update is a case where an even number of consecutive bits (b[1] and b[0]) from the least significant bit b[0] have a value of 1, and the immediately higher bit (b[2]) of the even number of bits has a value of 0. In this case, when the count value CV is updated, the number of 1s in bits b[2]~b[0] changes from 2 to 1, so the parity of the target number TG changes. Also, when N is odd and all bits b[0]~b[N - 1] have a value of 1 in the bit sequence of the count value CV before update, when the count value CV is updated, the target number TG changes from an odd number (N) to an even number (0) through an overflow process, so the parity of the target number TG changes.
[0040] In the bit sequence of the count value CV before update, an odd number of consecutive bits b[0]~b[2k B have a value of 1 and the immediately higher bit b[2k BWhen [+1] has a value of 0, or when N is even and all bits b[0] to b[N - 1] have a value of 1, a predetermined condition Cu2 is satisfied. In other cases, condition Cu2 is not satisfied. When condition Cu2 is satisfied, the parity of the target number TG does not change with the update of the count value CV, that is, the parity of the target number TG remains unchanged before and after the update of the count value CV. Note that k B represents an integer greater than or equal to 0 and arbitrary that satisfies “2k B +1 < N”.
[0041] When the bit sequence of the count value CV before update satisfies condition Cu2, the count value CV before update corresponds to the second numerical pattern described above. Therefore, the determination circuit 11 (see FIG. 5) can determine whether the count value CV before update corresponds to the second numerical pattern based on whether the bit sequence of the count value CV before update satisfies condition Cu2. When the bit sequence of the count value CV before update satisfies condition Cu2, the determination circuit 11 determines that the count value CV before update corresponds to the second numerical pattern. The method for updating the parity value PRT when the second numerical pattern is applicable is as described above (see FIG. 6).
[0042] For example, in the case where “(D[3], D[2], D[1], b[0]) = (0, 1, 1, 1)” in the bit sequence of the count value CV before update, an odd number of consecutive bits (b[2] to b[0]) starting from the least significant bit b[0] have a value of 1, and the immediate higher bit (b[3]) of the odd number of bits has a value of 0. In this case, the number of 1s in bits b[3] to b[0] changes from 3 to 1 due to the update of the count value CV, but at this time the parity of the target number TG does not change. Also, when N is even and all bits b[0] to b[N - 1] have a value of 1 in the bit sequence of the count value CV before update, the target number TG changes from N to 0 through overflow processing due to the update of the count value CV, but since both N and 0 are even, the parity of the target number TG does not change.
[0043] The first embodiment includes the following Examples EX1_1 to EX1_5. The matters described above in the first embodiment are applied to the following Examples EX1_1 to EX1_5 unless otherwise specified and unless there is a contradiction. However, in each example, for matters that contradict the matters described above in the first embodiment, the description in each example may take precedence. Furthermore, unless there is a contradiction, matters described in any of Examples EX1_1 to EX1_5 can also be applied to any other example (i.e., any two or more of the multiple examples can be combined).
[0044] [Example EX1_1] An example EX1_1 will be described. In the example EX1_1, it is assumed that the binary counter 1 is an 8-bit up counter (that is, "N=8").
[0045] 8 shows a decision circuit 110 and a decision circuit 120 according to the embodiment EX1_1. In the embodiment EX1_1, the decision circuit 110 and the decision circuit 120 can be used as the decision circuit 11 and the decision circuit 12 in FIG.
[0046] The determination circuit 110 includes element determination circuits 111a to 111i and OR circuits 112 and 113. The element determination circuits 111a to 111i generate and output signals a1 to i1 based on the current count value CV (D[0] to D[N-1]), respectively. The current count value CV corresponds to the count value CV before updating. The signals a1 to i1 are each a binary signal having a value of 0 or 1 (the same applies to signals A1 to G1 described later). In FIG. 8 and other figures described later, D[j:0] represents a j-bit value combining D[j] to D[0] (where j is an integer equal to or greater than 1).
[0047] The circuit 111a outputs the signal a1 of "1" only when "D[0]=0" holds, and outputs the signal a1 of "0" in other cases. The circuit 111b outputs a signal b1 of "1" only when "(D[2], D[1], D[0])=(0, 1, 1)" holds, and outputs a signal b1 of "0" otherwise. The circuit 111c outputs a signal c1 of “1” only when “(D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1)” and outputs a signal c1 of “0” otherwise. The circuit 111d outputs a signal d1 of “1” only when “(D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1,1,1)” and outputs a signal d1 of “0” otherwise.
[0048] The circuit 111e outputs a signal e1 of "1" only when (D[1], D[0])=(0, 1), and outputs a signal e1 of "0" in other cases. The circuit 111f outputs a signal f1 of “1” only when “(D[3], D[2], D[1], D[0])=(0, 1, 1, 1)” holds, and outputs a signal f1 of “0” otherwise. The circuit 111g outputs a signal g1 of “1” only when “(D[5], D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1,1)” and outputs a signal g1 of “0” otherwise. The circuit 111h outputs a signal h1 of “1” only when “(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1,1,1,1)”, and outputs a signal h1 of “0” otherwise. The circuit 111i outputs a signal i1 of “1” only when “(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(1,1,1,1,1,1,1,1)”, and outputs a signal i1 of “0” otherwise.
[0049] The logical sum circuit 112 generates and outputs the logical sum signal of the signals a1 to d1 as the signal A1. The signal A1 has a value of "1" only when any of the signals a1, b1, c1, and d1 has a value of "1", and otherwise the signal A1 has a value of "0". The circuits 111a to 111d and 112 determine whether the current count value CV corresponds to the first numerical pattern. The value of the signal A1 becomes "1" only when the current count value CV corresponds to the first numerical pattern (in other words, only when the condition Cu1 is satisfied).
[0050] The logical sum circuit 113 generates and outputs a logical sum signal of the signals e1 to i1 as the signal B1. The signal B1 has a value of "1" only when any of the signals e1, f1, g1, h1, and i1 has a value of "1", and otherwise the signal B1 has a value of "0". The circuits 111e to 111i and 113 determine whether the current count value CV corresponds to the second numerical pattern. The value of the signal B1 becomes "1" only when the current count value CV corresponds to the second numerical pattern (in other words, only when the condition Cu2 is satisfied).
[0051] The decision circuit 120 includes circuits 121 and 122, AND circuits 123 and 124, and an OR circuit 125. The circuit 121 generates and outputs a signal C1 based on the current parity value PRT. The circuit 122 generates and outputs a signal D1 based on the current parity value PRT. The current parity value PRT corresponds to the parity value PRT before the count value CV is updated. The circuit 121 outputs a signal C1 of "1" when the current parity value PRT is "0", and outputs a signal C1 of "0" when the current parity value PRT is "1". The circuit 122 outputs a signal D1 of "1" when the current parity value PRT is "1", and outputs a signal D1 of "0" when the current parity value PRT is "0".
[0052] The AND circuit 123 generates and outputs a logical AND signal of the signals A1 and C1 as a signal E1. The signal E1 has a value of "1" only when both the signals A1 and C1 have a value of "1", and otherwise the signal E1 has a value of "0". The AND circuit 124 generates and outputs a logical AND signal of the signals B1 and D1 as a signal F1. The signal F1 has a value of "1" only when both the signals B1 and D1 have a value of "1", and otherwise the signal F1 has a value of "0". The OR circuit 125 generates and outputs a logical OR signal of the signals E1 and F1 as a signal G1. The signal G1 has a value of "1" only when either the signals E1 or F1 have a value of "1", and otherwise the signal G1 has a value of "0". In the embodiment EX1_1, the value of the signal G1 is the operation value NEXT. That is, the next time a rising edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G1.
[0053] [Example EX1_2] An example EX1_2 will be described. In the example EX1_2, it is assumed that the binary counter 1 is a 7-bit up counter (that is, "N=7").
[0054] 9 shows a decision circuit 130 and a decision circuit 140 according to the embodiment EX1_2. In the embodiment EX1_2, the decision circuit 130 and the decision circuit 140 can be used as the decision circuit 11 and the decision circuit 12 in FIG.
[0055] The determination circuit 130 includes element determination circuits 131a to 131h and OR circuits 132 and 133. The element determination circuits 131a to 131h generate and output signals a2 to h2, respectively, based on the current count value CV (D[0] to D[N-1]). The current count value CV corresponds to the count value CV before updating. The signals a2 to h2 are each a binary signal having a value of 0 or 1 (the same applies to signals A2 to G2 described later).
[0056] The circuit 131a outputs a signal a2 of "1" only when "D[0]=0" holds, and outputs a signal a2 of "0" in other cases. The circuit 131b outputs a signal b2 of "1" only when "(D[2], D[1], D[0])=(0, 1, 1)" holds, and outputs a signal b2 of "0" otherwise. The circuit 131c outputs a signal c2 of “1” only when “(D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1)” holds, and outputs a signal c2 of “0” otherwise. The circuit 131d outputs a signal d2 of “1” only when “(D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1,1,1)” and outputs a signal d2 of “0” otherwise. The circuit 131e outputs a signal e2 of “1” only when “(D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(1,1,1,1,1,1,1)” and outputs a signal e2 of “0” otherwise.
[0057] The circuit 131f outputs a signal f2 of "1" only when "(D[1], D[0])=(0, 1)" holds, and outputs a signal f2 of "0" in other cases. The circuit 131g outputs a signal g2 of “1” only when “(D[3], D[2], D[1], D[0])=(0, 1, 1, 1)” holds, and outputs a signal g2 of “0” otherwise. The circuit 131h outputs a signal h2 of “1” only when “(D[5], D[4], D[3], D[2], D[1], D[0])=(0,1,1,1,1,1)” and outputs a signal h2 of “0” otherwise.
[0058] The logical sum circuit 132 generates and outputs the logical sum signal of the signals a2 to e2 as the signal A2. The signal A2 has a value of "1" only when any of the signals a2, b2, c2, d2, and e2 has a value of "1", and otherwise the signal A2 has a value of "0". The circuits 131a to 131e and 132 determine whether the current count value CV corresponds to the first numerical pattern. The value of the signal A2 becomes "1" only when the current count value CV corresponds to the first numerical pattern (in other words, only when the condition Cu1 is satisfied).
[0059] The logical sum circuit 133 generates and outputs a logical sum signal of the signals f2 to h2 as the signal B2. The signal B2 has a value of "1" only when any of the signals f2, g2, and h2 has a value of "1", and otherwise the signal B2 has a value of "0". The circuits 131f to 131h and 133 determine whether the current count value CV corresponds to the second numerical pattern. The value of the signal B2 becomes "1" only when the current count value CV corresponds to the second numerical pattern (in other words, only when the condition Cu2 is satisfied).
[0060] The decision circuit 140 includes circuits 141 and 142, AND circuits 143 and 144, and an OR circuit 145. The circuit 141 generates and outputs a signal C2 based on the current parity value PRT. The circuit 142 generates and outputs a signal D2 based on the current parity value PRT. The current parity value PRT corresponds to the parity value PRT before the count value CV is updated. The circuit 141 outputs a signal C2 of "1" when the current parity value PRT is "0", and outputs a signal C2 of "0" when the current parity value PRT is "1". The circuit 142 outputs a signal D2 of "1" when the current parity value PRT is "1", and outputs a signal D2 of "0" when the current parity value PRT is "0".
[0061] The AND circuit 143 generates and outputs a logical AND signal of the signals A2 and C2 as a signal E2. The signal E2 has a value of "1" only when both the signals A2 and C2 have a value of "1", and otherwise the signal E2 has a value of "0". The AND circuit 144 generates and outputs a logical AND signal of the signals B2 and D2 as a signal F2. The signal F2 has a value of "1" only when both the signals B2 and D2 have a value of "1", and otherwise the signal F2 has a value of "0". The OR circuit 145 generates and outputs a logical OR signal of the signals E2 and F2 as a signal G2. The signal G2 has a value of "1" only when either the signals E2 or F2 has a value of "1", and otherwise the signal G2 has a value of "0". In the embodiment EX1_2, the value of the signal G2 is the operation value NEXT. That is, the next time a rising edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G2.
[0062] Here, a parity bit generating circuit according to a reference configuration will be described. In the reference configuration, parity bits for FFs of multiple bits are formed by an XOR tree. XOR is an abbreviation for exclusive OR. FIG. 10 shows a reference configuration when parity bits for FFs of 8 bits are formed by an XOR tree. In FIG. 10, a parity group is formed by FFs of 8 bits. Although the reference configuration can generate parity bits for any parity group, the number of XORs required increases significantly as the number of bits increases. The circuit area of the parity bit generating circuit increases due to the increase in the total number of XORs. It is desirable to minimize the circuit area of the parity bit generating circuit.
[0063] Since the binary counter 1 does not require an XOR tree, it is possible to generate parity bits with a relatively small circuit area. In Fig. 11, a dashed waveform 610 represents the relationship between the number of bits and the circuit area of the parity bit generation circuit in the reference configuration, and a solid waveform 620 represents the relationship between the number of bits (the value of N) and the circuit area of the parity bit generation circuit in the binary counter 1 of the first embodiment. In comparison with the reference configuration, it can be seen that the area reduction effect becomes greater with an increase in the number of bits according to the binary counter 1.
[0064] [Example EX1_3] Example EX1_3 will be described. In the configurations shown in Examples EX1_1 and EX1_2, when updating the count value CV, a process for determining whether the count value CV before the update corresponds to a first numerical pattern (hereinafter referred to as a determination process α1) and a process for determining whether the count value CV before the update corresponds to a second numerical pattern (hereinafter referred to as a determination process α2) are executed separately. In the configuration shown in Example EX1_1 (FIG. 8), the determination result by the determination process α1 is indicated by a signal A1, and the determination result by the determination process α2 is indicated by a signal B1. However, the calculated value NEXT (see FIG. 1 and FIG. 8) may be derived by performing only the determination process α1 of the determination processes α1 and α2.
[0065] Fig. 12 shows a judgment circuit 110_A and a decision circuit 120_A according to an embodiment EX1_3. In the embodiment EX1_3, the judgment circuit 110_A and the decision circuit 120_A can be used as the judgment circuit 11 and the decision circuit 12 in Fig. 5. The configuration in Fig. 12 corresponds to a modification of the configuration in Fig. 8.
[0066] The decision circuit 110_A has only the circuit that performs the decision process α1 among the decision circuit 110 in Fig. 8. That is, the decision circuit 110_A has only the above-mentioned circuits 111a to 111d and 112. The operations of the circuits 111a to 111d and 112 are as shown in the embodiment EX1_1. Therefore, the value of the signal A1 becomes "1" only when the current count value CV corresponding to the count value CV before the update corresponds to the first numerical pattern (in other words, only when the condition Cu1 is satisfied).
[0067] The decision circuit 120_A has a NOT circuit 126_A and a selector 127_A. The NOT circuit 126_A generates and outputs a signal I1_A which is an inverted signal of a signal H1_A having a current parity value PRT. If the current parity value PRT is "1", the signal I1_A has a value of "0", and if the current parity value PRT is "0", the signal I1_A has a value of "1". As described above, the current parity value PRT corresponds to the parity value PRT before the count value CV is updated.
[0068] The selector 127_A outputs the signal H1_A or I1_A as the signal G1_A according to the signal A1 from the decision circuit 110_A. Specifically, when the signal A1 has a value of "1", the selector 127_A outputs the signal I1_A as the signal G1_A, and when the signal A1 has a value of "0", the selector 127_A outputs the signal H1_A as the signal G1_A. In the embodiment EX1_3, the value of the signal G1_A is the calculation value NEXT. That is, the next time an up edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G1_A.
[0069] 12 is adopted, the parity value PRT changes at the rising edge of the signal CLK when the pre-update count value CV corresponds to the first numerical pattern (i.e., when "A1=1"), and the parity value PRT does not change even if a rising edge occurs in the signal CLK when the pre-update count value CV does not correspond to the first numerical pattern (i.e., when "A1=0") This is because the fact that the pre-update count value CV does not correspond to the first numerical pattern means that the pre-update count value CV corresponds to the second numerical pattern.
[0070] The configuration according to the embodiment EX1_3 has been described on the assumption that the binary counter 1 is an 8-bit up counter, but the configuration according to the embodiment EX1_3 can be applied even if the number of bits of the up counter is other than 8 bits. That is, for example, when configuring an up counter of "N=7", it is sufficient to modify the configuration of FIG. 9 so that only the circuit for generating the signal A2 is provided as a decision circuit 130 and the decision circuit 140 derives the calculation value NEXT based on the signal A2 and the current parity value PRT. The decision circuit 130_A and decision circuit 140_A in FIG. 13 are the decision circuit 130 and decision circuit 140 after the modification, and a signal G2_A having the calculation value NEXT is output from the decision circuit 140_A.
[0071] [Example EX1_4] An embodiment EX1_4 will be described. Contrary to the embodiment EX1_3, the calculation value NEXT (see FIG. 1 and FIG. 8) may be derived by performing only the determination process α2 out of the determination processes α1 and α2.
[0072] Fig. 14 shows a judgment circuit 110_B and a decision circuit 120_B according to an embodiment EX1_4. In the embodiment EX1_4, the judgment circuit 110_B and the decision circuit 120_B can be used as the judgment circuit 11 and the decision circuit 12 in Fig. 5. The configuration in Fig. 14 corresponds to a modification of the configuration in Fig. 8.
[0073] The decision circuit 110_B has only the circuit that performs the decision process α2 among the decision circuit 110 in Fig. 8. That is, the decision circuit 110_B has only the above-mentioned circuits 111e to 111i and 113. The operations of the circuits 111e to 111i and 113 are as shown in the embodiment EX1_1. Therefore, the value of the signal B1 becomes "1" only when the current count value CV corresponding to the count value CV before the update corresponds to the second numerical pattern (in other words, only when the condition Cu2 is satisfied).
[0074] The decision circuit 120_B has a NOT circuit 126_B and a selector 127_B. The NOT circuit 126_B generates and outputs a signal I1_B which is an inverted signal of a signal H1_B having a current parity value PRT. If the current parity value PRT is "1", the signal I1_B has a value of "0", and if the current parity value PRT is "0", the signal I1_B has a value of "1". As described above, the current parity value PRT corresponds to the parity value PRT before the count value CV is updated.
[0075] The selector 127_B outputs the signal H1_B or I1_B as the signal G1_B according to the signal B1 from the decision circuit 110_B. Specifically, when the signal B1 has a value of "1", the selector 127_B outputs the signal H1_B as the signal G1_B, and when the signal B1 has a value of "0", the selector 127_B outputs the signal I1_B as the signal G1_B. In the embodiment EX1_4, the value of the signal G1_B is the calculation value NEXT. That is, the next time an up edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G1_B.
[0076] 14 is adopted, the parity value PRT does not change even if an up edge occurs when the pre-update count value CV corresponds to the second numerical pattern (i.e., when "B1=1"), and the parity value PRT changes in response to an up edge of the signal CLK when the pre-update count value CV does not correspond to the second numerical pattern (i.e., when "B1=0") This is because the fact that the pre-update count value CV does not correspond to the second numerical pattern means that the pre-update count value CV corresponds to the first numerical pattern.
[0077] The configuration according to the embodiment EX1_4 has been described on the assumption that the binary counter 1 is an 8-bit up counter, but the configuration according to the embodiment EX1_4 can be applied even if the number of bits of the up counter is other than 8 bits. For example, when configuring an up counter of "N=7", the configuration of FIG. 9 can be modified so that only the circuit for generating the signal B2 is provided as the decision circuit 130 and the calculation value NEXT is derived in the decision circuit 140 based on the signal B2 and the current parity value PRT. The decision circuit 130_B and decision circuit 140_B in FIG. 15 are the decision circuit 130 and decision circuit 140 after the modification, and the signal G2_B having the calculation value NEXT is output from the decision circuit 140_B.
[0078] [Example EX1_5] Example EX1_5 will be described. In the above description of the first embodiment, the count value CV is (2 N -1), and "CV=2 N It is assumed that when an up edge occurs in the signal CLK while the count value CV is equal to "-1", the count value CV is set and updated to the specified value "0". The process of setting the count value CV to the specified value is called a reset process. In the reset process of the embodiment EX1_5, the specified value is "0".
[0079] Depending on the design, the count value CV may be (2 N In the embodiment EX1_5, the count value CV may be reset before it reaches (2 N The count circuit 2 according to the embodiment EX1_5 performs a reset process before the count value CV reaches a predetermined reset value C RST1 When the count-up process is performed in the state where the count value CV has the reset value C, the reset process is performed to set the count value CV to a specified value (0). RST1 (2 N −1), that is, it is smaller than the count value CV when bits b[0] to b[N−1] all have the value 1.
[0080] Specifically, the processing circuit 4 according to the embodiment EX1_5 performs the process of “CV=C RST1When the input value IV is 0, the input value IV is output. RST1 When a rising edge occurs on the signal CLK while the count value CV is equal to the reset value C RST1 will be updated to the default value (0).
[0081] However, if the count value CV is (2 N -1), if you reset the CV before reaching C RST1 Depending on the number of targets TG when "N=8", additional circuits may be required. This will be explained by assuming a situation where "N=8" and taking the circuit configuration in FIG. 8 as an example.
[0082] First, reset value C RST1 Consider case CS1_3a where the count value CV is "11010011" in binary notation. In case CS1_3a, when the count value CV is updated from "11010011" in binary notation to "00000000" in binary notation by a reset process, the evenness of the target number TG changes. On the other hand, the pattern of "11010011" originally corresponds to the first numeric pattern, and when the count value CV is "11010011" in binary notation, the circuit 111b in FIG. 8 outputs a signal b1 of "1". For this reason, in case CS1_3a, no special changes are required to the circuit in FIG. 8.
[0083] Next, reset value C RST1Consider case CS1_3b where D is "11000011" in binary notation. In case CS1_3b, when the count value CV is updated from "11000011" in binary notation to "00000000" in binary notation by a reset process, the evenness of the target number TG does not change. For this reason, in case CS1_3b, it is necessary to transform the circuit 111b in FIG. 8 into the circuit 111b' in FIG. 16. The circuit 111b' outputs a signal b1 of "1" only when "(D[2], D[1], D[0]) = (0, 1, 1)" is true and "(D[7], D[6], D[5], D[4], D[3]) = (1, 1, 0, 0, 0)" is not true, and outputs a signal b1 of "0" otherwise. In addition, in case CS1_3b, an element judgment circuit 111j that outputs a signal j1 to the judgment circuit 110 is added (see FIG. 16). The circuit 111j outputs a signal j1 of "1" only when "(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(1,1,0,0,0,0,1,1)" is established, and outputs a signal j1 of "0" otherwise. Then, the logical sum circuit 113 related to case CS1_3b generates and outputs a logical sum signal of signals e1 to j1 as a signal B1, as shown in FIG. 16. That is, in case CS1_3b, the signal B1 has a value of "1" only when any one of signals e1, f1, g1, h1, i1, and j1 has a value of "1", and the signal B1 has a value of "0" otherwise.
[0084] That is, in case CS1_3b, even if the even number of consecutive bits b[1] and b[0] from the least significant bit b[0] have a value of 1 and the most significant bit b[2] of the even number of bits has a value of 0, the count value CV before updating is equal to or greater than the reset value C RST1 If the count value CV before the update matches the first numerical pattern, it is determined that the count value CV before the update does not match the first numerical pattern and matches the second numerical pattern. As a result, in case CS1_3b, the count value CV becomes "(A1, B1, C1, D1) = (0, 1, 1, 0)" just before being updated to "00000000" in binary notation, so the parity value PRT does not change before and after the update.
[0085] Also, the reset value C RST1 Consider case CS1_3c where the count value CV is "11010111" in binary notation. In case CS1_3c, when the count value CV is updated from "11010111" in binary notation to "00000000" in binary notation by a reset process, the evenness of the target number TG does not change. On the other hand, the pattern of "11010111" originally corresponds to the second numeric pattern, and when the count value CV is "11010111" in binary notation, the circuit 111f in FIG. 8 outputs a signal f1 of "1". For this reason, in case CS1_3c, no special changes are required to the circuit in FIG. 8.
[0086] On the other hand, the reset value C RST1Consider case CS1_3d where the count value CV is "11000111" in binary notation. In case CS1_3d, when the count value CV is updated from "11000111" in binary notation to "00000000" in binary notation by a reset process, the parity of the target number TG changes (changes from odd to even). For this reason, in case CS1_3d, it is necessary to transform the circuit 111f in FIG. 8 into the circuit 111f' in FIG. 17. The circuit 111f' outputs a signal f1 of "1" only when "(D[3], D[2], D[1], D[0]) = (0, 1, 1, 1)" is true and "(D[7], D[6], D[5], D[4]) = (1, 1, 0, 0)" is not true, and outputs a signal f1 of "0" otherwise. In addition, in case CS1_3d, an element determination circuit 111k that outputs a signal k1 to the determination circuit 110 is added (see FIG. 17). The circuit 111k outputs a signal f1 of "(D[7], D[6], D[5], D[4], D[3], D[2], D[1 ],D[0])=(1,1,0,0,0,1,1,1)" holds, and outputs signal k1 of "1" otherwise.The logical sum circuit 112 for case CS1_3d generates and outputs the logical sum signal of signals a1 to d1 and k1 as signal A1, as shown in FIG. 17.In other words, in case CS1_3d, signal A1 has a value of "1" only when any of signals a1, b1, c1, d1 and k1 has a value of "1", and signal A1 has a value of "0" otherwise.
[0087] That is, in case CS1_3d, even if an odd number of consecutive bits b[2] to b[0] from the least significant bit b[0] have a value of 1 and the most significant bit b[3] of the odd number of bits has a value of 0, the count value CV before updating is equal to or greater than the reset value C RST1 If it matches, the count value CV before the update is determined not to correspond to the second numerical pattern but to correspond to the first numerical pattern. As a result, in case CS1_3d, the count value CV becomes "(A1, B1, C1, D1) = (1, 0, 0, 1)" just before being updated to "00000000" in binary notation, so the parity value PRT changes due to the update.
[0088] Thus, when determining whether the count value CV before update corresponds to the first numerical pattern or the second numerical pattern, the determination circuit 11 according to Example EX1_5 considers the relationship (consistency) between the count value CV before update and the reset value C as necessary. RST1
[0089] <<Second Embodiment>> The second embodiment will be described. The processing circuit 4 according to the second embodiment performs a countdown process. Therefore, the binary counter 1 according to the second embodiment is an N-bit down counter that decreases the count value CV by 1 each time by the countdown process. Similar to the N-bit up counter, in the N-bit down counter, there is a rule regarding whether the parity of the target number TG (the total number of bits having a value of 1 among bits b[0] to b[N - 1]) changes as the count value CV is updated. By reversing the relationship between "1" and "0" in the rule for the up counter, the rule for the down counter can be obtained.
[0090] Referring to FIG. 18, in the N-bit down counter, the situation where the parity of the target number TG changes and the situation where it does not change will be described.
[0091] In the bit sequence of the count value CV before update, when the least significant bit b[0] has a value of 1, if an even number of consecutive bits b[0] to b[2k C + 1] starting from the least significant bit b[0] have a value of 0 and the immediate higher-order bit b[2k C + 2] of the even number of bits has a value of 1, or when N is odd and all bits b[0] to b[N - 1] have a value of 0, a predetermined condition Cd1 is satisfied. Otherwise, the condition Cd1 is not satisfied. When the condition Cd1 is satisfied, the parity of the target number TG changes as the count value CV is updated. In the change of the parity of the target number TG, the target number TG changes from even to odd or from odd to even. Note that k C represents an integer greater than or equal to 0 and arbitrary that satisfies "2k C + 2 < N".
[0092] When the bit string of the count value CV before the update satisfies the condition Cd1, the count value CV before the update corresponds to the first numerical pattern described above. Therefore, the decision circuit 11 (see FIG. 5) can decide whether the count value CV before the update corresponds to the first numerical pattern based on whether the bit string of the count value CV before the update satisfies the condition Cd1. When the bit string of the count value CV before the update satisfies the condition Cd1, the decision circuit 11 decides that the count value CV before the update corresponds to the first numerical pattern. The method of updating the parity value PRT when it corresponds to the first numerical pattern is as described above (see FIG. 6).
[0093] For example, if "D[0]=1" in the bit string of the count value CV before updating, then updating the count value CV changes it to "b[0]=0", and the parity of the target number TG changes. Also, for example, a case where "(D[2], D[1], D[0]) = (1, 0, 0)" in the bit string of the count value CV before the update is a case where an even number of consecutive bits (b[1] and b[0]) from the least significant bit b[0] have a value of 0, and the most significant bit (b[2]) of these even number of bits has a value of 1. In this case, the update of the count value CV changes the number of 1s in bits b[2] to b[0] from 1 to 2, and the parity of the target number TG changes. Furthermore, if N is an odd number and all bits b[0] to b[N-1] have the value 0 in the bit string of the count value CV before the update, the update of the count value CV changes the target number TG from an even number (0) to an odd number (N) through underflow processing, thereby changing the evenness of the target number TG.
[0094] In the bit string of the count value CV before updating, the odd number of consecutive bits b[0] to b[2k D ] has a value of 0 and the most significant bit b[2k DWhen D “2k D + 1” has a value of 1, or when N is even and all bits b[0] to b[N - 1] have a value of 0, a predetermined condition Cd2 is satisfied. Otherwise, condition Cd2 is not satisfied. When condition Cd2 is satisfied, the parity of the target number TG does not change with the update of the count value CV, that is, the parity of the target number TG remains unchanged before and after the update of the count value CV. Note that k D represents an integer greater than or equal to 0 and any integer that satisfies “2k D + 1 < N”.
[0095] When the bit sequence of the count value CV before the update satisfies condition Cd2, the count value CV before the update corresponds to the second numerical pattern described above. Therefore, the determination circuit 11 (see FIG. 5) can determine whether the count value CV before the update corresponds to the second numerical pattern based on whether the bit sequence of the count value CV before the update satisfies condition Cd2. When the bit sequence of the count value CV before the update satisfies condition Cd2, the determination circuit 11 determines that the count value CV before the update corresponds to the second numerical pattern. The method for updating the parity value PRT when the second numerical pattern is applicable is as described above (see FIG. 6).
[0096] For example, in the case where “(D[3], D[2], D[1], D[0]) = (1, 0, 0, 0)” in the bit sequence of the count value CV before the update, an odd number of consecutive bits (b[2] to b[0]) starting from the least significant bit b[0] have a value of 0, and the immediately higher bit (b[3]) of the odd number of bits has a value of 1. In this case, the number of 1s in bits b[3] to b[0] changes from 1 to 3 due to the update of the count value CV, but the parity of the target number TG does not change at this time. Also, when N is even and all bits b[0] to b[N - 1] have a value of 0 in the bit sequence of the count value CV before the update, the target number TG changes from 0 to N through the underflow process due to the update of the count value CV. However, since both 0 and N are even, the parity of the target number TG does not change.
[0097] The second embodiment includes the following Examples EX2_1 to EX2_5. The matters described above in the second embodiment are applied to the following Examples EX2_1 to EX2_5 unless otherwise specified and unless there is a contradiction. However, in each Example, for matters that contradict the matters described above in the second embodiment, the description in each Example may take precedence. Furthermore, unless there is a contradiction, matters described in any of Examples EX2_1 to EX2_5 can also be applied to any other Example (i.e., any two or more of the multiple Examples can be combined).
[0098] [Example EX2_1] An example EX2_1 will be described. In the example EX2_1, it is assumed that the binary counter 1 is an 8-bit down counter (i.e., "N=8").
[0099] 19 shows a judgment circuit 210 and a decision circuit 220 according to the embodiment EX2_1. In the embodiment EX2_1, the judgment circuit 210 and the decision circuit 220 can be used as the judgment circuit 11 and the decision circuit 12 in FIG.
[0100] The determination circuit 210 includes element determination circuits 211a to 211i and OR circuits 212 and 213. The element determination circuits 211a to 211i generate and output signals a3 to i3, respectively, based on the current count value CV (D[0] to D[N-1]). The current count value CV corresponds to the count value CV before updating. The signals a3 to i3 are each a binary signal having a value of 0 or 1 (the same applies to signals A3 to G3 described later).
[0101] The circuit 211a outputs a signal a3 of "1" only when "D[0]=1", and outputs a signal a3 of "0" in other cases. The circuit 211b outputs a signal b3 of "1" only when "(D[2], D[1], D[0])=(1, 0, 0)" holds, and outputs a signal b3 of "0" otherwise. The circuit 211c outputs a signal c3 of “1” only when “(D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0)” and outputs a signal c3 of “0” otherwise. The circuit 211d outputs a signal d3 of “1” only when “(D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0, 0, 0)”, and outputs a signal d3 of “0” otherwise.
[0102] The circuit 211e outputs a signal e3 of "1" only when (D[1], D[0])=(1, 0), and outputs a signal e3 of "0" otherwise. The circuit 211f outputs a signal f3 of "1" only when "(D[3], D[2], D[1], D[0])=(1, 0, 0, 0)" and outputs a signal f3 of "0" otherwise. The circuit 211g outputs a signal g3 of “1” only when “(D[5], D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0, 0)” and outputs a signal g3 of “0” otherwise. The circuit 211h outputs a signal h3 of “1” only when “(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0, 0, 0, 0)”, and outputs a signal h3 of “0” otherwise. The circuit 211i outputs a signal i3 of “1” only when “(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(0,0,0,0,0,0,0,0)”, and outputs a signal i3 of “0” otherwise.
[0103] The logical sum circuit 212 generates and outputs the logical sum signal of the signals a3 to d3 as the signal A3. The signal A3 has a value of "1" only when any of the signals a3, b3, c3, and d3 has a value of "1", and otherwise the signal A3 has a value of "0". The circuits 211a to 211d and 212 determine whether the current count value CV corresponds to the first numerical pattern. The value of the signal A3 becomes "1" only when the current count value CV corresponds to the first numerical pattern (in other words, only when the condition Cd1 is satisfied).
[0104] The logical sum circuit 213 generates and outputs a logical sum signal of the signals e3 to i3 as the signal B3. The signal B3 has a value of "1" only when any of the signals e3, f3, g3, h3, and i3 has a value of "1", and otherwise the signal B3 has a value of "0". The circuits 211e to 211i and 213 determine whether the current count value CV corresponds to the second numerical pattern. The value of the signal B3 becomes "1" only when the current count value CV corresponds to the second numerical pattern (in other words, only when the condition Cd2 is satisfied).
[0105] The decision circuit 220 includes circuits 221 and 222, AND circuits 223 and 224, and an OR circuit 225. The circuit 221 generates and outputs a signal C3 based on the current parity value PRT. The circuit 222 generates and outputs a signal D3 based on the current parity value PRT. The current parity value PRT corresponds to the parity value PRT before the count value CV is updated. The circuit 221 outputs a signal C3 of "1" when the current parity value PRT is "0", and outputs a signal C3 of "0" when the current parity value PRT is "1". The circuit 222 outputs a signal D3 of "1" when the current parity value PRT is "1", and outputs a signal D3 of "0" when the current parity value PRT is "0".
[0106] The AND circuit 223 generates and outputs a logical AND signal of the signals A3 and C3 as a signal E3. The signal E3 has a value of "1" only when both the signals A3 and C3 have a value of "1", and otherwise the signal E3 has a value of "0". The AND circuit 224 generates and outputs a logical AND signal of the signals B3 and D3 as a signal F3. The signal F3 has a value of "1" only when both the signals B3 and D3 have a value of "1", and otherwise the signal F3 has a value of "0". The OR circuit 225 generates and outputs a logical OR signal of the signals E3 and F3 as a signal G3. The signal G3 has a value of "1" only when either the signals E3 or F3 has a value of "1", and otherwise the signal G3 has a value of "0". In the embodiment EX2_1, the value of the signal G3 is the operation value NEXT. That is, the next time a rising edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G3.
[0107] [Example EX2_2] An example EX2_2 will be described. In the example EX2_2, it is assumed that the binary counter 1 is a 7-bit down counter (i.e., "N=7").
[0108] 20 shows a judgment circuit 230 and a decision circuit 240 according to the embodiment EX2_2. In the embodiment EX2_2, the judgment circuit 230 and the decision circuit 240 can be used as the judgment circuit 11 and the decision circuit 12 in FIG.
[0109] The determination circuit 230 includes element determination circuits 231a to 231h and OR circuits 232 and 233. The element determination circuits 231a to 231h generate and output signals a4 to h4, respectively, based on the current count value CV (D[0] to D[N-1]). The current count value CV corresponds to the count value CV before updating. The signals a4 to h4 are each a binary signal having a value of 0 or 1 (the same applies to signals A4 to G4 described later).
[0110] The circuit 231a outputs a signal a4 of "1" only when "D[0]=1", and outputs a signal a4 of "0" in other cases. The circuit 231b outputs a signal b4 of "1" only when "(D[2], D[1], D[0])=(1, 0, 0)" holds, and outputs a signal b4 of "0" otherwise. The circuit 231c outputs a signal c4 of “1” only when “(D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0)” and outputs a signal c4 of “0” otherwise. The circuit 231d outputs a signal d4 of “1” only when “(D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0, 0, 0)”, and outputs a signal d4 of “0” otherwise. The circuit 231e outputs a signal e4 of “1” only when “(D[6], D[5], D[4], D[3], D[2], D[1], D[0])=(0,0,0,0,0,0,0)”, and outputs a signal e4 of “0” otherwise.
[0111] The circuit 231f outputs a signal f4 of "1" only when "(D[1], D[0])=(1, 0)" holds, and outputs a signal f4 of "0" in other cases. The circuit 231g outputs a signal g4 of "1" only when "(D[3], D[2], D[1], D[0])=(1, 0, 0, 0)" holds, and outputs a signal g4 of "0" otherwise. The circuit 231h outputs a signal h4 of “1” only when “(D[5], D[4], D[3], D[2], D[1], D[0])=(1, 0, 0, 0, 0)” and outputs a signal h4 of “0” otherwise.
[0112] The logical sum circuit 232 generates and outputs the logical sum signal of the signals a4 to e4 as the signal A4. The signal A4 has a value of "1" only when any of the signals a4, b4, c4, d4, and e4 has a value of "1", and otherwise the signal A4 has a value of "0". The circuits 231a to 231e and 232 determine whether the current count value CV corresponds to the first numerical pattern. The value of the signal A4 becomes "1" only when the current count value CV corresponds to the first numerical pattern (in other words, only when the condition Cd1 is satisfied).
[0113] The logical sum circuit 233 generates and outputs a logical sum signal of the signals f4 to h4 as a signal B4. The signal B4 has a value of "1" only when any of the signals f4, g4, and h4 has a value of "1", and otherwise has a value of "0". The circuits 231f to 231h and 233 determine whether the current count value CV corresponds to the second numerical pattern. The value of the signal B4 becomes "1" only when the current count value CV corresponds to the second numerical pattern (in other words, only when the condition Cd2 is satisfied).
[0114] The decision circuit 240 includes circuits 241 and 242, AND circuits 243 and 244, and an OR circuit 245. The circuit 241 generates and outputs a signal C4 based on the current parity value PRT. The circuit 242 generates and outputs a signal D4 based on the current parity value PRT. The current parity value PRT corresponds to the parity value PRT before the count value CV is updated. The circuit 241 outputs a signal C4 of "1" when the current parity value PRT is "0", and outputs a signal C4 of "0" when the current parity value PRT is "1". The circuit 242 outputs a signal D4 of "1" when the current parity value PRT is "1", and outputs a signal D4 of "0" when the current parity value PRT is "0".
[0115] The AND circuit 243 generates and outputs a logical AND signal of the signals A4 and C4 as a signal E4. The signal E4 has a value of "1" only when both the signals A4 and C4 have a value of "1", and otherwise the signal E4 has a value of "0". The AND circuit 244 generates and outputs a logical AND signal of the signals B4 and D4 as a signal F4. The signal F4 has a value of "1" only when both the signals B4 and D4 have a value of "1", and otherwise the signal F4 has a value of "0". The OR circuit 245 generates and outputs a logical OR signal of the signals E4 and F4 as a signal G4. The signal G4 has a value of "1" only when either the signals E4 or F4 has a value of "1", and otherwise the signal G4 has a value of "0". In the embodiment EX2_2, the value of the signal G4 is the operation value NEXT. That is, the next time a rising edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G4.
[0116] [Example EX2_3] Example EX2_3 will be described. In the configurations shown in Examples EX2_1 and EX2_2, when updating the count value CV, a process for determining whether the count value CV before the update corresponds to a first numerical pattern (hereinafter referred to as a determination process β1) and a process for determining whether the count value CV before the update corresponds to a second numerical pattern (hereinafter referred to as a determination process β2) are separately executed. In the configuration shown in Example EX2_1 (FIG. 19), the determination result by the determination process β1 is indicated by a signal A3, and the determination result by the determination process β2 is indicated by a signal B3. However, the calculation value NEXT (see FIG. 1 and FIG. 19) may be derived by performing only the determination process β1 of the determination processes β1 and β2.
[0117] Fig. 21 shows a judgment circuit 210_A and a decision circuit 220_A according to the embodiment EX2_3. In the embodiment EX2_3, the judgment circuit 210_A and the decision circuit 220_A can be used as the judgment circuit 11 and the decision circuit 12 in Fig. 5. The configuration in Fig. 21 corresponds to a modification of the configuration in Fig. 19.
[0118] The judgment circuit 210_A has only a circuit that performs the judgment process β1 among the judgment circuit 210 in Fig. 19. That is, the judgment circuit 210_A has only the above-mentioned circuits 211a to 211d and 212. The operations of the circuits 211a to 211d and 212 are as shown in the embodiment EX2_1. Therefore, the value of the signal A3 becomes "1" only when the current count value CV corresponding to the count value CV before the update corresponds to the first numerical pattern (in other words, only when the condition Cd1 is satisfied).
[0119] The decision circuit 220_A has a NOT circuit 226_A and a selector 227_A. The NOT circuit 226_A generates and outputs a signal I3_A which is an inverted signal of a signal H3_A having a current parity value PRT. If the current parity value PRT is "1", the signal I3_A has a value of "0", and if the current parity value PRT is "0", the signal I3_A has a value of "1". As described above, the current parity value PRT corresponds to the parity value PRT before the count value CV is updated.
[0120] The selector 227_A outputs the signal H3_A or I3_A as the signal G3_A according to the signal A3 from the decision circuit 210_A. Specifically, when the signal A3 has a value of "1", the selector 227_A outputs the signal I3_A as the signal G3_A, and when the signal A3 has a value of "0", the selector 227_A outputs the signal H3_A as the signal G3_A. In the embodiment EX2_3, the value of the signal G3_A is the calculation value NEXT. That is, the next time an up edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G3_A.
[0121] 21 is adopted, the parity value PRT changes at the rising edge of the signal CLK when the pre-update count value CV corresponds to the first numerical pattern (i.e., when "A3=1"), and the parity value PRT does not change even if a rising edge occurs in the signal CLK when the pre-update count value CV does not correspond to the first numerical pattern (i.e., when "A3=0") This is because the fact that the pre-update count value CV does not correspond to the first numerical pattern means that the pre-update count value CV corresponds to the second numerical pattern.
[0122] The configuration according to the embodiment EX2_3 has been described on the assumption that the binary counter 1 is an 8-bit down counter, but the configuration according to the embodiment EX2_3 can be applied even if the number of bits of the down counter is other than 8 bits. That is, when configuring a down counter of "N=7", for example, the configuration of Fig. 20 can be modified so that only the circuit for generating the signal A4 is provided as a decision circuit 230 and the calculation value NEXT is derived in the decision circuit 240 based on the signal A4 and the current parity value PRT. The decision circuit 230_A and the decision circuit 240_A in Fig. 22 are the decision circuit 230 and the decision circuit 240 after the modification, and the signal G4_A having the calculation value NEXT is output from the decision circuit 240_A.
[0123] [Example EX2_4] An embodiment EX2_4 will be described. Contrary to the embodiment EX2_3, the calculation value NEXT (see FIG. 1 and FIG. 19) may be derived by performing only the determination process β2 out of the determination processes β1 and β2.
[0124] Fig. 23 shows a judgment circuit 210_B and a decision circuit 220_B according to the embodiment EX2_4. In the embodiment EX2_4, the judgment circuit 210_B and the decision circuit 220_B can be used as the judgment circuit 11 and the decision circuit 12 in Fig. 5. The configuration in Fig. 23 corresponds to a modification of the configuration in Fig. 19.
[0125] The judgment circuit 210_B has only the circuit that performs the judgment process β2 among the judgment circuit 210 in Fig. 19. That is, the judgment circuit 210_B has only the above-mentioned circuits 211e to 211i and 213. The operations of the circuits 211e to 211i and 213 are as shown in the embodiment EX2_1. Therefore, the value of the signal B3 becomes "1" only when the current count value CV corresponding to the count value CV before the update corresponds to the second numerical pattern (in other words, only when the condition Cd2 is satisfied).
[0126] The decision circuit 220_B has a NOT circuit 226_B and a selector 227_B. The NOT circuit 226_B generates and outputs a signal I3_B which is an inverted signal of a signal H3_B having a current parity value PRT. If the current parity value PRT is "1", the signal I3_B has a value of "0", and if the current parity value PRT is "0", the signal I3_B has a value of "1". As described above, the current parity value PRT corresponds to the parity value PRT before the count value CV is updated.
[0127] The selector 227_B outputs the signal H3_B or I3_B as the signal G3_B according to the signal B3 from the decision circuit 210_B. Specifically, when the signal B3 has a value of "1", the selector 227_B outputs the signal H3_B as the signal G3_B, and when the signal B3 has a value of "0", the selector 227_B outputs the signal I3_B as the signal G3_B. In the embodiment EX2_4, the value of the signal G3_B is the calculation value NEXT. That is, the next time an up edge occurs in the signal CLK, the parity value PRT is updated with the value of the signal G3_B.
[0128] 23 is adopted, the parity value PRT does not change even if an up edge occurs when the pre-update count value CV corresponds to the second numerical pattern (i.e., when "B3=1"), and the parity value PRT changes in response to an up edge of the signal CLK when the pre-update count value CV does not correspond to the second numerical pattern (i.e., when "B3=0") This is because the fact that the pre-update count value CV does not correspond to the second numerical pattern means that the pre-update count value CV corresponds to the first numerical pattern.
[0129] The configuration according to the embodiment EX2_4 has been described on the assumption that the binary counter 1 is an 8-bit down counter, but the configuration according to the embodiment EX2_4 can be applied even if the number of bits of the down counter is other than 8 bits. For example, when configuring a down counter with "N=7", the configuration of FIG. 20 can be modified so that only the circuit for generating the signal B4 is provided as the decision circuit 230 and the decision circuit 240 derives the calculation value NEXT based on the signal B4 and the current parity value PRT. The decision circuit 230_B and decision circuit 240_B in FIG. 24 are the decision circuit 230 and decision circuit 240 after the modification, and the signal G4_B having the calculation value NEXT is output from the decision circuit 240_B.
[0130] [Example EX2_5] In the above description of the second embodiment, the count value CV can be decreased to 0, and when a rising edge occurs in the signal CLK while “CV=0”, the count value CV decreases to the specified value “2 N It is assumed that the count value CV is set and updated to a specified value "2 -1". The process of setting the count value CV to a specified value is called a reset process. In the reset process according to the embodiment EX2_5, the specified value is "2 N -1".
[0131] Depending on the design, the reset process may be performed before the count value CV reaches 0. In the embodiment EX2_5, the reset process is performed before the count value CV reaches 0. The count circuit 2 according to the embodiment EX2_5 performs the reset process before the count value CV reaches a predetermined reset value C RST2 When the countdown process is performed with the count value CV set to a specified value (2 N -1) to execute the reset process. Reset value C RST2 is greater than 0, ie, greater than the count value CV when bits b[0] to b[N-1] all have the value 0.
[0132] Specifically, the processing circuit 4 according to the embodiment EX2_5 performs the process of “CV=C RST2"When "IV=2 N -1” input value IV. This makes it possible to output “CV=C RST2 When a rising edge occurs on the signal CLK while the count value CV is equal to the reset value C RST2 to the default value (2 N -1).
[0133] However, if the reset process is performed before the count value CV reaches 0, RST2 Depending on the number of targets TG when ", it may be necessary to add a circuit. The method of adding the necessary circuits is the same as in embodiment EX1_5, and therefore is not illustrated.
[0134] For example, when “N=8”, the reset value C RST2Consider case CS2_3b where D is "11010100" in binary notation. In case CS2_3b, when the count value CV is updated from "11010100" in binary notation to "11111111" in binary notation by a reset process, the evenness of the target number TG does not change. Therefore, the circuit 211b related to case CS2_3b is modified so that it outputs a signal b3 of "1" only when "(D[2], D[1], D[0]) = (1, 0, 0)" is true and "(D[7], D[6], D[5], D[4], D[3]) = (1, 1, 0, 1, 0)" is not true, and outputs a signal b3 of "0" otherwise (see FIG. 19). Furthermore, in case CS2_3b, a circuit that sets signal B3 to "1" not only when any of signals e3 to i3 has a value of "1" but also when "(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0]) = (1, 1, 0, 1, 0, 1, 0, 0)" is satisfied is added to the judgment circuit 210. As a result, in case CS2_3b, the count value CV of "11010100" is judged not to correspond to the first numerical pattern (condition Cd1 is not satisfied) and to correspond to the second numerical pattern (condition Cd2 is satisfied). Then, in case CS2_3b, (A3, B3, C3, D3) = (0, 1, 1, 0) immediately before the count value CV is updated from "11010100" to "11111111" in binary notation, so the parity value PRT does not change before and after the update.
[0135] For example, when “N=8”, the reset value C RST2Consider case CS2_3d where the count value CV is "11001000" in binary notation. In case CS2_3d, when the count value CV is updated from "11001000" in binary notation to "11111111" in binary notation by a reset process, the parity of the target number TG changes (changes from odd to even). Therefore, the circuit 211f for case CS2_3d is modified so that it outputs a signal f3 of "1" only when "(D[3], D[2], D[1], D[0]) = (1, 0, 0, 0)" is true and "(D[7], D[6], D[5], D[4]) = (1, 1, 0, 0)" is not true, and outputs a signal f3 of "0" otherwise (see FIG. 19). Furthermore, in case CS2_3d, not only when any of the signals a3 to d3 has a value of "1", but also when "(D[7], D[6], D[5], D[4], D[3], D[2], D[1], D[0]) = (1, 1, 0, 0, 1, 0, 0, A circuit is added to the judgment circuit 210 that sets signal A3 to "1" even when condition Cd2 (condition Cd1) is satisfied. As a result, in case CS2_3d, the count value CV of "11001000" is judged not to correspond to the second numerical pattern (condition Cd2 is not satisfied) and to correspond to the first numerical pattern (condition Cd1 is satisfied). Then, in case CS2_3d, just before the count value CV is updated from "11001000" to "11111111" in binary notation, "(A3, B3, C3, D3) = (1, 0, 0, 1)", and the parity value PRT changes due to the update.
[0136] In this way, the determination circuit 11 according to the embodiment EX2_5 determines whether the count value CV before the update corresponds to the first numerical pattern or the second numerical pattern by using the count value CV before the update and the reset value C as necessary. RST2 Consider the relationship (consistency) with.
[0137] <<Third embodiment>> A third embodiment will be described. The binary counter 1 according to the third embodiment is an N-bit up-down counter. The processing circuit 4 according to the third embodiment selectively executes a count-up process or a count-down process. The binary counter 1 according to the third embodiment operates in either a count-up mode or a count-down mode. The operation mode may be determined based on a mode designation signal supplied to the binary counter 1, or may be determined based on mode designation data in a memory provided in the binary counter 1.
[0138] In the count-up mode, the binary counter 1 operates as an N-bit up-counter that increments the count value CV by 1 through count-up processing. In the count-down mode, the binary counter 1 operates as an N-bit down-counter that decrements the count value CV by 1 through count-down processing.
[0139] The operation of the count circuit 2 in the count-up mode is the same as that in the first embodiment. Therefore, in the count-up mode, the processing circuit 4 performs count-up processing. In the count-up mode, the processing circuit 4 generates an input value IV based on the count value CV so that "IV=CV+1" is established. Therefore, in the count-up mode, the count value CV is incremented by 1 each time an up edge of the signal CLK occurs. However, in the count-up mode, the processing circuit 4 also performs count-up processing such that "CV=2 N When “CV=2 −1” is true, the input value IV that satisfies “IV=0” is generated by overflow processing (i.e., all binary values E[0] to E[N-1] are set to 0). Therefore, in the count-up mode, “CV=2 N When a rising edge occurs in the signal CLK while the condition "-1" is satisfied, the count value CV is (2 N The count value CV changes from -1 to the minimum value that the count value CV can take (i.e. 0).
[0140] The operation of the count circuit 2 in the countdown mode is the same as that in the second embodiment. Therefore, in the countdown mode, the processing circuit 4 performs countdown processing. In the countdown mode, the processing circuit 4 generates an input value IV based on the count value CV so that "IV=CV-1" is established. Therefore, in the countdown mode, the count value CV is decremented by 1 each time an up edge of the signal CLK occurs. However, in the countdown mode, when "CV=0" is established, the processing circuit 4 generates "IV=2" by underflow processing. N Therefore, in the countdown mode, when a rising edge occurs in the signal CLK while “CV=0” is satisfied, the count value CV changes from 0 to the maximum value that the count value CV can take (i.e., 2 N -1).
[0141] The operation of the parity bit generation circuit 6 in the count-up mode is the same as that in the first embodiment. The operation of the parity bit generation circuit 6 in the count-down mode is the same as that in the second embodiment. In practice, for example, the parity calculation circuit 7 in the first embodiment and the parity calculation circuit 7 in the second embodiment are provided in the parity bit generation circuit 6 as the first and second parity calculation circuits, and the parity value PRT is derived using the first parity calculation circuit in the count-up mode and the second parity calculation circuit in the count-down mode. Although the area reduction effect in the third embodiment is smaller than that in the first or second embodiment, the area reduction effect becomes more noticeable as the number of bits increases.
[0142] In the count-up mode, the decision circuit 11 according to the third embodiment can determine whether the count value CV before the update corresponds to the first numerical pattern based on whether the bit string of the count value CV before the update satisfies the above-mentioned condition Cu1 (see FIG. 7), and can determine that the count value CV before the update corresponds to the first numerical pattern when the condition Cu1 is satisfied. The method of updating the parity value PRT when the first numerical pattern is satisfied is as described above (see FIG. 6). In the count-up mode, the decision circuit 11 according to the third embodiment can determine whether the count value CV before the update corresponds to the second numerical pattern based on whether the bit string of the count value CV before the update satisfies the above-mentioned condition Cu2 (see FIG. 7), and can determine that the count value CV before the update corresponds to the second numerical pattern when the condition Cu2 is satisfied. The method of updating the parity value PRT when the second numerical pattern is satisfied is as described above (see FIG. 6).
[0143] Similarly, in the countdown mode, the decision circuit 11 according to the third embodiment can determine whether the count value CV before the update corresponds to the first numerical pattern based on whether the bit string of the count value CV before the update satisfies the above-mentioned condition Cd1 (see FIG. 18), and can determine that the count value CV before the update corresponds to the first numerical pattern when the condition Cd1 is satisfied. The method of updating the parity value PRT when the first numerical pattern is satisfied is as described above (see FIG. 6). In the countdown mode, the decision circuit 11 according to the third embodiment can determine whether the count value CV before the update corresponds to the second numerical pattern based on whether the bit string of the count value CV before the update satisfies the above-mentioned condition Cd2 (see FIG. 18), and can determine that the count value CV before the update corresponds to the second numerical pattern when the condition Cd2 is satisfied. The method of updating the parity value PRT when the second numerical pattern is satisfied is as described above (see FIG. 6).
[0144] The third embodiment includes the following Examples EX3_1 to EX3_5. The matters described above in the third embodiment are applied to the following Examples EX3_1 to EX3_5 unless otherwise specified and unless there is a contradiction. However, in each Example, for matters that contradict the matters described above in the third embodiment, the description in each Example may take precedence. Furthermore, unless there is a contradiction, matters described in any of Examples EX3_1 to EX3_5 can also be applied to any other Example (i.e., any two or more of the multiple Examples can be combined).
[0145] [Example EX3_1] The embodiment EX3_1 will be described. In the embodiment EX3_1, it is assumed that the binary counter 1 is an 8-bit up-down counter (i.e., "N=8"). By combining the embodiments EX1_1 and EX2_1, the parity bit generation circuit 6 for an 8-bit up-down counter can be configured.
[0146] Fig. 25 shows the configuration of the parity bit generation circuit 6 according to the embodiment EX3_1. The parity bit generation circuit 6 according to the embodiment EX3_1 includes the decision circuit 110 and the decision circuit 120 (see Fig. 8) in the embodiment EX1_1, the decision circuit 210 and the decision circuit 220 (see Fig. 19) in the embodiment EX2_1, a selector 330, and a FF8. In the embodiment EX3_1, the decision circuits 110 and 210 constitute a decision circuit 11, and the decision circuits 120 and 220 constitute a decision circuit 12 (see also Fig. 5).
[0147] The selector 330 outputs the value of the signal G1 supplied from the decision circuit 120 or the value of the signal G3 supplied from the decision circuit 220 as the calculation value NEXT in response to the mode selection signal MODE. The mode selection signal MODE is a signal indicating the operation mode of the binary counter 1. When the operation mode of the binary counter 1 is set to the count-up mode, the selector 330 outputs the value of the signal G1 as the calculation value NEXT. When the operation mode of the binary counter 1 is set to the count-down mode, the selector 330 outputs the value of the signal G3 as the calculation value NEXT. The calculation value NEXT from the selector 330 is input to FF8. FF8 takes in the input value to itself (hence the calculation value NEXT) at the rising edge of the signal CLK, and updates its own stored value with the taken-in value. FF8 outputs its own stored value as the parity value PRT. The parity value PRT output from FF8 is fed back and input to the decision circuits 120 and 220.
[0148] Thereby, in the count-up mode, the parity value PRT is derived by the same operation as in the embodiment EX1_1, and in the count-down mode, the parity value PRT is derived by the same operation as in the embodiment EX2_1.
[0149] [Example EX3_2] The embodiment EX3_2 will be described. In the embodiment EX3_2, it is assumed that the binary counter 1 is a 7-bit up-down counter (i.e., "N=7"). By combining the embodiments EX1_2 and EX2_2, the parity bit generation circuit 6 for a 7-bit up-down counter can be configured.
[0150] Fig. 26 shows the configuration of the parity bit generation circuit 6 according to the embodiment EX3_2. The parity bit generation circuit 6 according to the embodiment EX3_2 includes the judgment circuit 130 and the decision circuit 140 (see Fig. 9) in the embodiment EX1_2, the judgment circuit 230 and the decision circuit 240 (see Fig. 20) in the embodiment EX2_2, a selector 350, and a FF8. In the embodiment EX3_2, the judgment circuits 130 and 230 constitute a judgment circuit 11, and the decision circuits 140 and 240 constitute a decision circuit 12 (see also Fig. 5).
[0151] The selector 350 outputs the value of the signal G2 supplied from the decision circuit 140 or the value of the signal G4 supplied from the decision circuit 240 as the calculation value NEXT in response to the mode selection signal MODE. The mode selection signal MODE is a signal indicating the operation mode of the binary counter 1. When the operation mode of the binary counter 1 is set to the count-up mode, the selector 350 outputs the value of the signal G2 as the calculation value NEXT. When the operation mode of the binary counter 1 is set to the count-down mode, the selector 350 outputs the value of the signal G4 as the calculation value NEXT. The calculation value NEXT from the selector 350 is input to FF8. FF8 takes in the input value to itself (hence the calculation value NEXT) at the rising edge of the signal CLK, and updates its own stored value with the taken-in value. FF8 outputs its own stored value as the parity value PRT. The parity value PRT output from FF8 is fed back and input to the decision circuits 140 and 240.
[0152] Thereby, in the count-up mode, the parity value PRT is derived by the same operation as in the embodiment EX1_2, and in the count-down mode, the parity value PRT is derived by the same operation as in the embodiment EX2_2.
[0153] [Example EX3_3] The embodiment EX3_3 will be described. The configuration shown in the embodiment EX1_3 or EX2_3 can also be adopted for the up-down counter. That is, in the up-down counter, in the count-up mode, among the above-mentioned judgment processes α1 and α2, only the judgment process α1 may be performed, and in the count-down mode, among the above-mentioned judgment processes β1 and β2, only the judgment process β1 may be performed.
[0154] 25 assuming "N=8", the decision circuit 110_A and decision circuit 120_A of FIG. 12 may be used as the decision circuit 110 and decision circuit 120, and the output signal G1_A of the decision circuit 120_A may be supplied as the signal G1 to the selector 330. Also, in the configuration of FIG. 25, the decision circuit 210_A and decision circuit 220_A of FIG. 21 may be used as the decision circuit 210 and decision circuit 220, and the output signal G3_A of the decision circuit 220_A may be supplied as the signal G3 to the selector 330.
[0155] 26 in which "N=7" is assumed, the decision circuit 130_A and decision circuit 140_A in FIG. 13 may be used as the decision circuit 130 and decision circuit 140, and the output signal G2_A of the decision circuit 140_A may be supplied as the signal G2 to the selector 350. Also, in the configuration of FIG. 26, the decision circuit 230_A and decision circuit 240_A in FIG. 22 may be used as the decision circuit 230 and decision circuit 240, and the output signal G4_A of the decision circuit 240_A may be supplied as the signal G4 to the selector 350.
[0156] [Example EX3_4] The embodiment EX3_4 will be described. The configuration shown in the embodiment EX1_4 or EX2_4 can also be adopted for the up-down counter. That is, in the up-down counter, in the count-up mode, among the above-mentioned judgment processes α1 and α2, only the judgment process α2 is performed, and in the count-down mode, among the above-mentioned judgment processes β1 and β2, only the judgment process β2 is performed.
[0157] 25 assuming "N=8", the decision circuit 110_B and decision circuit 120_B of FIG. 14 may be used as the decision circuit 110 and decision circuit 120, and the output signal G1_B of the decision circuit 120_B may be supplied as the signal G1 to the selector 330. Also, in the configuration of FIG. 25, the decision circuit 210_B and decision circuit 220_B of FIG. 23 may be used as the decision circuit 210 and decision circuit 220, and the output signal G3_B of the decision circuit 220_B may be supplied as the signal G3 to the selector 330.
[0158] 26 in which "N=7" is assumed, the decision circuit 130_B and decision circuit 140_B of FIG. 15 may be used as the decision circuit 130 and decision circuit 140, and the output signal G2_B of the decision circuit 140_B may be supplied as the signal G2 to the selector 350. Also, in the configuration of FIG. 26, the decision circuit 230_B and decision circuit 240_B of FIG. 24 may be used as the decision circuit 230 and decision circuit 240, and the output signal G4_B of the decision circuit 240_B may be supplied as the signal G4 to the selector 350.
[0159] [Example EX3_5] The embodiment EX3_5 will be described. The reset process shown in the embodiment EX1_5 or EX2_5 can also be applied to an up-down counter. If the reset process is executed when the binary counter 1 operates in the count-up mode, the circuit for generating the parity value PRT can be appropriately modified according to the method shown in the embodiment EX1_5. If the reset process is executed when the binary counter 1 operates in the count-down mode, the circuit for generating the parity value PRT can be appropriately modified according to the method shown in the embodiment EX2_5.
[0160] <<Deformations, etc.>> For any signal or voltage, the relationship between the high level and the low level thereof may be reversed to that described above without prejudice to the spirit of the above.
[0161] In the present disclosure, the parity value PRT of the parity bit has a value of "0" or "1". In each of the above-mentioned embodiments, the parity value PRT of "0" corresponds to the target number TG being an even number, and the parity value PRT of "1" corresponds to the target number TG being an odd number, but the relationship may be reversed. That is, the parity value PRT of "0" may indicate that the target number TG is an odd number, and the parity value PRT of "1" may indicate that the target number TG is an even number.
[0162] Although the configuration in which the count value CV is increased by 1 in the count-up process has been described above, the technology according to the present disclosure may be applied to a configuration in which the count value CV is increased by m in the count-up process. Similarly, although the configuration in which the count value CV is decreased by 1 in the count-down process has been described above, the technology according to the present disclosure may be applied to a configuration in which the count value CV is decreased by m in the count-down process. m represents any integer equal to or greater than 2.
[0163] The embodiments of the present disclosure can be modified in various ways as appropriate within the scope of the technical ideas set forth in the claims. The above embodiments are merely examples of the embodiments of the present disclosure, and the meanings of the terms of the present disclosure or each component are not limited to those described in the above embodiments. The specific numerical values shown in the above description are merely examples, and can be changed to various numerical values as a matter of course.
[0164] <<Additional Notes>> Regarding the present disclosure, specific configuration examples of which have been shown in the above-mentioned embodiments, additional notes will be provided.
[0165] A parity bit generation circuit according to one aspect of the present disclosure is a parity bit generation circuit (6) that generates a parity bit of a binary counter (1) that updates a count value (CV) by a count-up process or a count-down process, wherein a value (PRT) of the parity bit represents the evenness of the total number of bits having a value of 1 among all bits of the count value, and is configured (first configuration) to determine the value of the parity bit after the count value is updated based on the value of the parity bit before the count value is updated and the values of each bit of the count value before the count value is updated.
[0166] This allows the generation of parity bits for a binary counter in a small size.
[0167] In the parity bit generation circuit of the above first configuration, a configuration (second configuration) may be provided which includes a judgment circuit (11) configured to perform at least one of judging whether the count value before the update corresponds to a predetermined first numerical pattern and judging whether the count value before the update corresponds to a predetermined second numerical pattern, and a decision circuit (12) configured to determine the value of the parity bit after the count value is updated based on the value of the parity bit before the count value is updated and the judgment result of the judgment circuit.
[0168] In the parity bit generating circuit according to the second configuration described above, the parity may be changed when the count value before the update corresponds to the first numerical pattern and is updated, and the parity is unchanged when the count value before the update corresponds to the second numerical pattern (third configuration).
[0169] In the parity bit generation circuit according to the third configuration, the parity bit has a first value (e.g., "0") or a second value (e.g., "1"), the parity bit having the first value indicates that the total number of bits having a value of 1 among all bits of the count value is an even number, and the parity bit having the second value indicates that the total number of bits having a value of 1 among all bits of the count value is an odd number, First Case of FIG. 6: When the parity bit before the count value is updated has the first value and the count value before the count value is updated corresponds to the first numerical pattern, the decision circuit changes the value of the parity bit from the first value to the second value in accordance with the update of the count value, Second Case of FIG. 6: When the parity bit before the count value is updated has the second value and the count value before the count value is updated corresponds to the first numerical pattern, the decision circuit changes the value of the parity bit from the second value to the first value when the count value is updated; Third Case of FIG. 6: When the parity bit before the count value is updated has the first value and the count value before the count value is updated corresponds to the second numerical pattern, the decision circuit maintains the value of the parity bit at the first value before and after the count value is updated, Fourth case in Figure 6: In the case where the parity bit before updating the count value has the second value and the count value before updating corresponds to the second numerical pattern, when the count value is updated, the decision circuit may be configured to maintain the value of the parity bit at the second value before and after updating the count value (fourth configuration). In addition, a "0" may be associated with the first value and a "1" may be associated with the second value, or a "1" may be associated with the first value and a "0" may be associated with the second value.
[0170] In the parity bit generation circuit according to any one of the second to fourth configurations, the binary counter is an N-bit up counter that increments the count value by one by the count-up process, where N is an integer equal to or greater than 2, the target bit string is a bit string of the count value before the count value is updated, and the determination circuit performs a first determination process (α1) of determining whether the count value before the update corresponds to the first numerical pattern based on whether a first condition (Cu1) is satisfied for the target bit string, and a second determination process (α2) of determining whether the count value before the update corresponds to the second numerical pattern based on whether a second condition (Cu2) is satisfied for the target bit string. The fifth configuration may also be such that at least one of two judgment processes (α2) is executed, and the first condition is met when, in the target bit string, the least significant bit has a value of 0, or when an even number of bits contiguous from the least significant bit have a value of 1 and the most significant bit of the even number of bits has a value of 0, or when N is an odd number and all bits in the target bit string have a value of 1, and the second condition is met when, in the target bit string, an odd number of bits contiguous from the least significant bit have a value of 1 and the most significant bit of the odd number of bits has a value of 0, or when N is an even number and all bits in the target bit string have a value of 1.
[0171] In the parity bit generation circuit according to any one of the second to fourth configurations, the binary counter is an N-bit down counter that decrements the count value by one by the count-down process, where N is an integer equal to or greater than 2, the target bit string is a bit string of the count value before the count value is updated, and the determination circuit performs a first determination process (β1) of determining whether the count value before the update corresponds to the first numerical pattern based on whether a first condition (Cd1) is satisfied for the target bit string, and a second determination process (β2) of determining whether the count value before the update corresponds to the second numerical pattern based on whether a second condition (Cd2) is satisfied for the target bit string. The sixth configuration may also be such that at least one of two judgment processes (β2) is executed, and the first condition is met when, in the target bit string, the least significant bit has a value of 1, or when an even number of bits contiguous from the least significant bit have a value of 0 and the most significant bit of the even number of bits has a value of 1, or when N is an odd number and all bits in the target bit string have a value of 0, and the second condition is met when, in the target bit string, an odd number of bits contiguous from the least significant bit have a value of 0 and the most significant bit of the odd number of bits has a value of 1, or when N is an even number and all bits in the target bit string have a value of 0.
[0172] In the parity bit generation circuit according to any one of the second to fourth configurations, the binary counter is an N-bit up-down counter that selectively executes the count-up process and the count-down process, N represents an integer equal to or greater than 2, the binary counter increments the count value by one by the count-up process in a first mode (count-up mode) and decrements the count value by one by the count-down process in a second mode (count-down mode), a target bit string is a bit string of the count value before updating the count value, and in the first mode, the determination circuit performs a first determination process (α1) for determining whether the count value before updating corresponds to the first numerical pattern based on whether a first condition (Cu1) is satisfied for the target bit string, and At least one of the second judgment processes (α2) is executed to judge whether the count value before the update corresponds to the second numerical pattern based on whether a second condition (Cu2) is satisfied for the target bit string, and the first condition is satisfied when, in the target bit string, a least significant bit has a value of 0, an even number of bits contiguous from the least significant bit have a value of 1 and the most significant bit of the even number of bits has a value of 0, or N is an odd number and all bits of the target bit string have a value of 1, and the second condition is satisfied when, in the target bit string, an odd number of bits contiguous from the least significant bit have a value of 1 and the most significant bit of the odd number of bits has a value of 0, or N is an even number and all bits of the target bit string have a value of 1 (seventh configuration).
[0173] In the parity bit generation circuit according to the seventh configuration, in the second mode, the determination circuit executes at least one of a third determination process (β1) for determining whether the count value before updating corresponds to the first numerical pattern based on whether a third condition (Cd1) is satisfied for the target bit string, and a fourth determination process (β2) for determining whether the count value before updating corresponds to the second numerical pattern based on whether a fourth condition (Cd2) is satisfied for the target bit string, and when the least significant bit in the target bit string has a value of 1, The third condition is satisfied when an even number of consecutive bits from the least significant bit have a value of 0 and the most significant bit of the even number of bits with a value of 0 has a value of 1, or when N is an odd number and all bits in the target bit string have a value of 0, and the fourth condition is satisfied when an odd number of consecutive bits from the least significant bit in the target bit string have a value of 0 and the most significant bit of the odd number of bits with a value of 0 has a value of 1, or when N is an even number and all bits in the target bit string have a value of 0 (eighth configuration).
[0174] A binary counter according to one aspect of the present disclosure has a configuration (ninth configuration) including a parity bit generation circuit according to any one of the first to eighth configurations described above, and a count circuit that updates the count value in synchronization with an input signal. [Explanation of symbols]
[0175] 1 Binary Counter 2 Counting circuit 3 Holding circuit 4 Processing circuit 5, 5[0]~5[N-1], 8 FF (flip-flop) 6 Parity bit generator 7 Parity Calculation Circuit CV Count Value IV input value PRT Parity Value b[0]~b[N-1] bits 11 Judgment circuit 12 Decision Circuit 110, 130, 110_A, 130_A, 110_B, 130_B judgment circuit 120, 140, 120_A, 140_A, 120_B, 140_B decision circuit 111a~111k, 131a~131h Element judgment circuit 112, 113, 125, 132, 133, 145 OR circuit 121, 122, 141, 142 circuits 123, 124, 143, 144 AND circuit 126_A 126_B Negation circuit 127_A 127_B Selector 210, 230, 210_A, 230_A, 210_B, 230_B judgment circuit 220, 240, 220_A, 240_A, 220_B, 240_B decision circuit 211a~211i, 231a~231h Element judgment circuit 212, 213, 225, 232, 233, 245 OR circuit 221, 222, 241, 242 circuits 223, 224, 243, 244 AND circuit 226_A 226_B Negation circuit 227_A 227_B Selector 330, 350 Selector
Claims
1. A parity bit generation circuit for generating a parity bit of a binary counter that updates a count value by a count-up process or a count-down process, the value of the parity bit representing the evenness or oddness of a total number of bits having a value of 1 among all bits of the count value, a value of the parity bit before the count value is updated; and and a value of each bit of the count value before the count value is updated. determining a value of the parity bit after updating the count value; , a parity bit generation circuit.
2. a determination circuit configured to perform at least one of determining whether the count value before updating corresponds to a predetermined first numerical pattern and determining whether the count value before updating corresponds to a predetermined second numerical pattern; a determination circuit configured to determine a value of the parity bit after the count value is updated based on a value of the parity bit before the count value is updated and a determination result of the determination circuit.
2. The parity bit generation circuit according to claim 1.
3. When the count value before the update corresponds to the first numerical pattern, the parity changes when the count value is updated, and when the count value before the update corresponds to the second numerical pattern, the parity remains unchanged when the count value is updated.
3. The parity bit generating circuit according to claim 2.
4. the parity bit has a first value or a second value; the parity bit having the first value indicates that a total number of bits having a value of 1 among all bits of the count value is an even number, and the parity bit having the second value indicates that a total number of bits having a value of 1 among all bits of the count value is an odd number; When the parity bit before the count value is updated has the first value and the count value before the count value is updated corresponds to the first numerical pattern, the decision circuit changes the value of the parity bit from the first value to the second value in accordance with the update of the count value, When the parity bit before the count value is updated has the second value and the count value before the count value is updated corresponds to the first numerical pattern, the decision circuit changes the value of the parity bit from the second value to the first value in accordance with the update of the count value, When the parity bit before the count value is updated has the first value and the count value before the count value is updated corresponds to the second numerical pattern, the decision circuit maintains the value of the parity bit at the first value before and after the count value is updated, When the parity bit before the count value is updated has the second value and the count value before the update corresponds to the second numerical pattern, when the count value is updated, the decision circuit maintains the value of the parity bit at the second value before and after the count value is updated.
4. The parity bit generating circuit according to claim 3.
5. the binary counter is an N-bit up-counter that increments the count value by one through the count-up process, where N is an integer equal to or greater than 2; the target bit string is a bit string of the count value before the count value is updated, the determination circuit executes at least one of a first determination process of determining whether the count value before updating corresponds to the first numerical pattern based on whether a first condition is satisfied for the target bit string, and a second determination process of determining whether the count value before updating corresponds to the second numerical pattern based on whether a second condition is satisfied for the target bit string; the first condition is met when, in the target bit string, the least significant bit has a value of 0, an even number of consecutive bits from the least significant bit have a value of 1 and the most significant bit of the even number of bits has a value of 0, or N is an odd number and all bits in the target bit string have a value of 1; The second condition is satisfied when, in the target bit string, an odd number of consecutive bits from the least significant bit have a value of 1 and the most significant bit of the odd number of bits has a value of 0, or when N is an even number and all bits in the target bit string have a value of 1.
5. A parity bit generating circuit according to claim 2.
6. the binary counter is an N-bit down counter that decrements the count value by one by the count-down process, where N is an integer equal to or greater than 2; the target bit string is a bit string of the count value before the count value is updated, the determination circuit executes at least one of a first determination process of determining whether the count value before updating corresponds to the first numerical pattern based on whether a first condition is satisfied for the target bit string, and a second determination process of determining whether the count value before updating corresponds to the second numerical pattern based on whether a second condition is satisfied for the target bit string; the first condition is met when, in the target bit string, the least significant bit has a value of 1, an even number of consecutive bits from the least significant bit have a value of 0 and an immediately most significant bit of the even number of bits has a value of 1, or N is an odd number and all bits in the target bit string have a value of 0; The second condition is satisfied when, in the target bit string, an odd number of consecutive bits from the least significant bit have a value of 0 and the most significant bit of the odd number of bits has a value of 1, or when N is an even number and all bits in the target bit string have a value of 0.
5. A parity bit generating circuit according to claim 2.
7. the binary counter is an N-bit up-down counter that selectively executes the count-up process and the count-down process, N being an integer equal to or greater than 2, and the binary counter increments the count value by one through the count-up process in a first mode, and decrements the count value by one through the count-down process in a second mode; the target bit string is a bit string of the count value before the count value is updated, In the first mode, the determination circuit executes at least one of a first determination process of determining whether the count value before updating corresponds to the first numerical pattern based on whether a first condition is satisfied for the target bit string, and a second determination process of determining whether the count value before updating corresponds to the second numerical pattern based on whether a second condition is satisfied for the target bit string, the first condition is met when, in the target bit string, the least significant bit has a value of 0, an even number of consecutive bits from the least significant bit have a value of 1 and the most significant bit of the even number of bits has a value of 0, or N is an odd number and all bits in the target bit string have a value of 1; The second condition is satisfied when, in the target bit string, an odd number of consecutive bits from the least significant bit have a value of 1 and the most significant bit of the odd number of bits has a value of 0, or when N is an even number and all bits in the target bit string have a value of 1.
5. A parity bit generating circuit according to claim 2.
8. In the second mode, the determination circuit executes at least one of a third determination process of determining whether the count value before updating corresponds to the first numerical pattern based on whether a third condition is satisfied for the target bit string, and a fourth determination process of determining whether the count value before updating corresponds to the second numerical pattern based on whether a fourth condition is satisfied for the target bit string, the third condition is satisfied when, in the target bit string, the least significant bit has a value of 1, an even number of bits consecutive from the least significant bit have a value of 0 and an immediately most significant bit of the even number of bits having a value of 0 has a value of 1, or N is an odd number and all bits in the target bit string have a value of 0; The fourth condition is met when, in the target bit string, an odd number of consecutive bits from the least significant bit have a value of 0 and the most significant bit of the odd number of bits having a value of 0 has a value of 1, or when N is an even number and all bits in the target bit string have a value of 0.
8. The parity bit generating circuit according to claim 7.
9. A parity bit generation circuit according to any one of claims 1 to 4, A count circuit that updates the count value in synchronization with an input signal. , a binary counter.
Citation Information
Patent Citations
Parity check circuit
JP1999031084A
