JP2021086506A - System and programmable sequencer - Google Patents
System and programmable sequencer Download PDFInfo
- Publication number
- JP2021086506A JP2021086506A JP2019216757A JP2019216757A JP2021086506A JP 2021086506 A JP2021086506 A JP 2021086506A JP 2019216757 A JP2019216757 A JP 2019216757A JP 2019216757 A JP2019216757 A JP 2019216757A JP 2021086506 A JP2021086506 A JP 2021086506A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- execution
- polling
- unit
- jump
- 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.)
- Pending
Links
- 230000004044 response Effects 0.000 claims abstract description 19
- 230000003252 repetitive effect Effects 0.000 claims description 31
- 238000012546 transfer Methods 0.000 claims description 18
- 206010048669 Terminal state Diseases 0.000 description 22
- 238000001514 detection method Methods 0.000 description 22
- 238000000034 method Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 16
- 238000012545 processing Methods 0.000 description 16
- 230000007704 transition Effects 0.000 description 15
- 102100021624 Acid-sensing ion channel 1 Human genes 0.000 description 11
- 101710099904 Acid-sensing ion channel 1 Proteins 0.000 description 11
- 230000009471 action Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 8
- 238000011161 development Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 101100217231 Caenorhabditis elegans asic-1 gene Proteins 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Landscapes
- Executing Machine-Instructions (AREA)
- Programmable Controllers (AREA)
Abstract
Description
本願は、システム、及びプログラマブルシーケンサに関する。 The present application relates to systems and programmable sequencers.
従来、メインCPU(Central Processing Unit)に代えて、専用ステートマシン又はサブCPUを用いて特定の処理を実行する技術が知られている。 Conventionally, there is known a technique of executing a specific process by using a dedicated state machine or a sub CPU instead of the main CPU (Central Processing Unit).
しかし、専用ステートマシンを使用する方法では、開発工数が大きい上に、仕様変更発生時の対応工数も大きくなる場合がある。またサブCPUを使用する方法では、必要な処理内容が単純な場合に、数値演算部や割り込み処理部、キャッシュ等の過剰な機能をサブCPUが備えることで回路規模が無駄に大きくなる場合がある。さらにサブCPUのソフトウェア開発環境を準備することが望ましいため、開発環境の習熟や維持に工数がかかる場合がある。 However, in the method using a dedicated state machine, not only the development man-hours are large, but also the man-hours for dealing with specification changes may be large. Further, in the method using a sub CPU, when the required processing content is simple, the circuit scale may become unnecessarily large because the sub CPU is provided with excessive functions such as a numerical calculation unit, an interrupt processing unit, and a cache. .. Furthermore, since it is desirable to prepare a software development environment for the sub CPU, it may take man-hours to master and maintain the development environment.
これに対し、回路規模の大型化を抑制するために、汎用マイコンのCPUとROM(Read Only Memory)の構成をシーケンサで置き換えるものが開示されている(例えば、特許文献1参照)。またプログラミング作業を効率化するために、モーション制御用プログラミング言語と、シーケンス制御用プログラミング言語を相互変換する技術が開示されている(例えば、特許文献2参照)。 On the other hand, in order to suppress an increase in the circuit scale, a sequencer replaces the CPU and ROM (Read Only Memory) configuration of a general-purpose microcomputer with a sequencer (see, for example, Patent Document 1). Further, in order to improve the efficiency of programming work, a technique for mutually converting a motion control programming language and a sequence control programming language is disclosed (see, for example, Patent Document 2).
しかしながら、特許文献1の構成では、演算器やレジスタ構造に汎用マイコンの構成を引き継ぐため、汎用マイコンの機能が過剰な場合に回路規模が無駄に大きくなる場合がある。また特許文献2の方法では回路規模の削減方法が開示されていないため、回路規模の大型化を抑制できない。 However, in the configuration of Patent Document 1, since the configuration of the general-purpose microcomputer is inherited by the arithmetic unit and the register structure, the circuit scale may become unnecessarily large when the functions of the general-purpose microcomputer are excessive. Further, since the method of Patent Document 2 does not disclose the method of reducing the circuit scale, it is not possible to suppress the increase in the circuit scale.
本発明は、回路規模の大型化を抑制することを課題とする。 An object of the present invention is to suppress an increase in the scale of a circuit.
本発明の一態様に係るシステムは、複数の実行命令を含む実行命令群を格納する格納部と、読み出した前記実行命令に応答した動作を実行するプログラマブルシーケンサと、を備え、前記プログラマブルシーケンサは、ポーリング実行命令に応答してポーリング動作を実行するポーリング実行部、又は繰り返しジャンプ実行命令に応答して繰り返しジャンプ動作を実行する繰り返しジャンプ実行部の少なくとも一方を備える。 A system according to one aspect of the present invention includes a storage unit that stores an execution instruction group including a plurality of execution instructions, and a programmable sequencer that executes an operation in response to the read execution instruction. It includes at least one of a polling execution unit that executes a polling operation in response to a polling execution instruction and a repetitive jump execution unit that executes a repetitive jump operation in response to a repetitive jump execution instruction.
本発明によれば、回路規模の大型化を抑制できる。 According to the present invention, it is possible to suppress an increase in the circuit scale.
以下、図面を参照して発明を実施するための形態について説明する。各図面において、同一の構成部分には同一符号を付し、重複した説明を省略する場合がある。 Hereinafter, modes for carrying out the invention will be described with reference to the drawings. In each drawing, the same components may be designated by the same reference numerals and duplicate description may be omitted.
以下では、プログラマブルシーケンサの一例であるシーケンサ100を備え、ファクシミリモデム用のアナログフロントエンドデバイスや、専用の画像処理デバイス等のレガシーデバイス30の制御機能を集積したASIC(Application Specific Integrated Circuit)1を「システム」の一例として実施形態を説明する。
In the following, an ASIC (Application Specific Integrated Circuit) 1 that includes a
[第1実施形態]
<ASIC1の構成例>
図1は、ASIC1の構成の一例を示すブロック図である。
[First Embodiment]
<Configuration example of ASIC1>
FIG. 1 is a block diagram showing an example of the configuration of ASIC1.
図1に示すように、ASIC1は、レガシーデバイス制御部10と、メインCPU(Central Processing Unit)21と、サブCPU22と、DDR(Double Data Rate)コントローラ23と、汎用DMAC(Direct Memory Access Controller)24と、ストレージ制御部25とを備えている。これらは共通バス20を介して相互に電気的に接続されている。
As shown in FIG. 1, the ASIC 1 includes a legacy
レガシーデバイス制御部10は、レガシーデバイス30を制御する機能を有し、流用モジュール11と、I/F端子12と、シーケンサ100と、ROM14と、ワーク領域15と、FIFO(First In Firest Out)16と、制御レジスタ17とを備えている。
The legacy
またレガシーデバイス制御部10は、ローカルバス13及び共通バス20を介して、メインCPU21及びサブCPU22等の上位システムとの間でデータを送受信できるようになっている。
Further, the legacy
流用モジュール11はレガシーデバイス30の制御を実行するが、流用モジュール11自体の制御は別モジュールにより行われる必要がある。この流用モジュール11の制御をメインCPU21やサブCPU22等の上位システムが行う場合、流用モジュール11の仕様によっては、流用モジュール11の制御がシステム上の制約となり、他の処理とのスケジューリングが困難になる場合がある。
The
システム上の制約となる流用モジュール11の仕様には、バス占有時間や、データ転送プロトコル、割り込み処理等が挙げられる。バス占有時間が長いために1回のアクセスに時間を要するという制約が生じる場合がある。またデータ転送プロトコルが複雑なため、単純なDMACでは制御できずにメインCPU21及びサブCPU22が直接制御することが好ましかったり、少量のデータ転送の度に割り込み処理が必要になったりするという制約が生じる場合がある。
The specifications of the
これに対してシーケンサ100は、上位システムであるメインCPU21及びサブCPU22の代わりに流用モジュール11の制御を実行する。メインCPU21及びサブCPU22は、流用モジュール11を直接制御せず、シーケンサ100を介して制御することで、流用モジュール11の仕様に起因する制約を回避できるようになっている。
On the other hand, the
例えば、データをレガシーデバイス30に送信する場合、メインCPU21及びサブCPU22はまとまったデータをFIFO16に溜めておき、シーケンサ100がFIFO16に溜まったデータを流用モジュール11用の複雑なプロトコルに従って送信する。これにより、メインCPU21及びサブCPU22側からは、流用モジュール11用の複雑な制御の実行を回避できる。
For example, when transmitting data to the
レガシーデバイス30からデータを受信する場合には、シーケンサ100が流用モジュール11の複雑なプロトコルに従ってデータを受信後にFIFO16に蓄積し、メインCPU21及びサブCPU22は、FIFO16に蓄積されたデータをリードするだけで、レガシーデバイス30からのデータを受信できるようになっている。
When receiving data from the
シーケンサ100は、ローカルバス13を介して各種スレーブデバイスにアクセスするローカルバス用マスターポート1061と、直接アクセス可能なダイレクトバス用マスターポート1051とを備えている。
The
シーケンサ100がアクセス可能な範囲は、ローカルバス13に接続された全てのスレーブデバイスと、共通バス20に接続されたDDRコントローラ23等のスレーブデバイスに設定できる。但し、共通バス20に接続されたスレーブデバイスにアクセスするためには、メインCPU21及びサブCPU22と同等のアドレス空間に対応する必要がある。従って、シーケンサ100の実行命令群も同等のアドレス空間に対応する結果、1命令当たりのサイズが大きくなるため、回路規模及びプログラムサイズも大きくなる。
The accessible range of the
これに対し、シーケンサ100のアクセス範囲をローカルバスに直接接続されたスレーブデバイスに限定すると、対応が必要となるアドレス空間も狭くて済むため、シーケンサ100の実行命令群における1つの命令当たりのサイズを小さくできる。
On the other hand, if the access range of the
従って、本実施形態では、シーケンサ100は、ローカルバス13に接続された一部のスレーブデバイスにのみにアクセス可能で、共通バス20に接続されたデバイスにはアクセスできない構成になっている。
Therefore, in the present embodiment, the
ROM14は、シーケンサ100用の動作プログラムを記憶している。動作プログラムは、シーケンサ100用の実行命令群を用いて記述する。ROM14は、ローカルバス13を介さずに、直接シーケンサ100のダイレクトバス用マスターポート1051と接続することで、ROM14のリード遅延を最小化する。これにより、プログラムの実行速度を向上させるとともに、ローカルバス13の混雑具合によらずに実行タイミングを保証できるようにしている。ここで、ROM14は「格納部」の一例である。
The
制御レジスタ17は、メインCPU21及びサブCPU22がシーケンサ100を動作させるために使用される。例えば、シーケンサ100の動作開始タイミングを設定(ライト)したり、動作完了フラグやステータスを確認(リード)したりするのに使用される。
The control register 17 is used by the
制御レジスタ17は、メインCPU21及びサブCPU22からアクセスするローカルバス用スレーブポート172と、シーケンサ100からアクセスするダイレクトバス用スレーブポート171とを備えている。
The control register 17 includes a local
ここで、本実施形態では、シーケンサ100から制御レジスタ17へのアクセスを、ダイレクトバス用スレーブポート171経由のみに限定し、ローカルバス13経由でのアクセスをできない構成としている。これによりローカルバス13の設計が容易になっている。
Here, in the present embodiment, the access from the
さらに、シーケンサ100からダイレクトバス用スレーブポート171へのアクセスをリード限定とし、ライトできないようにすることで、制御レジスタ17の複数マスターからのアクセス競合を考慮する必要がなくなり、制御レジスタ17の設計が容易になっている。
Further, by limiting the access from the
また、完了フラグやステータスのように、シーケンサ100が制御レジスタ17の内容を変更したい場合には、シーケンサ100の汎用出力ポートをレジスタ値としてリードできるようにする。これにより、メインCPU21及びサブCPU22がシーケンサ100の状態を共有できるようになっている。
Further, when the
ワーク領域15は、RAM(Random Access Memory)又はレジスタで構成され、シーケンサ100の動作時における一時データの保存のために使用される。またメインCPU21及びサブCPU22がシーケンサ100の動作プログラムを書き込む領域として使用される。
The
制御レジスタ17の一部にシーケンサ100起動時のブートデバイス選択bit(ビット)を設けておき、ブートデバイスをROM14、又はワーク領域15の何れかに選択できるようにしておくと、ASIC1の開発後にもシーケンサ100の動作仕様変更に対応できるため好適である。
If a boot device selection bit (bit) at the time of starting the
ワーク領域15は、シーケンサ100のダイレクトバス用マスターポート1051と接続するためのダイレクトバス用スレーブポート151と、ローカルバス13との接続用のスレーブポート152とを備えている。 シーケンサ100では、プログラムコードはダイレクトパス接続のスレーブデバイスにのみに格納するという制約を設けることで、シーケンサ100及びローカルバス13の構造を単純化している。
The
「先入れ先出し部」の一例としてのFIFO16は、メインCPU21及びサブCPU22とシーケンサ100の間のデータ転送のために使用される。FIFO16はライト用スレーブポート161と、リード用スレーブポート162とを備える。
The
メインCPU21及びサブCPU22からレガシーデバイス30へデータ送信する場合は、ライト用スレーブポート161に対し、メインCPU21及びやサブCPU22がライトを実行する。シーケンサ100は、流用モジュール11を経由してリード用スレーブポート162からリードしたデータをレガシーデバイス30に送信する。
When data is transmitted from the
メインCPU21及びサブCPU22がレガシーデバイス30のデータを取得する場合は、シーケンサ100が流用モジュール11経由で取得したデータを、ライト用スレーブポート161にライトする。そしてメインCPU21及びサブCPU22がリード用スレーブポート162からリードする。
When the
FIFO16のデータ記憶状態(満杯又は空)は、制御レジスタ17からリード可能になっており、メインCPU21及びサブCPU22、並びにシーケンサ100は、FIFO16のデータ記憶状態を確認した上でリード及び/又はライトを実行できる。
The data storage state (full or empty) of the
このとき、シーケンサ100は、FIFO16へのアクセス前後で、流用モジュール11の要求するプロトコルに従った処理も実行する。転送プロトコルを満足するように、ROM14又はワーク領域15に記憶するプログラムが作製されている。
At this time, the
ローカルバス13は、メインCPU21及びサブCPU22が共通バス20経由で実行するマスターアクセスと、シーケンサ100が実行するマスターアクセスとを調停し、各マスターがレガシーデバイス制御部10内部のスレーブデバイスへのアクセスを中継する。
The local bus 13 arbitrates the master access executed by the
共通バス20は、メインCPU21、サブCPU22、汎用DMAC24又はストレージ制御部25等の各マスターによるDDRコントローラ23又はレガシーデバイス制御部10等のスレーブへのアクセスを調停し、中継する。
The
メインCPU21は、数百MHz〜数GHzで動作し、システムのメイン処理を実行する。またサブCPU22は、数十MHz〜数百MHzで動作し、省エネ時の処理等のASIC1のサブ処理を実行する。ここで、メインCPU21及びサブCPU22のそれぞれは、「プロセッサ」の一例である。
The
DDRコントローラ23は、メインCPU21、サブCPU22、汎用DMAC24又はストレージ制御部25等の各マスターからの要求に従い、DDRメモリ50のリード及び/又はライトを実行する。
The
DDRメモリ50はASIC1のメインメモリであり、メインCPU21とサブCPU22が実行するプログラムを展開する領域又は一時データの記憶領域等として使用される。このDDRメモリ50は「メモリ」の一例である。
The
メインCPU21及びサブCPU22の動作プログラムは、外付けストレージ40に記憶されており、実行対象となる動作プログラムは、外付けストレージ40からDDRメモリ50へ都度転送される。
The operation programs of the
ストレージ制御部25は、外付けストレージ40へのアクセスを制御する。外付けストレージ40へのライト時は、内蔵DMAC251を使用して、DDRメモリ50のデータを取得し、外付けストレージ40へのデータ送信を実行する。
The
外付けストレージ40からのリード時は、外付けストレージ40から受信したデータを、内蔵DMAC251を使用してDDRメモリ50へライトする。外付けストレージ40として、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)、eMMC(Embedded Multi Media Card)等のうちの何れか1つを接続可能にしている。
When reading from the
<シーケンサ100の構成例>
次に、シーケンサ100の構成について図2を参照して説明する。図2はシーケンサ100の構成の一例を示すブロック図である。
<Configuration example of
Next, the configuration of the
図2に示すように、シーケンサ100は、PC102と、IR(Instruction Register)下位1031と、IR上位1032と、ダイレクトバスアクセス制御部105と、ローカルバスアクセス制御部106と、入力端子状態検出部107と、メインステートマシン101と、命令実行部1100とを備える。
As shown in FIG. 2, the
PC(Program Couter)102は、直近に実行対象となる命令が格納されたアドレス(格納位置)を記憶するプログラムカウンタである。本実施形態では、プログラムカウンタのbit幅は12bitである。ここで、このPC102は「格納位置記憶部」の一例である。
The PC (Program Couter) 102 is a program counter that stores an address (storage position) in which an instruction to be executed most recently is stored. In the present embodiment, the bit width of the program counter is 12 bits. Here, this
本実施形態におけるステートマシンの命令サイズとして、2Byte(バイト)と4Byteの2種類のサイズが存在し、1アドレスあたりには1Byteのデータを格納する。そのため、2Byteの命令が実行された後には、PC102の値には2が加算され、4Byteの命令が実行された後には、PC102の値には4が加算される。 There are two types of state machine instruction sizes in this embodiment, 2Byte (bytes) and 4Bytes, and 1Byte data is stored per address. Therefore, after the 2Byte instruction is executed, 2 is added to the value of PC102, and after the 4Byte instruction is executed, 4 is added to the value of PC102.
IR下位1031は、16bit幅のインストラクションレジスタであり、2Byte命令の格納と4Byte命令の下位16bitの格納のために使用される。 The IR lower 1031 is a 16-bit wide instruction register, and is used for storing a 2-byte instruction and a lower 16-bit instruction of a 4-bit instruction.
IR上位1032は、16bit幅のインストラクションレジスタであり、4Byte命令の上位16bitの格納のために使用される。 The IR upper 1032 is an instruction register having a width of 16 bits, and is used for storing the upper 16 bits of a 4-byte instruction.
ここで、IR下位1031及びIR上位1032のそれぞれは、「命令記憶部」の一例である。 Here, each of the IR lower 1031 and the IR upper 1032 is an example of the "command storage unit".
GR104は、8bit幅の汎用レジスタであり、各種命令の実行時に更新及び/又は参照される。このGR104は「実行記憶部」の一例である。
The
ダイレクトバスアクセス制御部105は、メインステートマシン101又は命令実行部1100からの指示(対象アドレスの指定と、動作開始タイミングとを含む)に従い、ROM14又は制御レジスタ17のリード及び/又はライトを実行する。本実施形態では1回の指示で16bitのデータをリード及び/又はライト可能にする。
ローカルバスアクセス制御部106は、命令実行部1100からの指示に従い、ローカルバス13に接続された流用モジュール11、ワーク領域15又はFIFO16等のスレーブデバイスのリード及び/又はライトを実行する。本実施形態では、1回の指示で8bitのデータをリード及び/又はライト可能にする。
The direct bus
The local bus
入力端子状態検出部107は、シーケンサ100に入力される信号のレベルを検出する。本実施形態では8本の信号レベルを検出可能とする。入力端子状態検出部107は、8bitデータを出力する。各1bitは各入力信号1本の信号レベルに対応し、「入力端子」の一例である。
The input terminal
メインステートマシン101は、フェッチ実行ステートと命令実行ステートを繰り返し遷移する。フェッチ実行ステートでは、実行すべき命令を取得する。具体的には、PC102の示すアドレスをリードする指示をダイレクトバスアクセス制御部105に対して発行し、ダイレクトバスアクセス制御部105から返ってきたリード結果をIR下位1031に格納後、PC102の値に2を加算して更新する。ここで、メインステートマシン101は「状態制御部」の一例である。
The
取得した命令が2Byte命令の場合は、フェッチ実行ステートを完了し、命令実行ステートへ遷移する。取得した命令が4Byte命令の場合は、再度、PC102の示すアドレスをリードする指示をダイレクトバスアクセス制御部105に対して発行し、ダイレクトバスアクセス制御部105から返ってきたリード結果をIR上位1032に格納後、PPC102の値に2を加算して更新する。その後、フェッチ実行ステートを完了し、命令実行ステートに遷移する。
If the acquired instruction is a 2-byte instruction, the fetch execution state is completed and the instruction execution state is entered. If the acquired instruction is a 4-byte instruction, the instruction to read the address indicated by the
命令実行ステートでは、フェッチ実行ステートで取得した命令に対応する命令実行指示を命令実行部1100に対して発行し、命令実行部1100からの命令完了通知を待つ。
In the instruction execution state, an instruction execution instruction corresponding to the instruction acquired in the fetch execution state is issued to the
命令完了通知を受け取ると、命令実行ステートを完了し、フェッチ実行ステートへ遷移する。本実施形態では、「命令実行指示」と「命令完了通知」は、1つの命令種類ごとに1本の信号として用意されている。また本実施形態では、13種類の命令が存在するため、「命令実行指示」と「命令完了通知」は、各13本ずつ存在する。 When the instruction completion notification is received, the instruction execution state is completed and the state transitions to the fetch execution state. In the present embodiment, the "instruction execution instruction" and the "instruction completion notification" are prepared as one signal for each instruction type. Further, in the present embodiment, since there are 13 types of instructions, there are 13 "instruction execution instructions" and 13 "instruction completion notifications".
命令実行部1100は、シーケンサ100が対応する13種類の命令を実行する。この13種類の命令の組み合わせにより、シーケンサ100を意図通りに動作させることができる。
The
<各命令の一例>
次に、命令実行部1100が実行する各命令の詳細について、図3〜図12を参照して説明する。
<Example of each instruction>
Next, the details of each instruction executed by the
(NOP命令)
図3は、NOP(No Operation)命令の一例を説明する図である。NOP命令は、2Byteサイズの命令である。
(NOP instruction)
FIG. 3 is a diagram illustrating an example of a NOP (No Operation) instruction. The NOP instruction is a 2Bite size instruction.
bit[15:12]には、NOP命令を示すコード4'b0000が設定される。ここで、bit[15:12]の表記は、2Byteサイズの命令における15ビット目から12ビット目までの4ビット分の範囲を表している。また4'b0000の表記は、4ビットのコードが「0000」であることを2進数で表している。NOP命令では、15ビット目から12ビット目までの4ビット分の範囲に4ビットのコード「0000」が設定される。 A code 4'b0000 indicating a NOP instruction is set in bit [15:12]. Here, the notation of bit [15:12] represents the range of 4 bits from the 15th bit to the 12th bit in the instruction of 2Bite size. Further, the notation of 4'b0000 indicates that the 4-bit code is "0000" in binary. In the NOP instruction, the 4-bit code "0000" is set in the range of 4 bits from the 15th bit to the 12th bit.
このコード4'b0000は、「実行命令の種類を識別する識別情報」の一例である。コード4'b0000が設定されると、実行命令がNOP命令であることが識別される。なお、以降でも上記と同様の表記を用いる場合があるが、表記の意味は上述したものと同様である。 This code 4'b0000 is an example of "identification information for identifying the type of execution instruction". When the code 4'b0000 is set, it is identified that the execution instruction is a NOP instruction. In the following, the same notation as above may be used, but the meaning of the notation is the same as that described above.
bit[11:0]は未使用であり、命令実行時には無視される。メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b0000ならば、NOP命令実行部1151に対して命令実行信号が発行される。NOP命令実行部1151は、命令実行信号を受信後、命令完了通知を発行する。
bit [11: 0] is unused and is ignored when the instruction is executed. When the
(GR操作命令)
図4は、GR(General Register)操作命令の一例を説明する図である。GR操作命令は、2Byteサイズの命令である。
(GR operation command)
FIG. 4 is a diagram illustrating an example of a GR (General Register) operation command. The GR operation instruction is a 2Bite size instruction.
bit[15:12]には、GR操作命令を示すコード4'b0001が設定される。bit[11:8]には操作種類が設定される。GR操作命令実行部1101は、操作種類の設定に従って、作用データ[7:0]と現行のGR104のデータ[7:0]の論理演算、または代入処理を実行し、GR104の値を更新する。例えば、操作種類設定[3:0]の値毎に、GR操作命令実行部1101は、以下の動作を実行する。
A code 4'b0001 indicating a GR operation instruction is set in bit [15:12]. The operation type is set in bit [11: 8]. The GR operation
GR操作命令実行部1101は、操作種類設定[3:0]=4'h0の場合、GR104の値を作用データ[7:0]の値に書き換える。
When the operation type setting [3: 0] = 4'h0, the GR operation
また、GR操作命令実行部1101は、操作種類設定[3:0]=4'h2の場合、GR104の値を現行のGR104を論理反転した値に書き換える。例えばh55をhAAに書き換える。
Further, when the operation type setting [3: 0] = 4'h2, the GR operation
また、GR操作命令実行部1101は、操作種類設定[3:0]=4'h3の場合、GR104の値を入力端子状態検出部107の出力値に書き換える。
Further, when the operation type setting [3: 0] = 4'h3, the GR operation
また、GR操作命令実行部1101は、操作種類設定[3:0]=4'hAの場合、GR104の値を現行のGR104の値と作用データ[7:0]との論理積に書き換える。
Further, when the operation type setting [3: 0] = 4'hA, the GR operation
また、GR操作命令実行部1101は、操作種類設定[3:0]=4'hBの場合、GR104の値を現行のGR1044の値と作用データ[7:0]との論理和に書き換える。
Further, when the operation type setting [3: 0] = 4'hB, the GR operation
また、GR操作命令実行部1101は、操作種類設定[3:0]=4'hCの場合、GR104の値を現行のGR104の値と作用データ[7:0]との排他的論理和に書き換える。
Further, when the operation type setting [3: 0] = 4'hC, the GR operation
また、GR操作命令実行部1101は、メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b0001ならば、GR操作命令実行部1101に対して、命令実行信号が発行される。
Further, when the
GR操作命令実行部1101は、GR104の書き換え完了後に、命令完了通知を発行する。
The GR operation
上述した例では、操作種類設定[3:0]のバリエーションとして、数値演算を実行する設定を設けていないが、例えば、操作種類設定[3:0]=4'hFの場合、GR104の値を現行のGR104の値と作用データ[7:0]の加算結果で書き換え可能とするバリエーションを追加することもできる。これにより、汎用DMAC24のようにアクセスアドレスを一定の値で増加させながら特定のメモリ領域に連続アクセスさせる動作をシーケンサ100に容易に行わせることができる。
In the above example, as a variation of the operation type setting [3: 0], the setting for executing the numerical calculation is not provided. However, for example, when the operation type setting [3: 0] = 4'hF, the value of GR104 is set. It is also possible to add a variation that can be rewritten by the addition result of the current GR104 value and the action data [7: 0]. As a result, the
(出力端子制御命令)
図5は、出力端子制御命令の一例を説明する図である。出力端子制御命令は、2Byteサイズの命令である。
(Output terminal control command)
FIG. 5 is a diagram illustrating an example of an output terminal control command. The output terminal control instruction is a 2Bite size instruction.
bit[15:12]には、出力端子制御命令を示すコード4'b1000が設定される。bit[11:8]には、操作種類が設定される。 A code 4'b1000 indicating an output terminal control command is set in bit [15:12]. The operation type is set in bit [11: 8].
出力端子制御命令実行部1141は、操作種類設定に従って、作用データ[7:0]と現行の出力端子データ[7:0]の論理演算又は代入処理を実行し、出力端子データ[7:0]の値を更新する。
The output terminal control
出力端子データ[7:0]の各1bitは、シーケンサ100の出力信号端子1本に対応している。例えば、操作種類設定[3:0]の値毎に、出力端子制御命令実行部1141は以下の動作を実行する。
Each 1 bit of the output terminal data [7: 0] corresponds to one output signal terminal of the
出力端子制御命令実行部1141は、操作種類設定[3:0]=4'h0の場合、出力端子データの値を作用データ[7:0]の値に書き換える。
When the operation type setting [3: 0] = 4'h0, the output terminal control
また、出力端子制御命令実行部1141は、操作種類設定[3:0]=4'hAの場合、出力端子データの値を現行の出力端子データの値と作用データ[7:0]との論理積に書き換える。
Further, when the operation type setting [3: 0] = 4'hA, the output terminal control
また、出力端子制御命令実行部1141は、操作種類設定[3:0]=4'hBの場合、出力端子データの値を現行の出力端子データの値と作用データ[7:0]との論理和に書き換える。
Further, when the operation type setting [3: 0] = 4'hB, the output terminal control
また、出力端子制御命令実行部1141は、操作種類設定[3:0]=4'hDの場合、出力端子データの値を現行の出力端子データの値とGR104の値との論理積に書き換える。
Further, when the operation type setting [3: 0] = 4'hD, the output terminal control
また、出力端子制御命令実行部1141は、操作種類設定[3:0]=4'hDの場合、出力端子データの値を現行の出力端子データの値とGR104の値との論理和に書き換える。
Further, when the operation type setting [3: 0] = 4'hD, the output terminal control
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1000ならば、出力端子制御命令実行部1141に対して、命令実行信号が発行される。出力端子制御命令実行部1141は、出力端子データの書き換え完了後、命令完了通知を発行する。
When the
(ダイレクトバス転送命令)
次に図6は、ダイレクトバス転送命令とローカルバス転送命令の一例を説明する図である。ダイレクトバス転送命令及びローカルバス転送命令のそれぞれは、2Byteサイズの命令である。
(Direct bus transfer command)
Next, FIG. 6 is a diagram illustrating an example of a direct bus transfer instruction and a local bus transfer instruction. Each of the direct bus transfer instruction and the local bus transfer instruction is a 2-byte size instruction.
ダイレクトバス接続デバイスにライトする場合は、bit[15:12]には、コード4'b0110が設定される。ダイレクトバス接続デバイスからリードする場合は、bit[15:12]には、コード4'b0111が設定される。 When writing to a direct bus connection device, the code 4'b0110 is set in bit [15:12]. When reading from a direct bus connection device, code 4'b0111 is set in bit [15:12].
ローカルバス接続デバイスにライトする場合は、bit[15:12]には、コード4'b0100が設定される。ダイレクトバス接続デバイスからリードする場合は、bit[15:12]には、コード4'b0101が設定される。bit[11:0]には、アクセス対象となるアドレスが設定される。各命令実行時には、対象アドレス[11:0]で指定された領域とGR104との間で、データの転送が実行される。 When writing to a local bus connection device, the code 4'b0100 is set in bit [15:12]. When reading from a direct bus connection device, code 4'b0101 is set in bit [15:12]. An address to be accessed is set in bit [11: 0]. At the time of executing each instruction, data transfer is executed between the area specified by the target address [11: 0] and GR104.
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b0110ならば、ダイレクトバスライト命令実行部1131に対して命令実行信号が発行される。
When the
ダイレクトバスライト命令実行部1131は、ダイレクトバスアクセス制御部105に対してライト指示及びライト対象アドレスを発行する。このとき、ライトデータとしては、GR104の値を発行する。ダイレクトバスアクセス制御部105のライト動作完了後、ダイレクトバスライト命令実行部1131は、命令完了通知を発行する。
The direct bus write
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b0111ならば、ダイレクトバスリード命令実行部1132に対して、命令実行信号が発行される。
When the
ダイレクトバスリード命令実行部1132は、ダイレクトバスアクセス制御部105に対し、リード指示及びリード対象アドレスを発行する。ダイレクトバスリード命令実行部1132は、ダイレクトバスアクセス制御部105からリードデータを受信すると、受信したリードデータをGR104に格納し、命令完了通知を発行する。
The direct bus read
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b0100ならば、ローカルバスライト命令実行部1133に対して、命令実行信号が発行される。
When the
ローカルバスライト命令実行部1133は、ローカルバスアクセス制御部106に対し、ライト指示及びライト対象アドレスを発行する。このとき、ライトデータとしては、GR104の値を発行する。ローカルバスアクセス制御部106のライト動作完了後、ローカルバスライト命令実行部1133は、命令完了通知を発行する。
The local bus write
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b0111ならば、ローカルバスリード命令実行部1134に対して、命令実行信号が発行される。
When the
ローカルバスリード命令実行部1134は、ローカルバスアクセス制御部106に対し、リード指示及びリード対象アドレスを発行する。ローカルバスリード命令実行部1134は、ローカルバスアクセス制御部106からリードデータを受信すると、受信したリードデータをGR104に格納し、命令完了通知を発行する。
The local bus read
(強制ジャンプ命令)
図7は、強制ジャンプ命令の一例を説明する図である。強制ジャンプ命令は、2Byteサイズの命令である。bit[15:12]には、コード4'b1100が設定される。bit[11:0]にはジャンプ先アドレスが設定される。
(Forced jump command)
FIG. 7 is a diagram illustrating an example of a forced jump instruction. The forced jump instruction is a 2Bite size instruction. Code 4'b1100 is set in bit [15:12]. The jump destination address is set in bit [11: 0].
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1100ならば、強制ジャンプ命令実行部1121に対して、命令実行信号が発行される。
When the
強制ジャンプ命令実行部1121は、PC102の値をジャンプ先アドレスに書き換え後、命令完了通知を発行する。
The forced jump
(繰り返しジャンプ命令)
図8は、繰り返しジャンプ命令の一例を説明する図である。繰り返しジャンプ命令は、4Byteサイズの命令である。下位bit[15:12]には、コード4'b1101が設定される。下位bit[11:8]は、繰り返し回数カウンタの初期値としてロードする値を本命令の下位bit[7:0]の値とするか、又はGR104とするかの指定のために使用される。この下位bit[11:8]は、「取得先指定部」の一例である。
(Repeat jump command)
FIG. 8 is a diagram illustrating an example of a repetitive jump instruction. The repeat jump instruction is a 4-byte size instruction. Code 4'b1101 is set in the lower bit [15:12]. The lower bit [11: 8] is used to specify whether the value to be loaded as the initial value of the repetition counter is the value of the lower bit [7: 0] of this instruction or GR104. This lower bit [11: 8] is an example of the “acquisition destination designation unit”.
下位bit[7:0]には、繰り返し回数が設定される。繰り返し回数としてGR104の値を使用する場合は、このbitは無視される。上位bit[11:0]には、ジャンプ先のアドレスが設定される。この下位bit[7:0]は、「回数指定部」の一例である。 The number of repetitions is set in the lower bit [7: 0]. When the value of GR104 is used as the number of repetitions, this bit is ignored. The address of the jump destination is set in the upper bit [11: 0]. This lower bit [7: 0] is an example of the "number of times designation unit".
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1101ならば、繰り返しジャンプ命令実行部1122に対して命令実行信号が発行される。
When the
繰り返しジャンプ命令実行部1122は、初回の命令実行信号受信時、ロード先選択bit[3:0]の値が4'b0000の場合は、繰り返し回数カウンタの初期値として、繰り返しジャンプ命令の下位bit[7:0]の値を設定し、ロード先選択bit[3:0]の値が4'b0001の場合は、繰り返し回数カウンタの初期値としてGR104の値を設定する。ここで、この繰り返しジャンプ命令実行部1122は「繰り返しジャンプ実行部」の一例である。
When the value of the load destination selection bit [3: 0] is 4'b0000 when the instruction execution signal is received for the first time, the repeat jump
カウンタ初期値設定後、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102を書き換え後、カウンタ値を1だけ減算して命令完了通知が発行される。
After setting the initial value of the counter, the value of PC102 is rewritten to the jump destination address set at the upper level [11: 0] of this instruction. After rewriting the
繰り返しジャンプ命令実行部1122は、2回目以降の命令実行信号受信時、繰り返しカウンタ値を判定し、繰り返しカウンタの値がゼロでない場合は、PC102の値を本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換える。PC102を書き換え後、カウンタ値を1だけ減算して命令完了通知を発行する。繰り返しカウンタ値がゼロの場合は、何も実行せずに命令完了通知を発行する。またPC102の値に繰り返しジャンプ実行命令のデータサイズに対応した値である4を加算して、PC102の値を書き換える。
The repetitive jump
(GR分岐ジャンプ命令)
図9は、GR分岐ジャンプ命令の一例を説明する図である。GR分岐ジャンプ命令は、4Byteサイズの命令である。下位bit[15:12]には、コード4'b1110が設定される。下位bit[11:8]には、分岐条件が設定される。上位bit[11:0]には、ジャンプ先アドレスが設定される。下位bit[7:0]には、ジャンプ判定時に、GR104のうちの判定対象となるbitを選択(指定)するためのデータが設定される。
(GR branch jump instruction)
FIG. 9 is a diagram illustrating an example of a GR branch jump instruction. The GR branch jump instruction is a 4-byte size instruction. Code 4'b1110 is set in the lower bit [15:12]. A branch condition is set in the lower bit [11: 8]. The jump destination address is set in the high-order bit [11: 0]. In the lower bit [7: 0], data for selecting (designating) the bit to be determined from the
GR判定対象bit選択[7:0]の各bitのうち、「1」としたbit位置に対応するGR104のbitが判定対象となる。例えば、GR判定対象bit選択[7:0]の値が8'b10101010ならば、GR104のbit[7][5]3][1]の4bitを使用して、ジャンプ判定が実行される。
Of each bit of the GR determination target bit selection [7: 0], the bit of
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1110ならば、GR分岐ジャンプ命令実行部1123に対して、命令実行信号が発行される。GR分岐ジャンプ命令実行部1123は、本命令の下位bit[11:8]の分岐条件設定の値により、以下のように判定動作が変化する。
When the
分岐条件設定の値が4'b1000の場合は、GR判定対象bit選択[7:0]と、GR104の値が完全一致した場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行せずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b1000, it is determined that the branch condition is satisfied when the GR determination target bit selection [7: 0] and the value of GR104 completely match, and the value of PC102 is higher than this instruction [7: 0]. It is rewritten to the jump destination address set at 11: 0]. After rewriting the
分岐条件設定の値が4'b0100の場合は、GR判定対象bit選択[7:0]によって判定対象としたGR104のbitのうち、対象bitが全て「1」の場合に、分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行せずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0100, it is determined that the branch condition is satisfied when all the target bits of the
分岐条件設定の値が4'b0101の場合は、GR判定対象bit選択[7:0]によって判定対象としたGR104のbitのうち、少なくとも1つ以上のbitが「1」の場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行せずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0101, the branch condition is satisfied when at least one or more bits of the
分岐条件設定の値が4'b0110の場合は、GR判定対象bit選択[7:0]によって判定対象としたGR104のbitのうち、対象bitが全て「0」の場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行せずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0110, it is determined that the branch condition is satisfied when all the target bits of the
分岐条件設定の値が4'b0111の場合は、GR判定対象bit選択[7:0]によって判定対象としたGR104のbitのうち、少なくとも1つ以上のbitが「0」の場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行せずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0111, the branch condition is satisfied when at least one or more bits of the
分岐条件設定の値が4'b1001の場合は、GR判定対象bit選択[7:0]と、GR104の値が一致しない場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何もせずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b1001, it is determined that the branch condition is satisfied when the GR determination target bit selection [7: 0] and the value of GR104 do not match, and the value of PC102 is the higher rank [11] of this instruction. : 0] is rewritten to the jump destination address set. After rewriting the
(入力端子分岐ジャンプ命令)
図10は、入力端子分岐ジャンプ命令の一例を説明する図である。入力端子分岐ジャンプ命令は、4Byteサイズの命令である。下位bit[15:12]には、コード4'b1111が設定される。下位bit[11:8]には、分岐条件が設定される。上位bit[11:0]には、ジャンプ先アドレスが設定される。下位bit[7:0]には、ジャンプ判定時に、入力端子状態検出部107の出力のうち、判定対象となるbitを選択(指定)するためのデータが設定される。入力端子判定対象bit選択[7:0]の各bitのうち、「1」としたbit位置に対応する入力端子状態検出部107の出力bitが判定対象となる。
(Input terminal branch jump instruction)
FIG. 10 is a diagram illustrating an example of an input terminal branch jump instruction. The input terminal branch jump instruction is a 4-byte size instruction. Code 4'b1111 is set in the lower bit [15:12]. A branch condition is set in the lower bit [11: 8]. The jump destination address is set in the high-order bit [11: 0]. In the lower bit [7: 0], data for selecting (designating) the bit to be determined from the outputs of the input terminal
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1111ならば、入力端子分岐ジャンプ命令実行部1124に対して、命令実行信号が発行される。入力端子分岐ジャンプ命令実行部1124は、本命令の下位bit[11:8]の分岐条件設定の値によって、以下のように判定動作が変化する。
When the
分岐条件設定の値が4'b1000の場合は、入力端子判定対象bit選択[7:0]と、入力端子状態検出部107の出力が完全一致した場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行せずに、命令完了通知が発行される。
When the value of the branch condition setting is 4'b1000, it is determined that the branch condition is satisfied when the input terminal determination target bit selection [7: 0] and the output of the input terminal
分岐条件設定の値が4'b0100の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、対象bitが全て「1」の場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行されずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0100, when all the target bits of the output bits of the input terminal
分岐条件設定の値が4'b0101の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、少なくとも1つ以上のbitが「1」の場合に、分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行されずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0101, at least one or more of the output bits of the input terminal
分岐条件設定の値が4'b0110の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、対象bitが全て「0」の場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行されずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0110, when all the target bits of the output bits of the input terminal
分岐条件設定の値が4'b0111の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、少なくとも1つ以上のbitが「0」の場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行されずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b0111, at least one or more of the output bits of the input terminal
分岐条件設定の値が4'b1001の場合は、入力端子判定対象bit選択[7:0]と、入力端子状態検出部107の出力が一致しない場合に分岐条件成立と判断され、PC102の値が本命令の上位[11:0]で設定されるジャンプ先アドレスに書き換えられる。PC102の書き換え後、命令完了通知が発行される。分岐条件が成立しなかった場合は、何も実行されずに命令完了通知が発行される。
When the value of the branch condition setting is 4'b1001, it is determined that the branch condition is satisfied when the input terminal determination target bit selection [7: 0] and the output of the input terminal
(入力端子ポーリング命令)
図11は、入力端子ポーリング命令の一例を説明する図である。入力端子ポーリング命令は、2Byteサイズの命令である。bit[15:12]には、コード4'b1010が設定される。bit[11:8]には、ポーリング終了条件が設定される。このbit[11:8]は、ポーリング終了条件指定部の一例であり、bit[11:8]に設定されるデータは、「論理演算指定データ」の一例である。
(Input terminal polling command)
FIG. 11 is a diagram illustrating an example of an input terminal polling instruction. The input terminal polling instruction is a 2-byte size instruction. Code 4'b1010 is set in bit [15:12]. A polling end condition is set in bit [11: 8]. This bit [11: 8] is an example of the polling end condition designation unit, and the data set in the bit [11: 8] is an example of "logical operation designation data".
bit[7:0]には、ポーリング終了判定時に、入力端子状態検出部107の出力のうち、判定対象となるbitを選択(指定)するためのデータが設定される。入力端子判定対象bit選択[7:0]の各bitのうち、「1」としたbit位置に対応する入力端子状態検出部107の出力bitが判定対象となる。ここで、このbit[7:0]に設定されるデータは、「命令付属データ」の一例である。
In bit [7: 0], data for selecting (designating) a bit to be determined from the outputs of the input terminal
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1010ならば、入力端子ポーリング命令実行部1111に対して命令実行信号が発行される。入力端子ポーリング命令実行部1111は、本命令のbit[11:8]の終了条件設定の値によって以下のように判定動作が変化する。ここで、この入力端子ポーリング命令実行部1111は「ポーリング実行部」の一例である。
When the
終了条件設定の値が4'b1000の場合は、入力端子判定対象bit選択[7:0]の値と、入力端子状態検出部107の出力bitが完全一致した場合に、ポーリング終了条件成立と判断され、何も実行されずに命令完了通知が発行される。
When the value of the end condition setting is 4'b1000, it is determined that the polling end condition is satisfied when the value of the input terminal determination target bit selection [7: 0] and the output bit of the input terminal
ポーリング終了条件が成立しなかった場合は、PC102の値から「2」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 If the polling end condition is not satisfied, "2" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0100の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、対象bitが全て「1」の場合に終了条件成立と判断され、何も実行されずに命令完了通知が発行される。
When the value of the end condition setting is 4'b0100, when all the target bits of the output bits of the input terminal
ポーリング終了条件が成立しなかった場合は、PC102の値から「2」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 If the polling end condition is not satisfied, "2" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0101の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、少なくとも1つ以上のbitが「1」の場合に終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「2」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。
When the value of the end condition setting is 4'b0101, at least one or more of the output bits of the input terminal
終了条件設定の値が4'b0101の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、対象bitが全て「0」の場合に終了条件成立と判断され、何も実行されずに命令完了通知が発行される。
When the value of the end condition setting is 4'b0101, all of the output bits of the input terminal
ポーリング終了条件が成立しなかった場合は、PC102の値から「2」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 If the polling end condition is not satisfied, "2" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0111の場合は、入力端子判定対象bit選択[7:0]によって判定対象とした入力端子状態検出部107の出力bitのうち、少なくとも1つ以上のbitが「0」の場合に終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「2」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。
When the value of the end condition setting is 4'b0111, at least one or more of the output bits of the input terminal
終了条件設定の値が4'b1001の場合は、入力端子判定対象bit選択[7:0]と、入力端子状態検出部107の出力が一致しない場合に終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「2」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。
When the value of the end condition setting is 4'b1001, it is determined that the end condition is satisfied when the input terminal determination target bit selection [7: 0] and the output of the input terminal
(アドレス空間ポーリング命令)
図12は、アドレス空間ポーリング命令の一例を説明する図である。アドレス空間ポーリング命令は、4Byteサイズの命令である。下位bit[15:12]には、コード4'b1011が設定される。下位bit[11:8]には、終了条件が設定される。上位bit[11:0]には、ポーリングするリード対象アドレスが設定される。下位bit[7:0]には、ポーリング終了判定時にポーリング対象アドレスのリード結果のうち判定対象となるbitを選択(指定)するためのデータが設定される。リード結果判定対象bit選択[7:0]の各bitのうち、「1」としたbit位置に対応するリード結果のbitが判定対象となる。
(Address space polling instruction)
FIG. 12 is a diagram illustrating an example of an address space polling instruction. The address space polling instruction is a 4-byte size instruction. Code 4'b1011 is set in the lower bit [15:12]. The end condition is set in the lower bit [11: 8]. The read target address to be polled is set in the upper bit [11: 0]. In the lower bit [7: 0], data for selecting (designating) the bit to be determined from the read results of the polling target address at the time of polling end determination is set. Of each bit of the read result determination target bit selection [7: 0], the read result bit corresponding to the bit position set to "1" is the determination target.
メインステートマシン101が命令実行ステートに遷移する際に、IR下位1031のbit[15:12]が4'b1011ならば、アドレス空間ポーリング命令実行部1112に対して命令実行信号が発行される。
When the
アドレス空間ポーリング命令実行部1112は、命令実行信号を受信すると、ローカルバスアクセス制御部106に対して、リード指示及びリード対象アドレスを発行する。アドレス空間ポーリング命令実行部1112は、ローカルバスアクセス制御部106からリードデータを受信すると、受信したリードデータを専用のポーリング結果レジスタ[7:0]に格納する。ポーリング結果レジスタの値と、終了条件設定の値を使用して、ポーリング動作の終了及び/又は継続が判定される。ここで、このアドレス空間ポーリング命令実行部1112は「ポーリング実行部」の一例である。
Upon receiving the instruction execution signal, the address space polling instruction execution unit 1112 issues a read instruction and a read target address to the local bus
アドレス空間ポーリング命令実行部1112は、本命令の下位bit[11:8]の終了条件設定の値によって、以下のように判定動作が変化する。 The address space polling instruction execution unit 1112 changes the determination operation as follows depending on the value of the end condition setting of the lower bit [11: 8] of this instruction.
終了条件設定の値が4'b1000の場合は、リード結果判定対象bit選択[7:0]と、ポーリング結果レジスタ[7:0]の値が完全一致した場合に、ポーリング終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値をから「4」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 When the value of the end condition setting is 4'b1000, it is determined that the polling end condition is satisfied when the read result determination target bit selection [7: 0] and the value of the polling result register [7: 0] completely match. , An instruction completion notification is issued without executing anything. If the polling end condition is not satisfied, the value of PC102 is subtracted from "4" and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0100の場合は、リード結果判定対象bit選択[7:0]によって判定対象としたポーリング結果レジスタ[7:0]の各bitのうち、対象bitが全て「1」の場合にポーリング終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「4」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 When the value of the end condition setting is 4'b0100, all the target bits of the polling result register [7: 0] set as the judgment target by the read result judgment target bit selection [7: 0] are "1". In the case of, it is determined that the polling end condition is satisfied, and an instruction completion notification is issued without executing anything. If the polling end condition is not satisfied, "4" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0101の場合は、リード結果判定対象bit選択[7:0]によって判定対象としたポーリング結果レジスタ[7:0]の各bitのうち、少なくとも1つ以上のbitが「1」の場合にポーリング終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「4」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 When the value of the end condition setting is 4'b0101, at least one or more bits of each bit of the polling result register [7: 0] set as the judgment target by the read result judgment target bit selection [7: 0] are selected. If it is "1", it is determined that the polling end condition is satisfied, and an instruction completion notification is issued without executing anything. If the polling end condition is not satisfied, "4" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0110の場合は、リード結果判定対象bit選択[7:0]によって判定対象としたポーリング結果レジスタ[7:0]の各bitのうち、対象bitが全て「0」の場合にポーリング終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「4」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 When the value of the end condition setting is 4'b0110, all the target bits of the polling result register [7: 0] set as the judgment target by the read result judgment target bit selection [7: 0] are "0". In the case of, it is determined that the polling end condition is satisfied, and an instruction completion notification is issued without executing anything. If the polling end condition is not satisfied, "4" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b0111の場合は、リード結果判定対象bit選択[7:0]によって判定対象としたポーリング結果レジスタ[7:0]の各bitのうち、少なくとも1つ以上のbitが「0」の場合にポーリング終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「4」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 When the value of the end condition setting is 4'b0111, at least one or more bits of each bit of the polling result register [7: 0] set as the judgment target by the read result judgment target bit selection [7: 0] are selected. If it is "0", it is determined that the polling end condition is satisfied, and an instruction completion notification is issued without executing anything. If the polling end condition is not satisfied, "4" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
終了条件設定の値が4'b1001の場合は、リード結果判定対象bit選択[7:0]とポーリング結果レジスタ[7:0]の値が一致しない場合に終了条件成立と判断され、何も実行されずに命令完了通知が発行される。ポーリング終了条件が成立しなかった場合は、PC102の値から「4」を減算して戻した後に、命令完了通知が発行されることで、再度、本命令が実行される。 When the value of the end condition setting is 4'b1001, it is judged that the end condition is satisfied and nothing is executed when the values of the read result judgment target bit selection [7: 0] and the polling result register [7: 0] do not match. The order completion notification is issued without being issued. If the polling end condition is not satisfied, "4" is subtracted from the value of PC102 and returned, and then the instruction completion notification is issued, so that this instruction is executed again.
<アドレス空間割当例>
次に図13は、本実施形態に係るASIC1のアドレス空間割当の一例を示す図である。
<Example of address space allocation>
Next, FIG. 13 is a diagram showing an example of the address space allocation of ASIC1 according to the present embodiment.
メインCPU制御レジスタ領域210には、メインCPU21の各種設定及び/又は制御用のレジスタが割り当てられており、メインCPU21及びサブCPU22からアクセス可能であるが、シーケンサ100からはアクセス不能である。
Registers for various settings and / or controls of the
また、サブCPU制御レジスタ領域220は、サブCPU22の各種設定及び/又は制御用のレジスタが割り当てられており、メインCPU21及びサブCPU22からアクセス可能であるが、シーケンサ100からはアクセス不能である。
Further, the sub CPU
また、DDRコントローラ制御レジスタ領域230は、DDRコントローラ23の各種設定及び/又は制御用のレジスタが割り当てられており、メインCPU21及びサブCPU22からアクセス可能であるが、シーケンサ100からはアクセス不能である。
Further, the DDR controller
また、汎用DMAC制御レジスタ領域240は、汎用DMAC24の各種設定及び/又は制御用のレジスタが割り当てられており、メインCPU21及びサブCPU22からアクセス可能であるが、シーケンサ100からはアクセス不能である。
Further, the general-purpose DMAC
また、ストレージ制御レジスタ領域250は、ストレージ制御部25の各種設定及び/又は制御用のレジスタが割り当てられており、メインCPU21及びサブCPU22からアクセス可能であるが、シーケンサ100からはアクセス不能である。
Further, the storage
また、DDRメモリ領域500は、DDRメモリ50へのリード及び/又はライト用のアドレスが割り当てられており、メインCPU21、サブCPU22、汎用DMAC24及びストレージ制御部25からアクセス可能であるが、シーケンサ100からはアクセス不能である。
Further, the
また、レガシーデバイス制御レジスタ領域900は、レガシーデバイス制御部10の各種設定及び/又は制御用のレジスタが割り当てられており、基本的にメインCPU21、サブCPU22及びシーケンサ100からアクセス可能であるが、シーケンサ用ROM領域914のように、メインCPU21及びサブCPU22からはアクセスできない領域も存在する。
Further, the legacy device
また、汎用DMAC24は、FIFOライト用領域9161及びFIFOリード用領域9162にアクセス可能である。
Further, the general-purpose DMAC 24 can access the
また、流用モジュール制御レジスタ領域911は、流用モジュール11の各種設定及び/又は制御用のレジスタが割り当てられており、メインCPU21、サブCPU22及びシーケンサ100からアクセス可能である。
Further, the diversion module
また、シーケンサ制御レジスタ領域917は、シーケンサ100の各種設定及び/又は制御用の制御レジスタ17が割り当てられており、メインCPU21、サブCPU22及びシーケンサ100からアクセス可能である。
Further, the sequencer
シーケンサ用ROM領域914は、シーケンサ100の動作プログラム格納用のROM14が割り当てられており、シーケンサ100からのみアクセス可能である。
The ROM area 914 for the sequencer is allocated the
リセット解除後、シーケンサ100は、ROM14の先頭アドレスである0x2000番地からフェッチ動作を開始する。但し、シーケンサ制御レジスタ領域917の一部のレジスタにシーケンサ100のブートデバイス選択bitを設けておくことで、リセット解除後の最初のフェッチアドレスをシーケンサ用ワーク領域の先頭アドレスである0x3000番地となるようにハードウエアを構成することも可能である。
After the reset is released, the
具体的には、シーケンサ100用のリセット信号と、シーケンサ制御レジスタ領域のリセット信号を分けておき、ブートデバイス選択bitの値によって、シーケンサ100のリセット解除後のPC102の初期値として0x200又は0x300の何れかを選択可能にしておく。
Specifically, the reset signal for the
シーケンサ用ROM領域914及びシーケンサ用ワーク領域915に、図3〜図12で説明した各種命令を配置することで、シーケンサ100の動作を定義できる。また、シーケンサ用ROM領域914の一部に、シーケンサ用ワーク領域915へのジャンプ命令を配置しておき、シーケンサ100のリセット解除前に、メインCPU21、サブCPU22、又は汎用DMAC24が、シーケンサ用ワーク領域915にシーケンサ動作プログラムを記述しておくことで、シーケンサ100の動作をある程度動的に変更することが可能になる。
The operation of the
シーケンサ用ワーク領域915に記述するプログラムは、不揮発性の外付けストレージ40に記憶され、ストレージ制御部25によりDDRメモリ領域500に展開された後、メインCPU21、サブCPU22又は汎用DMAC24により、シーケンサ用ワーク領域915に転送される。
The program described in the
シーケンサ用ワーク領域915は、シーケンサ100の動作プログラムやデータを格納する領域であり、メインCPU21、サブCPU22、汎用DMAC24及びシーケンサ100からアクセス可能である。
The
FIFOライト用領域9161は、アドレス空間としては0x900〜0x9FFまで割り当てているが、この範囲に対してライトがあった場合には、アドレスに関係なく時間的に早い方から順番にFIFO16へのデータの詰め込みが実行される。FIFOライト用領域9161は、メインCPU21、サブCPU22、汎用DMAC24及びシーケンサ100からアクセス可能である。
The
FIFOリード用領域9162は、アドレス空間としては0xA00〜0xAFFまで割り当てているが、この範囲に対してリードがあった場合には、アドレスに関係なく時間的に早く記憶されたデータから順番に、FIFO16からのデータの読み出しが実行される。FIFOリード用領域9162は、メインCPU21、サブCPU22、汎用DMAC24及びシーケンサ100からアクセス可能である。
The FIFO read
FIFO16を介して、メインCPU21、サブCPU22又は汎用DMAC24とシーケンサ100とのデータ転送を実行するようにすることで、シーケンサ100はメモリアクセスアドレスの演算を省略できる。
By executing data transfer between the
<シーケンサ100の動作例>
次に、シーケンサ100の動作について図14を参照して説明する。図14は、シーケンサ100の動作の一例を示すフローチャートである。
<Operation example of
Next, the operation of the
まず、ステップS141において、シーケンサ100は、入力端子ポーリング命令の「16'hA401」に応答してシーケンサ実行信号アサートを検出する。入力端子ポーリング命令は、シーケンサ用ROM領域914中のアドレス0x500に格納されている。
First, in step S141, the
メインCPU21又はサブCPU22が制御レジスタ17の一つとして実装されているシーケンサ実行開始bitに「1」をライトすると、シーケンサ実行信号が「1」になる。シーケンサ実行信号は、制御レジスタ17から出力され、シーケンサ100の入力端子状態検出部107のbit0に対応する端子に入力する。入力端子ポーリング命令の「16'hA401」は、入力端子状態検出部107のbit0が「1」になるまで、ポーリングを実行する命令である。
When "1" is written to the sequencer execution start bit in which the
ステップS141でシーケンサ実行信号アサートが検出された場合は(ステップS141、Yes)、動作はステップS142に移行し、検出されなかった場合は(ステップS141、No)、ステップS141の動作が繰り返される。 If the sequencer execution signal assertion is detected in step S141 (step S141, Yes), the operation proceeds to step S142, and if it is not detected (step S141, No), the operation of step S141 is repeated.
続いて、ステップS142において、シーケンサ100は、繰り返しジャンプ命令の「32'h0600_D020」に応答して、32回の繰り返し処理実行を実行する。繰り返しジャンプ命令は、シーケンサ用ROM領域914中のアドレス0x502に格納されている。
Subsequently, in step S142, the
繰り返しジャンプ命令の初回実行時は、命令bit[7:0]の値8'h20が繰り返し回数としてロードされ、繰り返しジャンプ命令の2回目以降の実行時は、実行の都度、8'h20から「1」が減算される。 When the repeat jump instruction is executed for the first time, the value 8'h20 of the instruction bit [7: 0] is loaded as the number of repetitions, and when the repeat jump instruction is executed for the second time or later, 8'h20 to "1" is executed each time. Is subtracted.
繰り返し回数がゼロでない場合は、PC102の値が0x600番地で書き換えられ、繰り返し回数がゼロの場合は、PC102の値が0x506番地(繰り返しジャンプ命令の格納アドレス0x5022に「4」を加算)に書き換えられる。 If the number of repetitions is not zero, the value of PC102 is rewritten at address 0x600, and if the number of repetitions is zero, the value of PC102 is rewritten to address 0x506 (add "4" to the storage address 0x5022 of the repeat jump instruction). ..
続いて、ステップS143において、シーケンサ100は、繰り返しの最終回であるか否かを判定する。
Subsequently, in step S143, the
ステップS143で繰り返しの最終回でないと判定された場合は(ステップS143、No)、ステップS145において、シーケンサ100は、アドレス空間ポーリング命令の「32'h0020_B480」に応答して、1Byteのデータ転送準備の完了を検出する。
If it is determined in step S143 that it is not the final round of repetition (step S143, No), in step S145, the
アドレス空間ポーリング命令は、シーケンサ用ROM領域914中のアドレス0x600に格納されている。アドレス空間ポーリング命令では、流用モジュール制御レジスタ領域911のうち、アドレス0x020のbit[7]が「1」になるまで、ポーリング動作が継続される。
The address space polling instruction is stored at the address 0x600 in the ROM area 914 for the sequencer. In the address space polling instruction, the polling operation is continued until the bit [7] of the address 0x020 in the diversion module
アドレス0x020のbit[7]は、レガシーデバイス30が送信したデータを受信し、流用モジュール11からのデータ取り出しが可能であることを示すものである。アドレス0x200のbit[7]が「1」になると、PC102の値に「4」が加算され、ポーリング動作が終了する。
The bit [7] at the address 0x020 indicates that the data transmitted by the
ステップS145で1Byteのデータ転送準備の完了が検出されない場合は(ステップS145、No)、ステップS145の動作が繰り返され、検出された場合は(ステップS145、Yes)、動作はステップS146に移行する。 If the completion of the data transfer preparation of 1Byte is not detected in step S145 (step S145, No), the operation of step S145 is repeated, and if it is detected (step S145, Yes), the operation proceeds to step S146.
続いて、ステップS146において、シーケンサ100は、ローカルバスリード命令の「16'h5040」に応答して、流用モジュール11の送信用レジスタのリードを実行する。ローカルバスリード命令は、シーケンサ用ROM領域914中のアドレス0x604に格納されている。本命令により、流用モジュール制御レジスタ領域911のうち、アドレス0x040のデータがGR104に格納される。
Subsequently, in step S146, the
続いて、ステップS147において、シーケンサ100は、ローカルバスライト命令の「16'h4900」に応答して、リード結果のFIFO16へのライトを実行する。ローカルバスライト命令は、シーケンサ用ROM領域914中のアドレス0x606に格納されている。ローカルバスライト命令により、GR104に格納されているデータがFIFOライト用領域9161にライトされる。
Subsequently, in step S147, the
続いて、ステップS148において、シーケンサ100は、繰り返しジャンプ命令の「16'hC502」に応答して、格納アドレスへのジャンプを実行する。繰り返しジャンプ命令は、シーケンサ用ROM領域914中のアドレス0x608に格納されている。繰り返しジャンプ命令により、PC102の値が0x502に書き換えられる。
Subsequently, in step S148, the
一方、ステップS143で繰り返しの最終回であると判定された場合は(ステップS143、Yes)、ステップS144において、シーケンサ100は、出力端子制御命令の「16'h8B01」に応答して、完了信号のアサートを実行する。出力端子制御命令は、シーケンサ用ROM領域914中のアドレス0x506に格納されている。
On the other hand, if it is determined in step S143 that it is the final round of repetition (step S143, Yes), in step S144, the
出力端子制御命令によって出力端子制御命令実行部1141のbit[0]に対応する信号線のレベルが「1」になる。この信号線は、制御レジスタ17のうちのシーケンサ100の完了を示すレジスタのbit[0]に接続されており、レジスタのリードによりメインCPU21及びサブCPU22から信号線のレベルを検知できる。また完了信号をメインCPU21又はサブCPU22の割り込み要因として使用することで、シーケンサ100の完了を通知することもできる。
The output terminal control command sets the level of the signal line corresponding to bit [0] of the output terminal control
このようにしてシーケンサ100は動作することができる。
In this way, the
ここで、図15は、図14の動作例におけるシーケンサ用ROM領域914の一例について説明する図である。図14に示した動作は、シーケンサ用ROM領域914の容量としては18Byteあれば実現できる。図14の例に限らず、シーケンサ用ROM領域914に記載する内容により、シーケンサ100の動作を定義できる。
Here, FIG. 15 is a diagram illustrating an example of the ROM area 914 for the sequencer in the operation example of FIG. The operation shown in FIG. 14 can be realized if the capacity of the ROM area 914 for the sequencer is 18 bytes. Not limited to the example of FIG. 14, the operation of the
<シーケンサ100の作用効果>
従来、メインCPUに代えて専用ステートマシン又はサブCPUを用い、特定の処理を実行する技術が知られている。近年では、複数チップで実現していた機能をSoC(System on Chip)として1チップで実現することで、コストダウンを図る傾向がある。
<Action and effect of
Conventionally, there is known a technique of executing a specific process by using a dedicated state machine or a sub CPU instead of the main CPU. In recent years, there is a tendency to reduce costs by realizing a function realized by a plurality of chips as a SoC (System on Chip) on a single chip.
この場合に、レガシーデバイス等の既存のチップで使用していた回路を新たなSoCでそのまま流用できることが望ましいが、既存のチップのI/F(Interface)は、バス占有時間が長く1回のアクセスに時間を要したり、少しでも回路を節約するためにプロトコルが複雑化していたりするため、メインCPUのソフトウェアが複雑になること等により、既存のチップ部分の制御がシステム上の制約になる場合がある。 In this case, it is desirable that the circuit used in the existing chip such as a legacy device can be used as it is in the new SoC, but the I / F (Interface) of the existing chip has a long bus occupancy time and one access. When the control of the existing chip part becomes a constraint on the system due to the complexity of the software of the main CPU, etc. because it takes time or the protocol is complicated to save the circuit even a little. There is.
この制約に対して、既存のチップを制御する専用のサブCPUや専用のステートマシンを使用して制約を解消させることも考えられるが、専用ステートマシンを使用する方法では、開発工数が大きい上に、仕様変更発生時の対応工数も大きくなってしまう場合がある。 It is conceivable to solve this constraint by using a dedicated sub CPU or a dedicated state machine that controls the existing chip, but the method using the dedicated state machine requires a large amount of development man-hours. In some cases, the man-hours required to deal with changes in specifications may increase.
またサブCPUを使用する方法では、必要な処理内容が単純な場合には、サブCPUが数値演算部や割り込み処理部、キャッシュ等の過剰な機能を備えることで、無駄に回路規模が増大する場合がある。またサブCPUのソフトウェア開発環境を準備する必要があるため、専用ステートマシン開発に比べれば工数は少ないものの開発環境の習熟や維持に工数がかかる場合がある。 Further, in the method using the sub CPU, when the required processing content is simple, the sub CPU is provided with excessive functions such as a numerical calculation unit, an interrupt processing unit, and a cache, so that the circuit scale is unnecessarily increased. There is. Further, since it is necessary to prepare a software development environment for the sub CPU, the man-hours may be less than those for developing a dedicated state machine, but it may take more man-hours to master and maintain the development environment.
これに対し、回路規模の増大を抑制するために、汎用マイコンのCPUとROMの構成をシーケンサで置き換えるものが開示されている。またプログラミング作業を効率化するために、モーション制御用プログラミング言語と、シーケンス制御用プログラミング言語を相互変換する方法が開示されている。 On the other hand, in order to suppress an increase in the circuit scale, a sequencer replaces the CPU and ROM configurations of a general-purpose microcomputer with a sequencer. Further, in order to improve the efficiency of programming work, a method of mutual conversion between a programming language for motion control and a programming language for sequence control is disclosed.
しかしながら、汎用マイコンのCPUとROMの構成をシーケンサで置き換える構成では、演算器やレジスタ構造に汎用マイコンの構成を引き継ぐため、汎用マイコンの機能が過剰な場合に回路規模が無駄に大きくなる場合がある。またモーション制御用プログラミング言語とシーケンス制御用プログラミング言語を相互変換する方法では、回路規模の削減方法が開示されていないため、回路規模の大型化を抑制できない。 However, in a configuration in which the CPU and ROM configurations of a general-purpose microcomputer are replaced with a sequencer, the configuration of the general-purpose microcomputer is inherited by the arithmetic unit and register structure, so that the circuit scale may become unnecessarily large when the functions of the general-purpose microcomputer are excessive. .. Further, in the method of mutually converting the motion control programming language and the sequence control programming language, since the method of reducing the circuit scale is not disclosed, it is not possible to suppress the increase in the circuit scale.
これに対し、本実施形態では、ASIC1は、複数の実行命令を含む実行命令群を格納するROM14と、読み出した実行命令に応答した動作を実行するシーケンサ100とを備え、シーケンサ100は、入力端子ポーリング命令実行部1111及びアドレス空間ポーリング命令実行部1112と、繰り返しジャンプ命令実行部1122を備える。
On the other hand, in the present embodiment, the ASIC 1 includes a
シーケンス制御を実行するシーケンサ100を備えることで、数値演算回路と割り込み処理回路のASIC1への搭載を不要とし、その分ASIC1の回路規模の大型化を抑制できる。
By providing the
また入力端子ポーリング命令実行部1111及びアドレス空間ポーリング命令実行部1112のそれぞれが行うポーリングと、繰り返しジャンプ命令実行部1122が行う繰り返しジャンプは、ファクシミリモデム用のアナログフロントエンドデバイスや、専用の画像処理デバイス等のレガシーデバイス30の制御において頻発する動作である。
Further, the polling performed by the input terminal poll
本実施形態では、これらの動作を1つのポーリングの実行命令、又は1つの繰り返しジャンプ命令に応答して行えるようにし、プログラム等による複雑な実行命令を不要にしている。これにより、コンパイラ等の開発環境を用いずに、アセンブラ言語によりソフトウェアを効率よく開発できる。 In the present embodiment, these operations can be performed in response to one polling execution instruction or one repetitive jump instruction, and a complicated execution instruction by a program or the like is not required. As a result, software can be efficiently developed in assembler language without using a development environment such as a compiler.
また本実施形態では、ポーリング実行命令は、実行命令の種類を識別する識別情報と、ポーリング動作の終了条件を指定するポーリング終了条件指定部とを含み、ASIC1はポーリング動作で取得される情報を入力する入力端子を備える。これにより、入力端子レベルのポーリングを可能とし、シーケンサ100に直接接続する信号を使用して、シーケンサ100を制御できる。
Further, in the present embodiment, the polling execution instruction includes identification information for identifying the type of the execution instruction and a polling end condition specifying unit for specifying the end condition of the polling operation, and the ASIC1 inputs the information acquired in the polling operation. It is equipped with an input terminal. This enables polling at the input terminal level, and the
また本実施形態では、ポーリング実行命令は、実行命令の種類を識別する識別情報と、ポーリング動作の終了条件を指定するポーリング終了条件指定部と、ポーリング対象を示すポーリング対象データに対して論理演算するための命令付属データと、を含み、入力端子ポーリング命令実行部1111及びアドレス空間ポーリング命令実行部1112は、ASIC1に含まれるアドレス空間をリードしてポーリングする。これにより、流用モジュール11が割り込み信号を持っていない場合にも、割り込みフラグレジスタをポーリングすることで、割り込み機能と同等の動作を実現することができる。
Further, in the present embodiment, the polling execution instruction performs a logical calculation on the identification information for identifying the type of the execution instruction, the polling end condition specification unit for specifying the end condition of the polling operation, and the polling target data indicating the polling target. The input terminal polling
また本実施形態では、ポーリング終了条件指定部は、複数の論理演算種類のうちの1つを指定する論理演算指定データを含む。これにより、ポーリング終了条件を柔軟に設定することができる。 Further, in the present embodiment, the polling end condition designation unit includes the logical operation designation data for designating one of the plurality of logical operation types. This makes it possible to flexibly set the polling end condition.
また本実施形態では、ポーリング終了条件指定部は、ポーリング対象と命令付属データの全てのビットが一致すること、ポーリング対象と命令付属データの少なくとも1ビットが異なること、命令付属データの1に対応するビット位置にあるポーリング対象データの全てのビットが1であること、命令付属データの1に対応するビット位置にあるポーリング対象データの少なくとも1ビットが1であること、命令付属データの1に対応するビット位置にあるポーリング対象データの全てのビットが0であること、又は命令付属データの1に対応するビット位置にあるポーリング対象データの少なくとも1ビット0であること、の少なくとも1つを指定する。これにより、ポーリング終了条件を柔軟に設定することができる。
Further, in the present embodiment, the polling end condition specification unit corresponds to the fact that all the bits of the polling target and the instruction-attached data match, that at least one bit of the polling target and the instruction-attached data are different, and that the instruction-attached data is 1. All bits of the poll target data at the bit position are 1, that at least 1 bit of the poll target data at the bit position corresponding to 1 of the instruction attached data is 1, and it corresponds to 1 of the instruction attached data. It is specified that all the bits of the data to be polled at the bit position are 0, or at least 1
また本実施形態では、繰り返しジャンプ実行命令は、実行命令の種類を識別する識別情報と、PC102におけるジャンプ先アドレスと、繰り返しジャンプ回数を指定する回数指定部とを含み、繰り返しジャンプ命令実行部1122は、繰り返しジャンプ回数だけの繰り返しジャンプを実行後、PC102に対して繰り返しジャンプ実行命令のデータサイズに対応した値を加算する。これにより、繰り返し回数を同一命令で設定することができる。
Further, in the present embodiment, the repeat jump execution instruction includes identification information for identifying the type of execution instruction, a jump destination address in the
また本実施形態では、繰り返しジャンプ実行命令は、実行命令の種類を識別する識別情報と、PC102におけるジャンプ先アドレスとを含み、繰り返しジャンプ命令実行部1122は、GR104から取得した繰り返しジャンプ回数分のジャンプの実行完了後、PC102に対して繰り返しジャンプ実行命令のデータサイズに対応した値を加算する。これにより、繰り返し回数を他のレジスタからリードした値で設定できる。
Further, in the present embodiment, the repetitive jump execution instruction includes identification information for identifying the type of the execution instruction and the jump destination address in the
また本実施形態では、繰り返しジャンプ実行命令は、実行命令の種類を識別する識別情報と、PC102におけるジャンプ先アドレスと、繰り返しジャンプ回数を指定する回数指定部と、繰り返しジャンプ回数の取得先を指定する取得先指定部とを含み、繰り返しジャンプ命令実行部1122は、繰り返しジャンプ回数の取得先から繰り返しジャンプ回数を取得する。これにより、繰り返し回数を、柔軟に設定することができる。
Further, in the present embodiment, the repeat jump execution instruction specifies identification information for identifying the type of execution instruction, a jump destination address in the
また本実施形態では、メインCPU21及びサブCPU22と、DDRメモリ50と、を備え、DDRメモリ50におけるシーケンサ100のアクセス可能なアドレス範囲は、DDRメモリ50におけるメインCPU21及びサブCPU22のアクセス可能なアドレス範囲よりも狭い。これにより、シーケンサ100の回路規模を小さくすることができる。
Further, in the present embodiment, the
また本実施形態では、シーケンサ100とメインCPU21及びサブCPU22の間のデータ転送用のFIFO16を備える。これにより、シーケンサ100にアドレス演算機能がなくても、まとまった量のデータを転送することができ、演算機能の分だけシーケンサ100の回路規模を小さくすることができる。
Further, in the present embodiment, a
[その他の実施形態]
第1実施形態では、シーケンサ100を備えるASIC1をシステムの一例として説明したが、システムはASIC1に限定されるものではない。システムは、シーケンサ100、又はASIC1を備える装置であってもよい。この装置には、MFP(Multifunction Peripheral Product Printer)やPJ(Projector:プロジェクタ)、IWB(Interactive White Board:相互通信が可能な電子式の黒板機能を有する白板)、デジタルサイネージ等の出力装置、HUD(Head Up Display)装置、産業機械、撮像装置、集音装置、医療機器、ネットワーク家電、自動車(Connected Car)、ノートPC(Personal Computer)、携帯電話、スマートフォン、タブレット端末、ゲーム機、PDA(Personal Digital Assistant)、デジタルカメラ、ウェアラブルPCまたはデスクトップPC等が挙げられる。
[Other Embodiments]
In the first embodiment, the ASIC1 including the
以上、実施形態を説明したが、本発明は、具体的に開示された上記の実施形態に限定されるものではなく、特許請求の範囲から逸脱することなく、種々の変形や変更が可能である。 Although the embodiments have been described above, the present invention is not limited to the above-described embodiments specifically disclosed, and various modifications and changes can be made without departing from the scope of claims. ..
1 ASIC(システムの一例)
14 ROM(格納部の一例)
16 FIFO(先入れ先出し部の一例)
21 メインCPU(プロセッサの一例)
22 サブCPU(プロセッサの一例)
100 シーケンサ(プログラマブルシーケンサの一例)
101 メインステートマシン(状態制御部の一例)
102 PC(格納位置記憶部の一例)
104 GR(実行記憶部の一例)
1031 IR下位(命令記憶部の一例)
1032 IR上位(命令記憶部の一例)
1100 命令実行部
1111 入力端子ポーリング命令実行部(ポーリング実行部の一例)
1112 アドレス空間ポーリング命令実行部(ポーリング実行部の一例)
1122 繰り返しジャンプ命令実行部(繰り返しジャンプ実行部の一例)
1 ASIC (example of system)
14 ROM (an example of storage unit)
16 FIFO (an example of first-in first-out section)
21 Main CPU (example of processor)
22 Sub CPU (example of processor)
100 sequencer (an example of programmable sequencer)
101 Main state machine (example of state control unit)
102 PC (an example of storage position storage unit)
104 GR (Example of execution storage unit)
1031 IR lower level (example of command storage unit)
1032 IR upper level (an example of instruction storage unit)
1100
1112 Address space polling instruction execution unit (example of polling execution unit)
1122 Repeated jump instruction execution unit (example of repeated jump execution unit)
Claims (14)
読み出した前記実行命令に応答した動作を実行するプログラマブルシーケンサと、を備え、
前記プログラマブルシーケンサは、ポーリング実行命令に応答してポーリング動作を実行するポーリング実行部、又は繰り返しジャンプ実行命令に応答して繰り返しジャンプ動作を実行する繰り返しジャンプ実行部の少なくとも一方を備える
システム。 A storage unit that stores a group of execution instructions including multiple execution instructions,
A programmable sequencer that executes an operation in response to the read execution instruction is provided.
The programmable sequencer is a system including at least one of a polling execution unit that executes a polling operation in response to a polling execution instruction and a repetitive jump execution unit that executes a repetitive jump operation in response to a repetitive jump execution instruction.
請求項1に記載のシステム。 The system according to claim 1, wherein the polling execution unit executes the polling operation in response to one polling execution instruction.
請求項1、又は2に記載のシステム。 The system according to claim 1 or 2, wherein the repetitive jump execution unit executes the repetitive jump operation in response to one repetitive jump execution command.
前記ポーリング動作で取得される情報を入力する入力端子を備える
請求項1乃至3の何れか1項に記載のシステム。 The polling execution instruction includes identification information for identifying the type of the execution instruction and a polling end condition specifying unit for designating the end condition of the polling operation.
The system according to any one of claims 1 to 3, further comprising an input terminal for inputting information acquired by the polling operation.
前記ポーリング実行部は、前記システムに含まれるアドレス空間をリードしてポーリングする
請求項1乃至4の何れか1項に記載のシステム。 The polling execution instruction is an instruction for performing a logical operation on the identification information that identifies the type of the execution instruction, the polling end condition specification unit that specifies the end condition of the polling operation, and the polling target data indicating the polling target. Including attached data,
The system according to any one of claims 1 to 4, wherein the polling execution unit leads and polls the address space included in the system.
請求項4、又は5に記載のシステム。 The system according to claim 4 or 5, wherein the polling end condition designation unit includes logical operation designation data for designating one of a plurality of logical operation types.
前記ポーリング対象と前記命令付属データの全てのビットが一致すること、
前記ポーリング対象と前記命令付属データの少なくとも1ビットが異なること、
前記命令付属データの1に対応するビット位置にある前記ポーリング対象データの全てのビットが1であること、
前記命令付属データの1に対応するビット位置にある前記ポーリング対象データの少なくとも1ビットが1であること、
前記命令付属データの1に対応するビット位置にある前記ポーリング対象データの全てのビットが0であること、
又は前記命令付属データの1に対応するビット位置にある前記ポーリング対象データの少なくとも1ビット0であること、の少なくとも1つを指定する
請求項6に記載のシステム。 The polling end condition designation unit is
That all the bits of the polling target and the data attached to the instruction match.
At least one bit of the polling target and the data attached to the instruction are different.
All bits of the polling target data at the bit position corresponding to 1 of the instruction attached data are 1.
At least one bit of the polling target data at the bit position corresponding to 1 of the instruction attached data is 1.
All bits of the polling target data at the bit position corresponding to 1 of the instruction attached data are 0.
The system according to claim 6, wherein at least one of the polling target data is at least 1 bit 0 at a bit position corresponding to 1 of the instruction attachment data.
前記格納部から直近に実行対象となる前記実行命令の前記格納部における格納位置を記憶する格納位置記憶部と、
前記格納位置に基づき、前記格納部から前記実行命令を読み出すとともに、前記格納位置記憶部に記憶された前記格納位置を更新する状態制御部と、
前記状態制御部により読み出された前記実行命令を記憶する命令記憶部と、
前記命令記憶部に記憶された前記実行命令に応答した動作を実行する命令実行部と、
前記命令実行部の動作の実行時にライト、又はリードされる実行記憶部と、を備える
請求項1乃至7の何れか1項に記載のシステム。 The programmable sequencer is
A storage position storage unit that stores the storage position of the execution instruction to be executed most recently from the storage unit in the storage unit, and a storage position storage unit.
A state control unit that reads the execution instruction from the storage unit and updates the storage position stored in the storage position storage unit based on the storage position.
An instruction storage unit that stores the execution instruction read by the state control unit,
An instruction execution unit that executes an operation in response to the execution instruction stored in the instruction storage unit,
The system according to any one of claims 1 to 7, further comprising an execution storage unit that is written or read when the operation of the instruction execution unit is executed.
前記繰り返しジャンプ実行部は、前記繰り返しジャンプ回数だけの前記繰り返しジャンプを実行後、前記格納位置記憶部に対して前記繰り返しジャンプ実行命令のデータサイズに対応した値を加算する
請求項8に記載のシステム。 The repetitive jump execution instruction includes identification information for identifying the type of the execution instruction, a jump destination address in the storage position storage unit, and a number of times designation unit for designating the number of repetitive jumps.
The system according to claim 8, wherein the repetitive jump execution unit executes the repetitive jump for the number of repetitive jumps, and then adds a value corresponding to the data size of the repetitive jump execution instruction to the storage position storage unit. ..
前記繰り返しジャンプ実行部は、前記実行記憶部から取得した繰り返しジャンプ回数分のジャンプの実行完了後、前記格納位置記憶部に対して前記繰り返しジャンプ実行命令のデータサイズに対応した値を加算する
請求項8、又は9に記載のシステム。 The repetitive jump execution instruction includes identification information for identifying the type of the execution instruction and a jump destination address in the storage position storage unit.
The claim that the repetitive jump execution unit adds a value corresponding to the data size of the repetitive jump execution instruction to the storage position storage unit after the execution of the jump for the number of repetitive jumps acquired from the execution storage unit is completed. 8. Or 9, the system according to 9.
前記繰り返しジャンプ実行部は、前記繰り返しジャンプ回数の取得先から前記繰り返しジャンプ回数を取得する
請求項8乃至10の何れか1項に記載のシステム。 The repeat jump execution instruction specifies identification information for identifying the type of the execution instruction, a jump destination address in the storage position storage unit, a number designation unit for specifying the number of repeat jumps, and an acquisition destination for the repeat jump count. Including the acquisition destination designation part and
The system according to any one of claims 8 to 10, wherein the repeated jump execution unit acquires the number of repeated jumps from the acquisition destination of the number of repeated jumps.
メモリと、を備え、
前記メモリにおける前記プログラマブルシーケンサのアクセス可能なアドレス範囲は、前記メモリにおける前記プロセッサのアクセス可能なアドレス範囲よりも狭い
請求項1乃至11の何れか1項に記載のシステム。 With the processor
With memory,
The system according to any one of claims 1 to 11, wherein the accessible address range of the programmable sequencer in the memory is narrower than the accessible address range of the processor in the memory.
請求項12に記載のシステム。 12. The system of claim 12, further comprising a first-in, first-out section for data transfer between the programmable sequencer and the processor.
前記格納位置に基づき、前記格納部から前記実行命令を読み出すとともに、前記格納位置記憶部に記憶された前記格納位置を更新する状態制御部と、
前記状態制御部により読み出された前記実行命令を記憶する命令記憶部と、
前記命令記憶部に記憶された前記実行命令に応答した動作を実行する命令実行部と、
前記命令実行部の動作の実行時にライト、又はリードされる実行記憶部と、を備える
プラグラマブルシーケンサ。 A storage position storage unit that stores the storage position of the execution instruction to be executed most recently from the storage unit that stores the execution instruction group including a plurality of execution instructions in the storage unit.
A state control unit that reads the execution instruction from the storage unit and updates the storage position stored in the storage position storage unit based on the storage position.
An instruction storage unit that stores the execution instruction read by the state control unit,
An instruction execution unit that executes an operation in response to the execution instruction stored in the instruction storage unit,
A pluggable sequencer including an execution storage unit that is written or read when the operation of the instruction execution unit is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019216757A JP2021086506A (en) | 2019-11-29 | 2019-11-29 | System and programmable sequencer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019216757A JP2021086506A (en) | 2019-11-29 | 2019-11-29 | System and programmable sequencer |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021086506A true JP2021086506A (en) | 2021-06-03 |
Family
ID=76087897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019216757A Pending JP2021086506A (en) | 2019-11-29 | 2019-11-29 | System and programmable sequencer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021086506A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023050863A1 (en) * | 2021-09-29 | 2023-04-06 | 深圳大普微电子科技有限公司 | Driving signal generation method and apparatus, device and readable storage medium |
-
2019
- 2019-11-29 JP JP2019216757A patent/JP2021086506A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023050863A1 (en) * | 2021-09-29 | 2023-04-06 | 深圳大普微电子科技有限公司 | Driving signal generation method and apparatus, device and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
USRE48736E1 (en) | Memory system having high data transfer efficiency and host controller | |
CN114443529B (en) | Direct memory access architecture, system, method, electronic device and medium | |
JP4837659B2 (en) | Bus controller for processing split transactions | |
JP5895840B2 (en) | Multiprocessor system, execution control method, execution control program | |
JP2004171209A (en) | Shared memory data transfer device | |
EP1730643A2 (en) | Pvdm (packet voice data module) generic bus protocol | |
JP2004070571A (en) | Data transfer control system, electronic equipment, program and data transfer control method | |
CN115827524A (en) | Data transmission method and device | |
CN101421705B (en) | Multi media card with high storage capacity | |
JP2021086506A (en) | System and programmable sequencer | |
JP4855864B2 (en) | Direct memory access controller | |
JP5304815B2 (en) | Microcomputer | |
US20040068590A1 (en) | Data processor | |
US20060184708A1 (en) | Host controller device and method | |
US8756356B2 (en) | Pipe arbitration using an arbitration circuit to select a control circuit among a plurality of control circuits and by updating state information with a data transfer of a predetermined size | |
JP3477306B2 (en) | Extended input / output interface | |
CN116483259A (en) | Data processing method and related device | |
JP2006268753A (en) | Dma circuit and computer system | |
JP2009181579A (en) | Method, subsystem and system for invoking function | |
JP2001236335A (en) | Decentralized memory type parallel computer and its data transfer end confirming method | |
JP2011059787A (en) | Digital signal processor system and starting method for digital signal processor | |
JP2006285724A (en) | Information processor and information processing method | |
US20230305816A1 (en) | Device and method for handling programming language function | |
JP4363431B2 (en) | Data transfer method | |
JP2001209609A (en) | Microcomputer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220914 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231205 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240129 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240409 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240522 |