JP6323065B2 - Microcomputer and electronic equipment - Google Patents

Microcomputer and electronic equipment Download PDF

Info

Publication number
JP6323065B2
JP6323065B2 JP2014035037A JP2014035037A JP6323065B2 JP 6323065 B2 JP6323065 B2 JP 6323065B2 JP 2014035037 A JP2014035037 A JP 2014035037A JP 2014035037 A JP2014035037 A JP 2014035037A JP 6323065 B2 JP6323065 B2 JP 6323065B2
Authority
JP
Japan
Prior art keywords
unit
control data
data
random number
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014035037A
Other languages
Japanese (ja)
Other versions
JP2015161969A (en
Inventor
秋山 千里
千里 秋山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2014035037A priority Critical patent/JP6323065B2/en
Priority to CN201510088930.1A priority patent/CN104866007A/en
Publication of JP2015161969A publication Critical patent/JP2015161969A/en
Application granted granted Critical
Publication of JP6323065B2 publication Critical patent/JP6323065B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Microcomputers (AREA)
  • Executing Machine-Instructions (AREA)

Description

本発明は、マイクロコンピューター及び電子機器等に関する。   The present invention relates to a microcomputer, an electronic device, and the like.

マイクロコンピューターでは、実行している命令(インストラクション)に応じて動作する回路素子が決まるため、実行している命令と電源の消費電流との間に相関がある。そのため、消費電流の時間変化を測定することによって、走行しているインストラクションを推測することができる。   In a microcomputer, since a circuit element that operates according to an instruction (instruction) being executed is determined, there is a correlation between the instruction being executed and the current consumption of the power supply. Therefore, the traveling instruction can be estimated by measuring the change in current consumption over time.

例えば、セキュリティートークン等のセキュリティー対策用のハードウェアを上記の手法でハッキングされた場合、アルゴリズムの解読やパスワードの解読、その解読された情報を使ったハードウェアの複製が可能となり、セキュリティーが破られる危険性がある。   For example, if hardware for security measures such as security tokens is hacked by the above method, the algorithm can be decrypted, the password can be decrypted, and the hardware can be duplicated using the decrypted information, breaking the security. There is a risk.

特表2002−508549号公報Japanese translation of PCT publication No. 2002-508549 特開2000−259799号公報JP 2000-259799 A

上記のようなハッキングを妨害する手法として、乱数を用いて命令と消費電流の相関を減らす手法が知られている(例えば特許文献1、2)。例えば、発生した乱数を2進数のビット列とし、そのビット列から1ビットずつ取り出し、“1”の場合には動作タイミングをずらす手法が考えられる。   As a technique for obstructing the hacking as described above, a technique for reducing the correlation between an instruction and current consumption using a random number is known (for example, Patent Documents 1 and 2). For example, a method may be considered in which the generated random number is a binary bit string, one bit is extracted from the bit string, and the operation timing is shifted in the case of “1”.

しかしながら、乱数は“0”又は“1”が連続して続く場合がある。そのため、“0”が続いた場合には通常の動作を行う期間が長く続いて命令と消費電流の間に相関が生じ、“1”が続いた場合には動作タイミングをずらす期間が長く続いて処理速度が落ちてしまうという課題がある。   However, the random number may be continuously followed by “0” or “1”. Therefore, when “0” continues, the period for performing the normal operation continues for a long time, and a correlation occurs between the command and the current consumption. When “1” continues, the period for shifting the operation timing continues for a long time. There exists a subject that processing speed falls.

本発明の幾つかの態様によれば、処理速度の低下を抑制しつつ命令と消費電流の相関を小さくすることが可能なマイクロコンピューター及び電子機器等を提供できる。   According to some aspects of the present invention, it is possible to provide a microcomputer, an electronic device, and the like that can reduce the correlation between instructions and current consumption while suppressing a decrease in processing speed.

本発明の一態様は、インストラクション処理を行う処理部と、前記インストラクション処理の動作タイミングを変化させる制御データを生成する制御データ生成部と、を含み、前記制御データ生成部は、乱数データを発生する乱数発生部と、前記乱数データを加工して、同一論理のビットが所定数連続して発生しない前記制御データを生成するコード変換部と、を有し、前記処理部は、前記制御データに基づいて前記動作タイミングが変化する前記インストラクション処理を行うマイクロコンピューターに関係する。   One aspect of the present invention includes a processing unit that performs an instruction process, and a control data generation unit that generates control data that changes operation timing of the instruction process, and the control data generation unit generates random number data. A random number generation unit; and a code conversion unit that processes the random number data and generates the control data in which a predetermined number of bits of the same logic are not continuously generated. The processing unit is based on the control data The microcomputer relates to a microcomputer that performs the instruction process in which the operation timing changes.

本発明の一態様によれば、乱数データが加工されることで、同一論理のビットが所定数連続して発生しない制御データが生成され、その制御データに基づいてインストラクション処理の動作タイミングが変更される。これにより、動作タイミングが変更される場合又は変更されない場合が長期間続かないようにできるため、処理速度の低下を抑制しつつ命令と消費電流の相関を小さくすることが可能となる。   According to one aspect of the present invention, by processing random number data, control data that does not generate a predetermined number of consecutive bits of the same logic is generated, and the operation timing of instruction processing is changed based on the control data. The As a result, since the case where the operation timing is changed or the case where the operation timing is not changed can be prevented from continuing for a long period of time, it is possible to reduce the correlation between the command and the current consumption while suppressing a decrease in processing speed.

また本発明の一態様は、前記乱数発生部は、nビット(nは2≦nの自然数)の乱数データを発生し、前記コード変換部は、同一論理のビットがjビット(jは2≦j<nの自然数)連続して発生しないように前記乱数データを加工して、mビット(mはn<mの自然数)の前記制御データを生成してもよい。   In one aspect of the present invention, the random number generator generates random data of n bits (n is a natural number of 2 ≦ n), and the code converter includes j bits (j is 2 ≦ n). The random number data may be processed so that it does not continuously occur (natural number of j <n), and the control data of m bits (m is a natural number of n <m) may be generated.

インストラクション処理の動作タイミングが変更される場合には処理速度が低下し、変更されない場合には命令と消費電流の相関が大きくなる。この点、本発明の一態様によれば、制御データにおいて同一論理のビットが連続するビット数をjビットより少なくできる。このビット数jは、乱数データのビット数nよりも小さいので、乱数データのビット列をそのまま制御データとして用いる場合よりも、同一論理のビットが連続するビット数を少なくできる。ビットの論理でインストラクション処理の動作タイミングを変更するか否かを制御するので、動作タイミングが変更される場合又は変更されない場合が続く期間を短くできる。   When the operation timing of the instruction process is changed, the processing speed is reduced, and when it is not changed, the correlation between the instruction and the current consumption is increased. In this regard, according to one aspect of the present invention, the number of consecutive bits of the same logic in the control data can be less than j bits. Since this bit number j is smaller than the bit number n of random number data, the number of consecutive bits of the same logic can be reduced as compared with the case where the bit string of random number data is used as it is as control data. Since whether or not to change the operation timing of the instruction processing is controlled by the bit logic, it is possible to shorten the period during which the operation timing is changed or not changed.

また本発明の一態様は、前記制御データに基づいて周期を変化させたクロック信号を前記処理部に供給するクロック供給部を含み、前記処理部が、前記クロック供給部からの前記クロック信号に基づいて前記インストラクション処理を行うことで、前記インストラクション処理の前記動作タイミングが変化してもよい。   One embodiment of the present invention includes a clock supply unit that supplies a clock signal having a cycle changed based on the control data to the processing unit, and the processing unit is based on the clock signal from the clock supply unit. Then, the operation timing of the instruction process may be changed by performing the instruction process.

このように処理部がインストラクション処理を実行するためのクロック信号の周期を、制御データに基づいて変更することで、インストラクション処理の動作タイミングを変化させることができる。制御データは同一論理が所定数連続しないので、周期が通常の場合と変更された場合が長期間連続せず、ランダムに分散されたクロック信号を供給できる。   As described above, the operation timing of the instruction process can be changed by changing the cycle of the clock signal for executing the instruction process by the processing unit based on the control data. Since a predetermined number of the same logic does not continue in the control data, the case where the period is normal and the case where the period is changed do not continue for a long time, and a randomly distributed clock signal can be supplied.

また本発明の一態様は、前記クロック供給部は、前記制御データが第1の論理レベルの場合に前記クロック信号の周期を増加させてもよい。   In one embodiment of the present invention, the clock supply unit may increase the cycle of the clock signal when the control data is at a first logic level.

このようにすれば、制御データが第2の論理レベルの場合にクロック信号の周期を変更せず、制御データが第1の論理レベルの場合にクロック信号の周期を増加できる。乱数データにより第1の論理レベルと第2の論理レベルがランダムに発生するので、命令と消費電流の相関が小さくなる。また、第2の論理レベルが連続すると処理速度が低下するが、同一論理は所定数連続しないので、処理速度のムラが分散される。   In this way, the period of the clock signal can be increased when the control data is at the first logic level without changing the period of the clock signal when the control data is at the second logic level. Since the first logic level and the second logic level are randomly generated by the random number data, the correlation between the instruction and the current consumption is reduced. In addition, when the second logic level continues, the processing speed decreases, but the predetermined number of the same logic does not continue, so that unevenness in processing speed is dispersed.

また本発明の一態様は、前記コード変換部は、前記乱数データを8b10b方式で変換することで、同一論理のビットが所定数連続して発生しない前記制御データを生成する8b10b変換部を含んでもよい。   According to another aspect of the present invention, the code conversion unit may include an 8b10b conversion unit that generates the control data that does not continuously generate a predetermined number of bits of the same logic by converting the random number data using the 8b10b method. Good.

8b10b方式は8ビットのデータを10ビットのデータに変換する手法であり、変換後は、同一論理のビットが最大でも5ビットしか連続しないデータとなる。この8b10b方式により乱数データを変換することで、同一論理のビットが最大でも5ビットしか連続しない制御データを生成できる。   The 8b10b method is a method of converting 8-bit data into 10-bit data, and after the conversion, the data having the same logic bit is only 5 bits at the maximum. By converting the random number data by the 8b10b method, it is possible to generate control data in which only 5 bits of the same logic are continuous at the maximum.

また本発明の一態様は、前記乱数発生部は、nビット(nは2≦nの自然数)の乱数データを発生し、前記コード変換部は、前記nビットの乱数データのうちのMSB側のn/2ビットの第1の乱数データが入力される第1の8b10b変換部と、前記nビットの乱数データのうちのLSB側のn/2ビットの第2の乱数データが入力される第2の8b10b変換部と、前記第1の8b10b変換部からの第1の変換データと、前記第2の8b10b変換部からの第2の変換データと、で構成される変換データから順次1ビットずつ選択して前記制御データとして出力するセレクターと、を有してもよい。   Further, according to one aspect of the present invention, the random number generation unit generates n-bit (n is a natural number of 2 ≦ n) random number data, and the code conversion unit includes the MSB side of the n-bit random number data. a first 8b10b converter to which n / 2-bit first random number data is input; and second of which n / 2-bit second random number data on the LSB side of the n-bit random number data is input. 1b sequentially selected from the conversion data comprising the 8b10b conversion unit, the first conversion data from the first 8b10b conversion unit, and the second conversion data from the second 8b10b conversion unit. And a selector that outputs the control data.

8b10b方式を用いる場合、単純には8ビットの乱数データを用いることが考えられるが、8ビットでは乱数データの数が限られるという課題がある。この点、MSB側の8ビットとLSB側の8ビットをそれぞれ8b10b方式でコード変換することで、乱数の数を確保し、制御データのランダム性を向上できる。   In the case of using the 8b10b method, it is conceivable to simply use 8-bit random data, but there is a problem that the number of random data is limited in 8 bits. In this regard, by performing code conversion on the MSB side 8 bits and the LSB side 8 bits respectively by the 8b10b method, it is possible to secure the number of random numbers and improve the randomness of the control data.

また本発明の一態様は、前記処理部にクロック信号を供給するクロック供給部を含み、前記クロック供給部は、前記セレクターにより選択されたビットが第1の論理レベルの場合、前記クロック信号の周期を増加させてもよい。   One embodiment of the present invention includes a clock supply unit that supplies a clock signal to the processing unit, and the clock supply unit has a cycle of the clock signal when the bit selected by the selector is a first logic level. May be increased.

このように、セレクターが制御データから順次1ビットずつ選択し、その選択したビットの論理レベルに応じてクロック信号の周期を制御することで、処理部が行うインストラクション処理の動作タイミングをランダムに変化させることができる。   In this way, the selector sequentially selects one bit at a time from the control data, and controls the cycle of the clock signal according to the logic level of the selected bit, thereby randomly changing the operation timing of the instruction processing performed by the processing unit. be able to.

また本発明の一態様は、バスコントロールユニットを含み、前記バスコントロールユニットが、前記処理部がバスにアクセスする際のアクセスタイミングを前記制御データに基づいて変化させることで、前記インストラクション処理の前記動作タイミングが変化してもよい。   One aspect of the present invention includes a bus control unit, and the bus control unit changes the access timing when the processing unit accesses the bus based on the control data, so that the operation of the instruction processing is performed. The timing may change.

このようにすれば、バスにアクセスする命令を処理部が処理する際、制御データの論理レベルに応じてバスアクセスのタイミングが変更される。制御データによりバスアクセスのタイミングがランダムに変更されるので、インストラクション処理のタイミングもランダムに変化させることができる。   In this way, when the processing unit processes an instruction to access the bus, the bus access timing is changed according to the logic level of the control data. Since the bus access timing is randomly changed by the control data, the instruction processing timing can also be randomly changed.

また本発明の他の態様は、上記のいずれかに記載されるマイクロコンピューターを含む電子機器に関係する。   Another embodiment of the present invention relates to an electronic device including the microcomputer described above.

比較例の動作説明図。Operation | movement explanatory drawing of a comparative example. 本実施形態のマイクロコンピューターの構成例。2 is a configuration example of a microcomputer according to the present embodiment. 本実施形態の動作説明図。Operation | movement explanatory drawing of this embodiment. 乱数データの例。An example of random data. コード変換の例。Code conversion example. 本実施形態のマイクロコンピューターの第2の構成例。The 2nd structural example of the microcomputer of this embodiment. クロック供給部及び制御データ生成部の詳細な構成例。3 shows detailed configuration examples of a clock supply unit and a control data generation unit. クロック供給部及び制御データ生成部の動作タイミングチャート。The operation | movement timing chart of a clock supply part and a control data generation part. 電子機器の構成例。Configuration example of an electronic device. 電子機器の構成例。Configuration example of an electronic device.

以下、本発明の好適な実施の形態について詳細に説明する。なお以下に説明する本実施形態は特許請求の範囲に記載された本発明の内容を不当に限定するものではなく、本実施形態で説明される構成の全てが本発明の解決手段として必須であるとは限らない。   Hereinafter, preferred embodiments of the present invention will be described in detail. The present embodiment described below does not unduly limit the contents of the present invention described in the claims, and all the configurations described in the present embodiment are indispensable as means for solving the present invention. Not necessarily.

1.比較例
図1に、本実施形態の比較例の動作説明図を示す。
1. Comparative Example FIG. 1 is an operation explanatory diagram of a comparative example of the present embodiment.

マイクロコンピューターは、命令を処理するCPU(Central Processing Unit)と、記憶装置やインターフェース等を含むペリフェラルとで構成される。CPUにはクロック信号CK_CPUが供給され、そのクロック信号CK_CPUの立ち上がりエッジに同期してCPUが動作しているとする。   The microcomputer includes a CPU (Central Processing Unit) for processing instructions and peripherals including a storage device, an interface, and the like. It is assumed that the clock signal CK_CPU is supplied to the CPU, and the CPU is operating in synchronization with the rising edge of the clock signal CK_CPU.

即ち、クロック信号CK_CPUの立ち上がりで命令フェッチを行い、次の立ち上がりで、その命令をデコードし、アドレス計算を行う。アドレス計算では、例えば実行に用いるデータが格納された主記憶装置のアドレスを計算する。そして、次のクロック信号CK_CPUの立ち上がりで命令を実行し、実行結果をレジスターに書き込む。命令の実行では、例えばアドレス計算で得られたアドレスからデータを読み出し、そのデータに対して演算装置が処理を行う。   That is, an instruction is fetched at the rising edge of the clock signal CK_CPU, the instruction is decoded at the next rising edge, and an address is calculated. In the address calculation, for example, the address of the main storage device in which data used for execution is stored is calculated. Then, the instruction is executed at the rising edge of the next clock signal CK_CPU, and the execution result is written in the register. In executing the instruction, for example, data is read from an address obtained by address calculation, and an arithmetic unit performs processing on the data.

パイプライン処理を行う場合には、第1命令、第2命令、・・・の処理を1クロック毎に開始し、複数の命令を並列処理する。この場合、1クロック毎に命令の実行結果が得られる。   When pipeline processing is performed, processing of the first instruction, the second instruction,... Is started every clock, and a plurality of instructions are processed in parallel. In this case, an instruction execution result is obtained every clock.

このような動作では、マイクロコンピューターの消費電流(IDD)が命令の内容に応じて異なっている。例えば、演算の内容が異なる命令では、演算装置で用いるロジック回路の個数や種類が異なり、そのロジック回路で消費する電流が異なる。或いは、演算装置を用いる命令と用いない命令、主記憶装置にアクセスする命令とアクセスしない命令では、動作する回路が異なるため消費電流が異なる。   In such an operation, the current consumption (IDD) of the microcomputer differs depending on the content of the command. For example, in the case of instructions having different contents of calculation, the number and types of logic circuits used in the calculation device are different, and the current consumed by the logic circuit is different. Alternatively, an instruction using the arithmetic unit and an instruction not using it, and an instruction accessing the main storage device and an instruction not accessing the current consumption are different because the operating circuits are different.

上述のように、クロック信号CK_CPUの立ち上がりに同期して命令を処理しているので、各クロックの立ち上がりで消費電流が発生し、その消費電流はそのときに実行している命令に応じたものとなる。そのため、この消費電流(例えば、その時間変化のパターン)を解析することで、マイクロコンピューターが実行している命令や、或いはその命令から構成されるアルゴリズムを推測することが可能となる。   As described above, since the instruction is processed in synchronization with the rising edge of the clock signal CK_CPU, the consumption current is generated at the rising edge of each clock, and the consumption current corresponds to the instruction being executed at that time. Become. Therefore, by analyzing the current consumption (for example, the time change pattern), it is possible to infer an instruction executed by the microcomputer or an algorithm composed of the instruction.

2.マイクロコンピューター
図2に、このような課題を解決できる本実施形態のマイクロコンピューターの構成例を示す。
2. Microcomputer FIG. 2 shows a configuration example of a microcomputer according to the present embodiment that can solve such a problem.

マイクロコンピューターは、クロック供給部10(クロックジェネレーター)と、制御データ生成部20と、CPU30(処理部)と、ROM40と、RAM50(主記憶装置)と、バス60と、第1〜第sのペリフェラルPH1〜PHs(sは自然数)と、を含む。   The microcomputer includes a clock supply unit 10 (clock generator), a control data generation unit 20, a CPU 30 (processing unit), a ROM 40, a RAM 50 (main storage device), a bus 60, and first to s-th peripherals. PH1 to PHs (s is a natural number).

CPU30は、インストラクション処理を行う処理部である。インストラクション処理とは、上述した命令フェッチ、デコード、アドレス計算、実行、レジスター書き込みの一連の処理である。CPU30は、例えば命令デコーダーやレジスター、演算装置(ALU: Arithmetic Logic Unit)等で構成される。CPU30はバス60によりRAM50やペリフェラルPH1〜PHs等の各部と接続されており、そのバス60を介して各部との通信を行う。   The CPU 30 is a processing unit that performs instruction processing. The instruction process is a series of processes including the above-described instruction fetch, decode, address calculation, execution, and register write. The CPU 30 includes, for example, an instruction decoder, a register, an arithmetic unit (ALU: Arithmetic Logic Unit), and the like. The CPU 30 is connected to each unit such as the RAM 50 and the peripherals PH1 to PHs via the bus 60, and communicates with each unit via the bus 60.

ROM40とRAM50はマイクロコンピューターの内部メモリーである。RAM50は、CPU30が処理するプログラムやデータを記憶する主記憶装置(一次記憶装置)として用いられる。   ROM 40 and RAM 50 are internal memories of the microcomputer. The RAM 50 is used as a main storage device (primary storage device) that stores programs and data processed by the CPU 30.

ペリフェラルPH1〜PHsは、マイクロコンピューターの周辺機能を実現する装置であり、例えば、カウンターやタイマー、割り込みコントローラー、シリアルインターフェース(例えばUART: Universal Asynchronous Receiver Transmitter)、ADコンバーター、DAコンバーター、発振回路等である。   The peripherals PH1 to PHs are devices that realize peripheral functions of the microcomputer, such as counters, timers, interrupt controllers, serial interfaces (for example, UART: Universal Asynchronous Receiver Transmitter), AD converters, DA converters, oscillation circuits, etc. .

クロック供給部10は、クロック源から供給されるクロック信号CKS1〜CKSt(tは自然数)を受けて、複数のクロック信号を生成する。クロック源は、例えばマイクロコンピューター外部のクロック生成回路や、マイクロコンピューター内部の発振回路等である。クロック供給部10は、生成したクロック信号CK_PH1〜CK_PHs、CK_SYS、CK_CPUを、それぞれペリフェラルPH1〜PHs、制御データ生成部20、CPU30(及びROM40、RAM50)へ供給する。   The clock supply unit 10 receives clock signals CKS1 to CKSt (t is a natural number) supplied from a clock source and generates a plurality of clock signals. The clock source is, for example, a clock generation circuit outside the microcomputer, an oscillation circuit inside the microcomputer, or the like. The clock supply unit 10 supplies the generated clock signals CK_PH1 to CK_PHs, CK_SYS, and CK_CPU to the peripherals PH1 to PHs, the control data generation unit 20, and the CPU 30 (and the ROM 40 and the RAM 50), respectively.

制御データ生成部20は、インストラクション処理の動作タイミングを変化させる制御データCTLを生成する。CPU30は、その制御データCTLに基づいて動作タイミングが変化するインストラクション処理を行う。   The control data generation unit 20 generates control data CTL that changes the operation timing of the instruction processing. The CPU 30 performs an instruction process in which the operation timing changes based on the control data CTL.

具体的には、制御データ生成部20は、乱数データを発生する乱数発生部21を含み、制御データ生成部20は、その乱数データに基づいて制御データCTLを出力する。クロック供給部10は、その制御データCTLに基づいてクロック信号CK_CPUの周期を変化させる。そして、CPU30は、その周期が変化するクロック信号CK_CPUでインストラクション処理を行うことで、インストラクション処理の動作タイミングを変化させる。   Specifically, the control data generation unit 20 includes a random number generation unit 21 that generates random number data, and the control data generation unit 20 outputs control data CTL based on the random number data. The clock supply unit 10 changes the cycle of the clock signal CK_CPU based on the control data CTL. Then, the CPU 30 changes the operation timing of the instruction processing by performing the instruction processing with the clock signal CK_CPU whose cycle changes.

図3に、本実施形態の動作タイミングチャートを示す。   FIG. 3 shows an operation timing chart of the present embodiment.

制御データ生成部20は、乱数のビット列をMSB側(又はLSB側)から1ビットずつ制御データCTLとして出力する。例えば乱数が16進数の“4”である場合、2進数のビット列では“0100”となるので、制御データCTLは“0”、“1”、“0”、“0”の順に出力される。例えば、図3の例ではクロック信号CK_SYSの2クロック毎に1ビットずつ出力する。   The control data generation unit 20 outputs a bit string of random numbers as control data CTL bit by bit from the MSB side (or LSB side). For example, when the random number is hexadecimal “4”, the binary bit string is “0100”, so that the control data CTL is output in the order of “0”, “1”, “0”, “0”. For example, in the example of FIG. 3, one bit is output every two clocks of the clock signal CK_SYS.

クロック供給部10は、制御データCTLが“0”の場合にはクロック信号CK_CPUを基準の周期で出力する。図3の例では、クロック信号CK_SYSと同一の周期である。一方、制御データCTLが“1”の場合には、基準の周期よりも遅い周期でクロック信号CK_CPUを出力する。図3の例では、基準の周期の半分の周期であり、クロック信号CK_SYSの2つのパルスのうち2つ目のパルスを欠落させる。制御データCTLは乱数データから生成されるので、周期が遅くなるタイミングはランダムである。   When the control data CTL is “0”, the clock supply unit 10 outputs the clock signal CK_CPU at a reference cycle. In the example of FIG. 3, the cycle is the same as that of the clock signal CK_SYS. On the other hand, when the control data CTL is “1”, the clock signal CK_CPU is output at a cycle slower than the reference cycle. In the example of FIG. 3, the period is half of the reference period, and the second pulse of the two pulses of the clock signal CK_SYS is lost. Since the control data CTL is generated from random number data, the timing at which the cycle is delayed is random.

CPU30は、このランダムに周期が変化するクロック信号CK_CPUで動作するので、マイクロコンピューターの消費電流(IDD)の発生タイミングもランダムとなる。具体的には、クロック信号CK_CPUのパルスが欠落したときにはインストラクション処理が次のステップに進まずにウェイト状態となるため、消費電流が小さくなり、そのタイミングがランダムであることによって、命令と消費電流の相関を小さくできる。   Since the CPU 30 operates with the clock signal CK_CPU whose cycle changes at random, the generation timing of the consumption current (IDD) of the microcomputer is also random. Specifically, when the pulse of the clock signal CK_CPU is missing, the instruction process enters the wait state without proceeding to the next step, so that the current consumption is reduced and the timing is random. Correlation can be reduced.

しかしながら、乱数を使うことによって以下のような課題がある。図4に示すように、例えば16進数で“0000”〜“FFFF”の乱数データを発生させた場合、2進数では16ビットのビット列となる。このビット列をそのまま制御データCTLとして使ったとすると、乱数データには“0000”や“FFFF”が含まれるので、最大で“0”又は“1”のビットが16回以上続くことになる。   However, using random numbers has the following problems. As shown in FIG. 4, for example, when random number data of “0000” to “FFFF” is generated in hexadecimal, a 16-bit bit string is generated in binary. If this bit string is used as it is as the control data CTL, the random number data includes “0000” and “FFFF”, and therefore, a maximum of “0” or “1” bits continues 16 times or more.

ビット“0”が続いた場合、その間はCPU30が通常のタイミングで動作するため、命令と消費電流の相関が大きくなる。そのため、消費電流の解析によりアルゴリズムやパスワードをハッキングされる可能性がある。一方、ビット“1”が続いた場合、その間はCPU30の動作周波数が遅くなるため、マイクロコンピューターのパフォーマンス(処理速度)が低下して(又はパフォーマンスにムラが生じて)しまう。   When bit “0” continues, since the CPU 30 operates at a normal timing during that period, the correlation between the instruction and the current consumption increases. Therefore, there is a possibility that an algorithm or a password may be hacked by analyzing the current consumption. On the other hand, when the bit “1” continues, the operating frequency of the CPU 30 becomes slow during that time, and the performance (processing speed) of the microcomputer is lowered (or the performance is uneven).

そこで本実施形態では、制御データ生成部20がコード変換部22を含み、そのコード変換部22が、乱数データを加工して、同一論理のビットが所定数連続して発生しない制御データCTLを生成する。   Therefore, in the present embodiment, the control data generation unit 20 includes a code conversion unit 22, and the code conversion unit 22 processes the random number data to generate control data CTL in which a predetermined number of bits of the same logic are not generated continuously. To do.

図5に、コード変換の例を示す。この例では、乱数データを20ビットのビット列に変換し、“0”又は“1”の同一論理のビットが5回以上連続して発生しないように制御データCTLを生成する。例えば、乱数データが“0000”である場合には最大でビット“0”が3回続くのみであり、乱数データが“FFFF”である場合には最大でビット“1”が3回続くのみである。   FIG. 5 shows an example of code conversion. In this example, the random number data is converted into a 20-bit bit string, and the control data CTL is generated so that the same logic bit of “0” or “1” does not occur five or more times consecutively. For example, when the random number data is “0000”, the bit “0” only lasts 3 times at maximum, and when the random number data is “FFFF”, the bit “1” only lasts 3 times at maximum. is there.

このように、同一論理のビットが長く連続しないように乱数データを加工することで、“0”の連続によるハッキングの可能性と、“1”の連続によるパフォーマンスの低下とを、防ぐことができる。   In this way, by processing the random number data so that bits of the same logic do not continue for a long time, it is possible to prevent the possibility of hacking due to “0” continuity and performance degradation due to “1” continuation. .

より具体的には、コード変換部22は、乱数データを8b10b方式で変換する。8b10b方式は、8ビットのビット列を10ビットのビット列に変換するコード変換法である。本実施形態では、乱数データのMSB側(上位)8ビット、LSB側(下位)8ビットを、それぞれ10ビットに変換し、合わせて20ビットのビット列を生成する。   More specifically, the code conversion unit 22 converts the random number data by the 8b10b method. The 8b10b system is a code conversion method for converting an 8-bit bit string into a 10-bit bit string. In the present embodiment, the MSB side (upper) 8 bits and the LSB side (lower) 8 bits of random number data are converted into 10 bits, respectively, to generate a 20-bit bit string.

8b10b方式では、同一論理のビットが5ビットよりも多く続かないビット列を出力できる。これは、8ビットのビット列を変換した場合に成り立つだけでなく、それを連続させて8×2ビット、8×3ビット、・・・のビット列を変換した場合にも、同一論理のビットは5ビット以下となる。即ち、乱数データの列を変換した制御データCTLのビット列では、どの部分をとっても同一論理のビットを最大で5ビットにできる。図5では、乱数“00”と“FF”の変換例をあげているが、図5に示す例の他に乱数“00”をビット列“1001110100”に変換する場合、乱数“FF”をビット列“1010110001”に変換する場合がある。いずれのビット列に変換するかは、その直前の変換結果に応じて同一ビットが連続しないように決定される。なお、8b10b方式については米国特許4486739に詳細に記載されている。   In the 8b10b system, it is possible to output a bit string in which the same logic bits do not continue more than 5 bits. This is not only true when an 8-bit bit string is converted, but also when a bit string of 8 × 2 bits, 8 × 3 bits,... Below bit. That is, in the bit string of the control data CTL obtained by converting the random number data string, the same logic bit can be set to 5 bits at the maximum regardless of the portion. FIG. 5 shows an example of conversion between the random numbers “00” and “FF”. However, when the random number “00” is converted into the bit string “1001110100” in addition to the example shown in FIG. 1010110001 "in some cases. The bit string to be converted is determined so that the same bits do not continue according to the conversion result immediately before. The 8b10b system is described in detail in US Pat. No. 4,486,739.

なお、コード変換の手法は上記に限定されない。即ち、乱数発生部21は、nビット(nは2≦nの自然数)の乱数データを発生し、コード変換部22は、同一論理のビットがjビット(jは2≦j<nの自然数)連続して発生しないように乱数データを加工して、mビット(mはn<mの自然数)の制御データCTLを生成すればよい。   The code conversion method is not limited to the above. That is, the random number generator 21 generates random data of n bits (n is a natural number of 2 ≦ n), and the code converter 22 has j bits of the same logic (j is a natural number of 2 ≦ j <n). The random number data is processed so as not to be generated continuously, and m-bit (m is a natural number where n <m) control data CTL may be generated.

このようなコード変換を用いることで、制御データCTLにおいて同一論理が続くビット数は、乱数データのビット数nよりも少ないビット数jとなる。即ち、乱数データのビット列をそのまま用いる場合よりも、同一論理が連続するビット数を少なくできるため、命令と消費電流の相関を減らすと共にパフォーマンスの低下を防ぐことができる。   By using such code conversion, the number of bits in which the same logic continues in the control data CTL becomes the number of bits j smaller than the number of bits n of the random number data. That is, since the number of consecutive bits of the same logic can be reduced as compared with the case where the bit string of the random number data is used as it is, it is possible to reduce the correlation between the instruction and the current consumption and to prevent the performance from being deteriorated.

3.動作タイミングを変更する手法の変形例
以上の実施形態では、CPU30に供給するクロック信号CK_CPUの周期を変更することでCPU30の動作タイミングを変更したが、動作タイミングの変更手法はこれに限定されない。
3. Modification of Method for Changing Operation Timing In the above embodiment, the operation timing of CPU 30 is changed by changing the cycle of clock signal CK_CPU supplied to CPU 30, but the method for changing the operation timing is not limited to this.

図6に、バスアクセスのタイミングを変更する場合のマイクロコンピューターの構成例を示す。   FIG. 6 shows a configuration example of a microcomputer when changing the bus access timing.

マイクロコンピューターは、クロック供給部10と、制御データ生成部20と、CPU30と、ROM40と、RAM50と、バス60と、バスコントロールユニット70と、第1〜第sのペリフェラルPH1〜PHsと、を含む。なお、既に上述した構成要素と同一の構成要素については同一の符号を付し、適宜説明を省略する。   The microcomputer includes a clock supply unit 10, a control data generation unit 20, a CPU 30, a ROM 40, a RAM 50, a bus 60, a bus control unit 70, and first to s-th peripherals PH1 to PHs. . In addition, the same code | symbol is attached | subjected about the component same as the component already mentioned above, and description is abbreviate | omitted suitably.

バスコントロールユニット70は、データバスやアドレスバス等で構成されるバス60を介した通信を制御するものである。この制御によって、CPU30と各部との間のデータ転送や制御が可能となる。本構成例では、バスコントロールユニット70は、CPU30がバス60にアクセスする際のアクセスタイミングを変化させる。   The bus control unit 70 controls communication via the bus 60 constituted by a data bus, an address bus, or the like. This control enables data transfer and control between the CPU 30 and each unit. In this configuration example, the bus control unit 70 changes the access timing when the CPU 30 accesses the bus 60.

具体的には、制御データ生成部20は、上述したビット列の制御データCTLをバスコントロールユニット70に出力する。バスコントロールユニット70は、制御データCTLが“0”の場合にはアクセスタイミングを変更せずに通常の制御を行い、制御データCTLが“1”の場合にはアクセスタイミングを遅らせる。   Specifically, the control data generation unit 20 outputs the above-described bit string control data CTL to the bus control unit 70. The bus control unit 70 performs normal control without changing the access timing when the control data CTL is “0”, and delays the access timing when the control data CTL is “1”.

例えば、CPU30が命令を実行する際にRAM50(主記憶装置)からデータを読み出すとする。この場合、CPU30はバス60を介してRAM50にアクセスするが、制御データCTLが“1”の場合にはバスコントロールユニット70が、そのアクセスタイミングを遅らせる。例えば、CPU30からアクセス要求を受けてから、実際にRAM50にアクセスするまでの時間を遅延させる。或いは、一時的にビジー信号をCPU30に返すことによって、実質的にアクセスタイミングを変更する。   For example, it is assumed that data is read from the RAM 50 (main storage device) when the CPU 30 executes an instruction. In this case, the CPU 30 accesses the RAM 50 via the bus 60, but when the control data CTL is "1", the bus control unit 70 delays the access timing. For example, the time from when the access request is received from the CPU 30 to when the RAM 50 is actually accessed is delayed. Alternatively, the access timing is substantially changed by temporarily returning a busy signal to the CPU 30.

本実施形態によれば、バス60を介してRAM50やペリフェラルPH1〜PHsにアクセスする命令を実行する場合には、上記のようにして乱数によりアクセスタイミングがランダムに変更される。これにより、インストラクション処理のタイミングがランダムに変更されることになるため、命令と消費電流の相関を減らすことができる。   According to the present embodiment, when an instruction to access the RAM 50 and the peripherals PH1 to PHs is executed via the bus 60, the access timing is randomly changed by the random number as described above. As a result, the timing of the instruction processing is randomly changed, so that the correlation between the instruction and the current consumption can be reduced.

4.クロック供給部、制御データ生成部
図7に、クロック供給部10及び制御データ生成部20の詳細な構成例を示す。
4). Clock Supply Unit and Control Data Generation Unit FIG. 7 shows a detailed configuration example of the clock supply unit 10 and the control data generation unit 20.

クロック供給部10は、クロックギア出力部170と、クロックギア選択レジスター180と、クロック生成部190と、を含む。制御データ生成部20は、オンオフ制御レジスター110と、16ビット乱数発生部120と、分周部130と、第1の8b10b変換部140と、第2の8b10b変換部150と、セレクター160と、を含む。   The clock supply unit 10 includes a clock gear output unit 170, a clock gear selection register 180, and a clock generation unit 190. The control data generation unit 20 includes an on / off control register 110, a 16-bit random number generation unit 120, a frequency division unit 130, a first 8b10b conversion unit 140, a second 8b10b conversion unit 150, and a selector 160. Including.

オンオフ制御レジスター110には、制御データ生成のイネーブル/ディスエーブル信号が設定される。イネーブルが設定された場合には制御データ生成部20はランダムな制御データCTLを生成し、ディスエーブルが設定された場合には制御データ生成部20は“0”を制御データCTLとして出力する。   The ON / OFF control register 110 is set with an enable / disable signal for generating control data. When the enable is set, the control data generation unit 20 generates random control data CTL, and when the disable is set, the control data generation unit 20 outputs “0” as the control data CTL.

分周部130は、クロック信号CK_CPUを40分周するカウンターであり、40カウント毎にシフト制御信号を16ビット乱数発生部120に出力する。   The frequency divider 130 is a counter that divides the clock signal CK_CPU by 40, and outputs a shift control signal to the 16-bit random number generator 120 every 40 counts.

16ビット乱数発生部120は、分周部130からのシフト制御信号を受け取った場合に16ビットの乱数データを更新する。16ビット乱数発生部120は、例えば線形帰還シフトレジスター(LFSR: linear feedback shift register)で構成される。   The 16-bit random number generator 120 updates the 16-bit random number data when receiving the shift control signal from the frequency divider 130. The 16-bit random number generation unit 120 is configured by, for example, a linear feedback shift register (LFSR).

第1の8b10b変換部140は、16ビットの乱数データのうちのMSB側の8ビットの第1の乱数データを8b10b方式でコード変換し、20ビットの変換データのうちのMSB側の10ビットの第1の変換データとして出力する。第2の8b10b変換部150は、16ビットの乱数データのうちのLSB側の8ビットの第2の乱数データを8b10b方式でコード変換し、20ビットの変換データのうちのLSB側の10ビットの第2の変換データとして出力する。   The first 8b10b conversion unit 140 performs code conversion on the MSB side 8-bit first random number data of the 16-bit random number data by the 8b10b method, and the MSB side 10-bit of the 20-bit conversion data. Output as first conversion data. The second 8b10b conversion unit 150 performs code conversion on the LSB side 8-bit second random number data of the 16-bit random number data by the 8b10b method, and the LSB side 10-bit of the 20-bit conversion data. Output as second conversion data.

セレクター160は、分周部130のカウント値に基づいて20ビットの変換データをLSB側から1ビットずつ選択し、制御データCTLとして出力する。分周部130のカウント値は10進数で“0”〜“39”であり、セレクター160は2カウント毎に1ビットを選択する。   The selector 160 selects 20-bit converted data bit by bit from the LSB side based on the count value of the frequency divider 130 and outputs it as control data CTL. The count value of the frequency divider 130 is a decimal number from “0” to “39”, and the selector 160 selects one bit every two counts.

クロックギア選択レジスター180には、クロック信号CK_SYSとクロック信号CK_CPUの周波数比(ギア比)を選択する信号が設定される。例えば、設定値0、1、2、3が設定された場合、周波数比は1/1、1/2、1/4、1/8が設定される。   In the clock gear selection register 180, a signal for selecting a frequency ratio (gear ratio) between the clock signal CK_SYS and the clock signal CK_CPU is set. For example, when setting values 0, 1, 2, and 3 are set, the frequency ratio is set to 1/1, 1/2, 1/4, and 1/8.

クロックギア出力部170は、制御データCTLが“0”(第2の論理レベル)の場合には、クロックギア選択レジスター180の設定値をそのまま出力し、制御データCTLが“1”(第1の論理レベル)の場合には、クロックギア選択レジスター180の設定値に1を加算して出力する。   When the control data CTL is “0” (second logic level), the clock gear output unit 170 outputs the set value of the clock gear selection register 180 as it is, and the control data CTL is “1” (first logic level). (Logic level), 1 is added to the set value of the clock gear selection register 180 and output.

クロック生成部190は、クロックギア出力部170からの設定値に対応する周波数比でクロック信号CK_SYSを減速し、クロック信号CK_CPUを出力する。例えば、クロックギア選択レジスター180の設定値が0の場合、制御データCTLが“0”であればクロックギア出力部170は設定値0を出力するので、クロック生成部190はクロック信号CK_SYSと同じ周波数のクロック信号CK_CPUを出力する。一方、制御データCTLが“1”であればクロックギア出力部170は設定値0+1=1を出力するので、クロック生成部190はクロック信号CK_SYSの1/2の周波数のクロック信号CK_CPUを出力する。   The clock generation unit 190 decelerates the clock signal CK_SYS at a frequency ratio corresponding to the set value from the clock gear output unit 170, and outputs the clock signal CK_CPU. For example, when the setting value of the clock gear selection register 180 is 0, if the control data CTL is “0”, the clock gear output unit 170 outputs the setting value 0, so the clock generation unit 190 has the same frequency as the clock signal CK_SYS. The clock signal CK_CPU is output. On the other hand, if the control data CTL is “1”, the clock gear output unit 170 outputs the set value 0 + 1 = 1, so that the clock generation unit 190 outputs the clock signal CK_CPU having a frequency ½ of the clock signal CK_SYS.

以上のようにして、20ビットの変換データの中からセレクター160が1ビットずつ選択することで制御データCTLを生成できる。そして、制御データCTLが“1”(第1の論理レベル)の場合にクロック信号CK_CPUの周期を増加させ、ランダムに周期が変化するクロック信号CK_CPUを生成できる。   As described above, the control data CTL can be generated by the selector 160 selecting bit by bit from the 20-bit conversion data. Then, when the control data CTL is “1” (first logic level), the cycle of the clock signal CK_CPU can be increased to generate the clock signal CK_CPU whose cycle changes at random.

また、8b10b方式は8ビットのデータを変換する手法であるが、その入力として8ビットの乱数データを用いた場合、乱数の数が限られてしまう。この点、16ビットの乱数データを発生し、そのMSB側の8ビットとLSB側の8ビットをそれぞれ8b10b方式でコード変換することで、乱数の数を確保し、制御データのランダム性を上げることができる。   The 8b10b method is a method for converting 8-bit data. However, when 8-bit random number data is used as the input, the number of random numbers is limited. In this regard, 16-bit random number data is generated, and the MSB side 8 bits and LSB side 8 bits are code-converted by the 8b10b method, respectively, to secure the number of random numbers and increase the randomness of the control data. Can do.

図8に、上記のクロック供給部10及び制御データ生成部20の動作タイミングチャートを示す。   FIG. 8 shows an operation timing chart of the clock supply unit 10 and the control data generation unit 20 described above.

A1に示すように、分周部130は、クロック信号CK_CPUの立ち上がりでカウント値count40をカウントアップする。A2に示すように、分周部130は、カウント値count40が0の場合にシフト制御信号shift_enをアクティブ(Hレベル)にする。A3に示すように、16ビット乱数発生部120は、シフト制御信号shift_enの立ち下がりで乱数データLFSRout[15:0]を更新する。A4に示すように、第1の8b10b変換部140及び第2の8b10b変換部150は、乱数データLFSRout[15:0]を変換データ8b10boutに変換する。   As indicated by A1, the frequency divider 130 counts up the count value count40 at the rising edge of the clock signal CK_CPU. As indicated by A2, the frequency divider 130 activates the shift control signal shift_en (H level) when the count value count40 is zero. As shown in A3, the 16-bit random number generator 120 updates the random number data LFSRout [15: 0] at the falling edge of the shift control signal shift_en. As shown in A4, the first 8b10b converter 140 and the second 8b10b converter 150 convert the random number data LFSRout [15: 0] into converted data 8b10bout.

A5に示すように、セレクター160は、例えばカウント値count40が34、35のときに位置(bit position)17のビットを選択する。ビット位置は0〜19で指定されるので、ビット位置17はLSB側から18番目であり、制御データCTLは“0”となる。A6に示すように、クロックギア選択レジスター180の設定値cgear_r_in[1:0]が0の場合、A7に示すように、クロックギア出力部170は、設定値cgear_r_out[1:0]=0を出力する。   As shown in A5, the selector 160 selects the bit at the position (bit position) 17 when the count value count40 is 34 or 35, for example. Since the bit position is designated by 0 to 19, the bit position 17 is the 18th from the LSB side, and the control data CTL is “0”. As shown in A6, when the setting value cgear_r_in [1: 0] of the clock gear selection register 180 is 0, the clock gear output unit 170 outputs the setting value cgear_r_out [1: 0] = 0 as shown in A7. To do.

A8に示すように、次のビット位置18(LSB側から19番目)では制御データCTLは“1”となる。A9に示すように、クロックギア出力部170は、設定値cgear_r_out[1:0]=1を出力する。設定値cgear_r_out[1:0]が0から1に変化するのは、A10に示すクロック信号CK_CPUの立ち上がりである。その次のA11に示す立ち上がりで、クロック生成部190は周波数比を切り替える。即ち、実際にクロック信号CK_CPUの周期が変わるのは、制御データCTLの論理レベルが変わってから、1クロック後である。   As indicated by A8, the control data CTL is “1” at the next bit position 18 (19th from the LSB side). As indicated by A9, the clock gear output unit 170 outputs the set value cgear_r_out [1: 0] = 1. The set value cgear_r_out [1: 0] changes from 0 to 1 at the rise of the clock signal CK_CPU indicated by A10. At the next rising edge indicated by A11, the clock generation unit 190 switches the frequency ratio. That is, the cycle of the clock signal CK_CPU actually changes after one clock from the change of the logic level of the control data CTL.

5.電子機器
図9、図10に、本実施形態のマイクロコンピューターを適用できる電子機器の構成例を示す。なお以下ではセキュリティートークンに適用した場合を例に説明するが、これに限定されず、本実施形態のマイクロコンピューターは種々の電子機器に適用できる。
5. Electronic Device FIGS. 9 and 10 show configuration examples of electronic devices to which the microcomputer of this embodiment can be applied. In the following description, the case where the present invention is applied to a security token will be described as an example. However, the present invention is not limited to this, and the microcomputer of this embodiment can be applied to various electronic devices.

電子機器200は、表示部210、マイクロコンピューター220(集積回路装置)、操作部230、記憶部240、通信部250を含む。   The electronic device 200 includes a display unit 210, a microcomputer 220 (integrated circuit device), an operation unit 230, a storage unit 240, and a communication unit 250.

マイクロコンピューター220は、ユーザーが電子機器200に対して特定の操作を行った場合に、ワンタイムパスワード等のセキュリティー情報を演算し、そのセキュリティー情報を表示部210に表示させる。   When the user performs a specific operation on the electronic device 200, the microcomputer 220 calculates security information such as a one-time password and causes the display unit 210 to display the security information.

例えば、サーバーとの同期を行うタイプのトークンの場合、ユーザーが端末と電子機器200を接触又は非接触の通信で接続すると、通信部250が端末と通信してサーバーから例えば鍵情報を取得し、マイクロコンピューター220は、その鍵情報を用いてセキュリティー情報を演算する。   For example, in the case of a token that is synchronized with the server, when the user connects the terminal and the electronic device 200 by contact or non-contact communication, the communication unit 250 communicates with the terminal to acquire, for example, key information from the server, The microcomputer 220 calculates security information using the key information.

或いは、単独でセキュリティー情報を発行するトークンの場合、記憶部240に例えば共通鍵情報が記憶されており、ユーザーが操作部230を操作する(例えばボタンを押す)と、マイクロコンピューター220は、記憶部240から共通鍵情報を読み出し、その共通鍵情報を用いてセキュリティー情報を演算する。   Alternatively, in the case of a token that issues security information independently, for example, common key information is stored in the storage unit 240, and when the user operates the operation unit 230 (for example, presses a button), the microcomputer 220 The common key information is read from 240, and the security information is calculated using the common key information.

なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。また本実施形態及び変形例の全ての組み合わせも、本発明の範囲に含まれる。またクロック供給部、制御データ生成部、CPU、マイクロコンピューター、電子機器の構成・動作等も、本実施形態で説明したものに限定されず、種々の変形実施が可能である。   Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, a term described at least once together with a different term having a broader meaning or the same meaning in the specification or the drawings can be replaced with the different term in any part of the specification or the drawings. All combinations of the present embodiment and the modified examples are also included in the scope of the present invention. The configuration and operation of the clock supply unit, the control data generation unit, the CPU, the microcomputer, and the electronic device are not limited to those described in this embodiment, and various modifications can be made.

10 クロック供給部、20 制御データ生成部、21 乱数発生部、
22 コード変換部、30 CPU、40 ROM、50 RAM、60 バス、
70 バスコントロールユニット、110 オンオフ制御レジスター、
130 分周部、140 第1の8b10b変換部、
150 第2の8b10b変換部、160 セレクター、
170 クロックギア出力部、180 クロックギア選択レジスター、
190 クロック生成部、200 電子機器、210 表示部、
220 マイクロコンピューター、230 操作部、240 記憶部、
250 通信部、
CK_CPU,CK_SYS クロック信号、CTL 制御データ、
IDD 消費電流
10 clock supply unit, 20 control data generation unit, 21 random number generation unit,
22 code conversion unit, 30 CPU, 40 ROM, 50 RAM, 60 bus,
70 bus control unit, 110 on / off control register,
130 divider, 140 first 8b10b converter,
150 second 8b10b converter, 160 selector,
170 clock gear output section, 180 clock gear selection register,
190 clock generation unit, 200 electronic device, 210 display unit,
220 microcomputer, 230 operation unit, 240 storage unit,
250 communications department,
CK_CPU, CK_SYS clock signal, CTL control data,
IDD current consumption

Claims (7)

インストラクション処理を行う処理部と、
前記インストラクション処理の動作タイミングを変化させる制御データを生成する制御データ生成部と、
を含み、
前記制御データ生成部は、
乱数データを発生する乱数発生部と、
前記乱数データを8b10b方式で変換することで、同一論理のビットが所定数連続して発生しない前記制御データを生成する8b10b変換部を含むコード変換部と、
を有し、
前記処理部は、
前記制御データに基づいて前記動作タイミングが変化する前記インストラクション処理を行うことを特徴とするマイクロコンピューター。
A processing unit for performing an instruction process;
A control data generating unit for generating control data for changing the operation timing of the instruction processing;
Including
The control data generation unit
A random number generator for generating random data;
A code conversion unit including an 8b10b conversion unit that generates the control data in which a predetermined number of bits of the same logic are not generated consecutively by converting the random number data by the 8b10b method;
Have
The processor is
A microcomputer that performs the instruction process in which the operation timing changes based on the control data.
請求項1において、
前記制御データに基づいて周期を変化させたクロック信号を前記処理部に供給するクロック供給部を含み、
前記処理部が、前記クロック供給部からの前記クロック信号に基づいて前記インストラクション処理を行うことで、前記インストラクション処理の前記動作タイミングが変化することを特徴とするマイクロコンピューター。
In claim 1,
A clock supply unit that supplies the processing unit with a clock signal having a cycle changed based on the control data;
The microcomputer in which the operation timing of the instruction processing is changed by the processing unit performing the instruction processing based on the clock signal from the clock supply unit.
請求項2において、
前記クロック供給部は、
前記制御データが第1の論理レベルの場合に前記クロック信号の周期を増加させることを特徴とするマイクロコンピューター。
In claim 2,
The clock supply unit
A microcomputer for increasing the period of the clock signal when the control data is at a first logic level.
請求項1において、
バスコントロールユニットを含み、
前記バスコントロールユニットが、前記処理部がバスにアクセスする際のアクセスタイミングを前記制御データに基づいて変化させることで、前記インストラクション処理の前記動作タイミングが変化することを特徴とするマイクロコンピューター。
In claim 1,
Including bus control unit,
The microcomputer in which the bus control unit changes the operation timing of the instruction processing by changing an access timing when the processing unit accesses the bus based on the control data.
インストラクション処理を行う処理部と、
前記インストラクション処理の動作タイミングを変化させる制御データを生成する制御データ生成部と、
を含み、
前記制御データ生成部は、
nビット(nは2≦nの自然数)の乱数データを発生する乱数発生部と、
前記乱数データを加工して、同一論理のビットが所定数連続して発生しない前記制御データを生成するコード変換部と、
を有し、
前記コード変換部は、
前記nビットの乱数データのうちのMSB側のn/2ビットの第1の乱数データが入力される第1の8b10b変換部と、
前記nビットの乱数データのうちのLSB側のn/2ビットの第2の乱数データが入力される第2の8b10b変換部と、
前記第1の8b10b変換部からの第1の変換データと、前記第2の8b10b変換部からの第2の変換データと、で構成される変換データから順次1ビットずつ選択して前記制御データとして出力するセレクターと、
を有し、
前記処理部は、
前記制御データに基づいて前記動作タイミングが変化する前記インストラクション処理を行うことを特徴とするマイクロコンピューター。
A processing unit for performing an instruction process;
A control data generating unit for generating control data for changing the operation timing of the instruction processing;
Including
The control data generation unit
a random number generator for generating random data of n bits (n is a natural number of 2 ≦ n);
A code conversion unit that processes the random number data and generates the control data that does not continuously generate a predetermined number of bits of the same logic;
Have
The code converter is
A first 8b10b conversion unit to which n / 2-bit first random number data on the MSB side of the n-bit random number data is input;
A second 8b10b converter to which n / 2-bit second random number data on the LSB side of the n-bit random number data is input;
The control data is selected one by one from the conversion data composed of the first conversion data from the first 8b10b conversion unit and the second conversion data from the second 8b10b conversion unit. A selector to output,
Have
The processor is
A microcomputer that performs the instruction process in which the operation timing changes based on the control data.
請求項5において、
前記処理部にクロック信号を供給するクロック供給部を含み、
前記クロック供給部は、
前記セレクターにより選択されたビットが第1の論理レベルの場合、前記クロック信号の周期を増加させることを特徴とするマイクロコンピューター。
In claim 5,
A clock supply unit for supplying a clock signal to the processing unit;
The clock supply unit
A microcomputer that increases the period of the clock signal when a bit selected by the selector has a first logic level.
請求項1乃至のいずれかに記載されたマイクロコンピューターを含むことを特徴とする電子機器。 An electronic apparatus comprising a microcomputer according to any of claims 1 to 6.
JP2014035037A 2014-02-26 2014-02-26 Microcomputer and electronic equipment Active JP6323065B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2014035037A JP6323065B2 (en) 2014-02-26 2014-02-26 Microcomputer and electronic equipment
CN201510088930.1A CN104866007A (en) 2014-02-26 2015-02-26 Microcomputer and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014035037A JP6323065B2 (en) 2014-02-26 2014-02-26 Microcomputer and electronic equipment

Publications (2)

Publication Number Publication Date
JP2015161969A JP2015161969A (en) 2015-09-07
JP6323065B2 true JP6323065B2 (en) 2018-05-16

Family

ID=53911902

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014035037A Active JP6323065B2 (en) 2014-02-26 2014-02-26 Microcomputer and electronic equipment

Country Status (2)

Country Link
JP (1) JP6323065B2 (en)
CN (1) CN104866007A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10958414B2 (en) * 2016-02-23 2021-03-23 Google Llc Clock period randomization for defense against cryptographic attacks

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0790557A2 (en) * 1996-02-14 1997-08-20 Matsushita Electric Industrial Co., Ltd. Task managemant apparatus
FR2745924B1 (en) * 1996-03-07 1998-12-11 Bull Cp8 IMPROVED INTEGRATED CIRCUIT AND METHOD FOR USING SUCH AN INTEGRATED CIRCUIT
JP3827050B2 (en) * 1999-03-09 2006-09-27 株式会社ルネサステクノロジ IC card and semiconductor integrated circuit device
CN1305177A (en) * 2000-12-08 2001-07-25 后健慈 Control method for making operation mode of integrated circuit uncertain
FR2821181A1 (en) * 2001-02-22 2002-08-23 Schlumberger Systems & Service METHOD FOR CREATING RANDOM VALUES BY A MODULE ASSOCIATED WITH A MICROPROCESSOR
JP2003018143A (en) * 2001-06-28 2003-01-17 Mitsubishi Electric Corp Information processor
US7149764B2 (en) * 2002-11-21 2006-12-12 Ip-First, Llc Random number generator bit string filter
JP4546339B2 (en) * 2005-06-29 2010-09-15 キヤノン株式会社 Random number generation apparatus and random number generation method
KR101402392B1 (en) * 2010-08-03 2014-06-03 어드밴테스트 (싱가포르) 피티이. 엘티디. Bit sequence generator
CN103324467B (en) * 2013-05-28 2015-09-16 戴葵 A kind of anti-bypass attack processor architecture postponed based on stochastic instruction

Also Published As

Publication number Publication date
JP2015161969A (en) 2015-09-07
CN104866007A (en) 2015-08-26

Similar Documents

Publication Publication Date Title
US20190146944A1 (en) Dynamically adjustable multi-line bus shared by multi-protocol devices
US6145076A (en) System for executing nested software loops with tracking of loop nesting level
TW201640359A (en) N-base numbers to physical wire states symbols translation method
US11843379B2 (en) Fractional frequency divider and flash memory controller
JP6323065B2 (en) Microcomputer and electronic equipment
CN108027719B (en) Random clock generator
JP5171420B2 (en) Pseudo random number generator
US8762439B2 (en) System and method for random number generation using asynchronous boundaries and phase locked loops
JP4567753B2 (en) Parity generation circuit, counting circuit, and counting method
JP2004303235A (en) On-chip clock generator allowing rapid change of on-chip clock frequency
JP5031797B2 (en) Touch panel drive device and touch panel device
US9209792B1 (en) Clock selection system and method
JP2001237826A (en) Parallel random pattern generating circuit, and scramble circuit and descramble circuit using it
CN111158758B (en) Method and device for waking up central processing unit
JP3701100B2 (en) Clock generation circuit and clock generation method
JPH08139575A (en) Pulse output circuit
JP2010140419A (en) Random number generator and pseudo random number generator
TW201447535A (en) Power saving device and power saving method thereof
US9024699B2 (en) Numerically-controlled oscillator
JP2017501493A (en) CCIe receiver logic register write using only receiver clock
RU2660831C1 (en) Converter binary code - probabilistic display
KR20020078190A (en) Apparatus and method for generating clock of variable frequencies for information processing systems
KR0157153B1 (en) Random number generator
JPH05250269A (en) Memory access system and information processor
JP2536490B2 (en) Run-length encoding device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20160617

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20160627

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171010

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171024

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171221

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20171221

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20171221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180228

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180313

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180326

R150 Certificate of patent or registration of utility model

Ref document number: 6323065

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150