JP7797946B2 - RFID system, allocation device, and allocation method - Google Patents
RFID system, allocation device, and allocation methodInfo
- Publication number
- JP7797946B2 JP7797946B2 JP2022062117A JP2022062117A JP7797946B2 JP 7797946 B2 JP7797946 B2 JP 7797946B2 JP 2022062117 A JP2022062117 A JP 2022062117A JP 2022062117 A JP2022062117 A JP 2022062117A JP 7797946 B2 JP7797946 B2 JP 7797946B2
- Authority
- JP
- Japan
- Prior art keywords
- variable
- memory
- variables
- allocation
- memory blocks
- 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
Links
Landscapes
- Memory System (AREA)
Description
本発明はRFIDシステムにおける変数の割り当てに関する。 The present invention relates to the assignment of variables in RFID systems.
RFID(Radio Frequency Identifier)タグは、リーダライタと非接触で通信し、リーダライタから受信したデータを当該RFIDタグの不揮発性メモリに記憶する。また、リーダライタはRFIDタグに記憶されているデータを非接触で読み出す。このようなリーダライタとRFIDタグとを用いたRFIDシステムが広く用いられている。 RFID (Radio Frequency Identifier) tags communicate with reader/writers without contact, and store data received from the reader/writer in the RFID tag's non-volatile memory. The reader/writer also reads data stored in the RFID tag without contact. RFID systems using such reader/writers and RFID tags are widely used.
特許文献1に、メモリの内容をメモリダンプとして吐き出し、当該メモリダンプを解析する技術が開示されている。特許文献1には、メモリダンプの解析に際し、メモリダンプによるテーブルの内容を分析し、人が見てわかるように表示したり、不必要な箇所を削除したり、必要な箇所を強調表示したりすることが開示されている。 Patent Document 1 discloses technology for dumping memory contents as a memory dump and analyzing the memory dump. Patent Document 1 also discloses that when analyzing a memory dump, the contents of tables from the memory dump are analyzed, and the data is displayed in a way that is easy for people to understand, unnecessary parts are deleted, and necessary parts are highlighted.
ここで、RFIDタグのメモリに用いられる不揮発性メモリであるEEPROM(Electrically Erasable Programmable Read-Only Memory)(登録商標)は、連続した複数のバイトを集めたメモリブロック単位でのメモリアクセスを行うものである。つまり、特定の変数に対してメモリアクセス(取得または更新)するに際し、当該変数が格納されているメモリブロック全てにメモリアクセスする必要がある。 Here, EEPROM (Electrically Erasable Programmable Read-Only Memory) (registered trademark), a non-volatile memory used in RFID tags, performs memory access in units of memory blocks, which are collections of multiple consecutive bytes. In other words, when accessing (retrieving or updating) a specific variable, it is necessary to access all memory blocks in which that variable is stored.
そのため、変数の割り当ての仕方によっては、単一のメモリブロックに収まるサイズの変数を、複数のメモリブロックに割り当てることがあり、メモリアクセスに無駄が生じてしまう。 As a result, depending on how variables are allocated, variables that would fit in a single memory block may be allocated to multiple memory blocks, resulting in wasted memory access.
また、RFIDタグに用いられるEEPROMには書込回数(更新回数)に上限があり、10万回程である。そのため、1つのメモリブロックに複数の変数が割り当てられた場合、他の変数の更新によっても書込回数を消費することになり、RFIDタグの寿命を縮めることに繋がり得る。 In addition, the EEPROM used in RFID tags has a limit on the number of writes (updates), which is around 100,000. Therefore, if multiple variables are assigned to one memory block, updating the other variables will consume writes, which can shorten the lifespan of the RFID tag.
本発明の一態様は、RFIDタグにおける変数の割り当てにおいて、メモリアクセスの無駄を低減することを目的とする。 One aspect of the present invention aims to reduce wasted memory accesses when assigning variables in RFID tags.
上記の課題を解決するために、本発明の一態様に係るRFIDシステムは、所定のブロックサイズのアドレス単位である、メモリブロック毎にメモリアクセスを行うRFIDタグを用いたRFIDシステムであって、前記RFIDタグのメモリに割り当てる複数の変数と、各変数のサイズまたはアドレスの範囲とを取得する取得部と、前記変数が使用する前記メモリブロックの数を、前記変数のサイズまたはアドレスの範囲から求まる前記変数を割り当てるために必要とする必要メモリブロック数とするように、前記変数をメモリに割り当てる割当部と、を備える。 In order to solve the above problems, one aspect of the present invention provides an RFID system that uses an RFID tag that accesses memory on a memory block-by-memory block basis, which is an address unit of a predetermined block size. The system includes an acquisition unit that acquires multiple variables to be allocated to the memory of the RFID tag and the size or address range of each variable, and an allocation unit that allocates the variables to memory such that the number of memory blocks used by the variables is the number of memory blocks required to allocate the variables, which is determined from the size or address range of the variables.
上記の構成では、各変数が必要メモリブロック数のメモリブロックに割り当てられることになり、最小のメモリアクセスにて各変数にメモリアクセスすることができる。そのため、メモリアクセスが効率的である。 In the above configuration, each variable is allocated to the required number of memory blocks, allowing each variable to be accessed with minimal memory access. This makes memory access efficient.
前記割当部は、前記変数ごとに異なる前記メモリブロックを割り当ててもよい。 The allocation unit may allocate a different memory block for each variable.
上記の構成では、変数ごとに異なるメモリブロックに割り当てられるため、単一のメモリブロックを複数の変数が共有することがない。そのため、更新回数が制限されているRFIDタグを長寿命化することができる。 In the above configuration, each variable is assigned to a different memory block, so a single memory block is not shared by multiple variables. This allows for a longer lifespan for RFID tags, which have a limited number of updates.
前記割当部は、仮に第1変数が割り当てられた領域の続きに第2変数を割り当てると、前記第2変数が使用する前記メモリブロックの数が前記必要メモリブロック数よりも大きくなる場合、前記第2変数を前記第1変数が割り当てられた前記メモリブロックには割り当てず、別の前記メモリブロックに割り当ててもよい。 If allocating the second variable to the area following the area allocated to the first variable would result in the number of memory blocks used by the second variable being greater than the required number of memory blocks, the allocating unit may allocate the second variable to a different memory block rather than to the memory block allocated to the first variable.
上記の構成では、複数の変数が単一のメモリブロックを共有することができる。そのため、RFIDタグの不揮発性メモリの使用量を節約することができる。また、使用するメモリブロックの数を削減することができるため、メモリアクセスが高速になる。 In the above configuration, multiple variables can share a single memory block. This reduces the amount of non-volatile memory used in the RFID tag. Also, since the number of memory blocks used can be reduced, memory access becomes faster.
前記RFIDシステムは、ユーザによって割り当てられた前記変数が使用する前記メモリブロックの数が、前記必要メモリブロック数よりも大きい場合に、警告を発する警告部を更に備えてもよい。 The RFID system may further include a warning unit that issues a warning if the number of memory blocks used by the variables assigned by the user is greater than the required number of memory blocks.
上記の構成では、ユーザ入力によって割り当てられた変数によって使用されるメモリブロックの数が、必要メモリブロック数より大きい場合に警告を発することができる。 With the above configuration, a warning can be issued if the number of memory blocks used by variables allocated by user input is greater than the number of memory blocks required.
前記取得部は、複数の前記変数を含むグループの情報をさらに取得し、前記RFIDシステムは、単一の前記メモリブロックに、異なるグループに属する前記変数が割り当てられている場合に、警告を発する警告部を更に備えてもよい。 The acquisition unit may further acquire information about groups containing multiple variables, and the RFID system may further include a warning unit that issues a warning when variables belonging to different groups are assigned to a single memory block.
上記の構成では、同じタイミングにメモリアクセスされる場合が多い複数の変数のグループごとにメモリブロックを割り当てることができる。そのため、複数の変数が単一のメモリブロックを共有している場合であっても、同じタイミングにメモリアクセスする複数の変数が同一のグループに含まれることになるため、効率的なメモリアクセスと、RFIDタグの長寿命化と、高速なメモリアクセスとを実現できる。 With the above configuration, a memory block can be assigned to each group of multiple variables that often have memory access at the same time. Therefore, even if multiple variables share a single memory block, multiple variables that have memory access at the same time will be included in the same group, achieving efficient memory access, a longer lifespan for RFID tags, and faster memory access.
前記取得部は、前記変数の更新頻度をさらに取得し、前記RFIDシステムは、単一の前記メモリブロックに、少なくとも2個以上の前記変数が含まれた場合に、一方の変数の前記更新頻度と、他方の変数の前記更新頻度とを比較し、予め定めた条件に従い警告を発する警告部を更に備えてもよい。 The acquisition unit may further acquire the update frequency of the variables, and the RFID system may further include a warning unit that, when a single memory block contains at least two of the variables, compares the update frequency of one variable with the update frequency of another variable and issues a warning according to predetermined conditions.
上記の構成では、複数の変数が単一のメモリブロックを共有する場合に、当該単一のメモリブロックに割り当てられた変数の更新頻度によって、許容される変数の組み合わせを限定することができる。 In the above configuration, when multiple variables share a single memory block, the allowable combinations of variables can be limited depending on the update frequency of the variables assigned to that single memory block.
例えば、更新頻度が高い変数と1回書き込んだ後は変更する必要がない変数とが単一のメモリブロックを共有する場合には、RFIDタグの寿命を十分保障することができることもある。しかし、あるタイミングで更新される更新頻度が高い変数と別のタイミングで更新される更新頻度が高い変数とが単一のメモリブロックを共有する場合では、RFIDタグの寿命を保障することができなくなることがある。更新頻度を考慮することで、このような場合を防ぐことができる。そのため、RFIDタグの長寿命化を実現できる。 For example, if a variable that is updated frequently and a variable that does not need to be changed after being written once share a single memory block, it may be possible to adequately guarantee the lifespan of the RFID tag. However, if a variable that is updated frequently at one time and a variable that is updated frequently at another time share a single memory block, it may not be possible to guarantee the lifespan of the RFID tag. By taking the update frequency into consideration, such cases can be prevented, thereby achieving a longer lifespan for RFID tags.
前記RFIDシステムは、前記変数が予め定めたメモリ領域外に割り当てられている場合に、警告を発する警告部を更に備えてもよい。 The RFID system may further include a warning unit that issues a warning if the variable is allocated outside a predetermined memory area.
上記の構成では、変数が割り当てられるメモリブロックを限定することができる。そのため、変数を割り当ててはいけない予約領域に、変数を割り当てることがないため、RFIDシステムの不適切な動作を防止することができる。 The above configuration allows you to limit the memory blocks to which variables are assigned. This prevents variables from being assigned to reserved areas where they should not be assigned, preventing improper operation of the RFID system.
上記の課題を解決するために、本発明の別の態様に係る割当装置は、所定のブロックサイズのアドレス単位である、メモリブロック毎にメモリアクセスを行うRFIDタグのメモリ割り当てを行う割当装置であって、前記RFIDタグのメモリに割り当てる複数の変数と、各変数のサイズまたはアドレスの範囲とを取得する取得部と、前記変数が使用する前記メモリブロックの数を、前記変数のサイズまたはアドレスの範囲から求まる前記変数を割り当てるために必要とする必要メモリブロック数とするように、前記変数をメモリに割り当てる割当部と、を備える。 To solve the above problem, an allocation device according to another aspect of the present invention allocates memory to an RFID tag that accesses memory on a memory block-by-memory block basis, which is an address unit of a predetermined block size. The allocation device includes an acquisition unit that acquires multiple variables to allocate to the memory of the RFID tag and the size or address range of each variable, and an allocation unit that allocates the variables to memory such that the number of memory blocks used by the variables is the number of memory blocks required to allocate the variables, which is determined from the size or address range of the variables.
上記の課題を解決するために、本発明の別の態様に係る割当方法は、RFIDタグのメモリに割り当てる複数の変数と、各変数のサイズまたはアドレスの範囲とを取得する取得ステップと、前記変数が使用するメモリブロックの数を、前記変数のサイズまたはアドレスの範囲から求まる前記変数を割り当てるために必要とする必要メモリブロック数とするように、前記変数をメモリに割り当てる割当ステップと、を含む。 To solve the above problem, an allocation method according to another aspect of the present invention includes an acquisition step of acquiring multiple variables to be allocated to the memory of an RFID tag and the size or address range of each variable, and an allocation step of allocating the variables to memory so that the number of memory blocks used by the variables is the number of memory blocks required to allocate the variables, as determined from the size or address range of the variables.
本発明の一態様によれば、RFIDタグのメモリアクセスを効率化する。 One aspect of the present invention improves the efficiency of memory access in RFID tags.
〔実施形態1〕
以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。
[Embodiment 1]
Hereinafter, an embodiment according to one aspect of the present invention (hereinafter also referred to as "the present embodiment") will be described with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference numerals, and description thereof will not be repeated.
§1 適用例
図1は、実施形態1に係るRFIDシステム1の要部の構成を示すブロック図である。図1に示すように、RFIDシステム1は、サーバ(割当装置)2と、リーダライタ3と、RFIDタグ4と、を備える。RFIDシステム1では、サーバ2によってユーザ操作を受け付け、RFIDタグ4に書き込むメモリの割り当てを決定し、リーダライタ3を介してRFIDタグ4に決定した割り当てでメモリを更新する。
§1 Application Example Fig. 1 is a block diagram showing the configuration of the main parts of an RFID system 1 according to embodiment 1. As shown in Fig. 1, the RFID system 1 includes a server (allocation device) 2, a reader/writer 3, and an RFID tag 4. In the RFID system 1, the server 2 accepts user operations, determines the allocation of memory to be written to the RFID tag 4, and updates the memory of the RFID tag 4 with the determined allocation via the reader/writer 3.
RFIDタグ4で用いられる不揮発性メモリでは、メモリアクセスは連続した複数のバイトを集めたメモリブロック単位で行う。そのため、メモリの割り当て状況が、メモリブロックを亘って横断するように変数を割り当てていた場合、本来不要なはずのメモリアクセスが発生する。つまり、メモリアクセスに要する時間が増大し、非効率である。 In the non-volatile memory used in RFID tags 4, memory access is performed in units of memory blocks, which are collections of multiple consecutive bytes. Therefore, if the memory allocation situation involves assigning variables across memory blocks, unnecessary memory access occurs. This means that the time required for memory access increases, making it inefficient.
本実施形態では、メモリアクセスが非効率になる割り当てを行わないようにする機能を備えたRFIDシステムを実現する。 In this embodiment, an RFID system is realized that has the function of preventing allocations that result in inefficient memory access.
§2 構成例
(RFIDシステム1の構成)
サーバ2は、RFIDタグ4のメモリに変数の割り当てを行うユーザが操作する対象であり、ユーザ入力によって割り当てを行う変数の入力から、実際の変数の割り当てまでを行う。また、割り当てを行った変数に異常等が発生した場合は、サーバ2は警告を発する。
§2 Configuration example (Configuration of RFID system 1)
The server 2 is operated by a user who assigns variables to the memory of the RFID tag 4, and handles everything from inputting variables to be assigned by the user to actually assigning the variables. If an abnormality occurs in an assigned variable, the server 2 issues a warning.
リーダライタ3は、サーバ2の指示に従い、RFIDタグ4のデータを取得および/または更新する。 The reader/writer 3 acquires and/or updates data from the RFID tag 4 according to instructions from the server 2.
RFIDタグ4は、不揮発性メモリにデータを記憶し、リーダライタと無線通信することで、データを出力および/または更新する。不揮発性メモリは、EEPROMを採用する。 The RFID tag 4 stores data in non-volatile memory and outputs and/or updates the data by wirelessly communicating with a reader/writer. The non-volatile memory uses EEPROM.
(サーバ2の構成)
サーバ2は、取得部21と、割当部23と、警告部24と、を備える。また、サーバ2には、ディスプレイ51、キーボード52、および表示灯53が接続されている。
(Configuration of Server 2)
The server 2 includes an acquisition unit 21, an allocation unit 23, and a warning unit 24. The server 2 is also connected to a display 51, a keyboard 52, and an indicator light 53.
取得部21は、外部の機器から変数の割り当てに関する情報を取得し、割当情報22に出力する。また、取得部21は、キーボード52などによるユーザ入力によって、割り当てを行う変数を入力し、割当情報22に出力してもよい。 The acquisition unit 21 acquires information regarding variable allocation from an external device and outputs it to the allocation information 22. The acquisition unit 21 may also input the variables to be allocated via user input via the keyboard 52 or the like and output it to the allocation information 22.
図2は、割当情報22の設定項目である。図2に示すように、割当情報22には、変数名称と、変数型と、開始アドレスと、終了アドレスと、変数のサイズと、が記載されている。つまり、取得部21は、RFIDタグのメモリに割り当てる複数の変数と、各変数のサイズまたはアドレスの範囲とを取得する。 Figure 2 shows the setting items of the allocation information 22. As shown in Figure 2, the allocation information 22 contains the variable name, variable type, start address, end address, and variable size. In other words, the acquisition unit 21 acquires multiple variables to be allocated to the RFID tag's memory and the size or address range of each variable.
このうち、開始アドレスと終了アドレスと変数のサイズとは相互に関係している。変数のサイズを変更することによって開始アドレスを考慮して終了アドレスが変更され、終了アドレスを変更することによって開始アドレスを考慮して変数のサイズが変更される。開始アドレスを変更することによって、変数のサイズを考慮して終了アドレスが変更される。 Of these, the start address, end address, and size of the variable are interrelated. Changing the size of the variable changes the end address taking the start address into account, and changing the end address changes the size of the variable taking the start address into account. Changing the start address changes the end address taking the size of the variable into account.
また、変数型の一部と変数のサイズとも相互に関係している。例えば、「INT」は16ビット整数を表し、2バイトなため変数のサイズが2となる。また、「LONG」は64ビット整数を表し、8バイトなため変数のサイズが8となる。対して、「ASCII」は1バイトコードを表し、1バイトにつき1文字を表すため、実質的に変数のサイズが文字数に相当する。また、「BOOL」は、実際には変数のサイズが1ビットであるが、メモリアクセスの観点から1サイズ(1バイト)が割り当てられている。「BCD」は、10進数の数字の桁数に応じた変数のサイズとなる。 There is also a correlation between some variable types and the size of the variable. For example, "INT" represents a 16-bit integer and is 2 bytes, so the variable size is 2. "LONG" represents a 64-bit integer and is 8 bytes, so the variable size is 8. In contrast, "ASCII" represents a 1-byte code, with 1 byte representing 1 character, so the variable size essentially corresponds to the number of characters. Also, "BOOL" actually has a variable size of 1 bit, but is assigned a size of 1 byte from the perspective of memory access. "BCD" has a variable size that corresponds to the number of decimal digits.
割当部23は、割当情報22に従い、RFIDタグの不揮発性メモリに変数を割り当てる。また、割り当て部23は、割当情報22に記載の設定項目が所定のルールに則っていない場合、所定の割当ルールに従い適宜修正し、変数の割り当てを行う機能(自動割当)も有する。所定の割当ルールに関しては詳細を後述する。 The allocation unit 23 allocates variables to the non-volatile memory of the RFID tag in accordance with the allocation information 22. Furthermore, if the setting items described in the allocation information 22 do not conform to predetermined rules, the allocation unit 23 also has the function of appropriately correcting them in accordance with the predetermined allocation rules and allocating variables (automatic allocation). Details of the predetermined allocation rules will be provided later.
警告部24は、割当情報22に記載の設定項目においてメモリアクセスに無駄が発生する状態になっている場合または所定のメモリ領域を超過して割り当てが行われている場合に、表示灯53を介して警告を発する。警告を発する媒体としては、表示灯に限定されず、任意の媒体でも、任意の方法でもよい。例えば、ディスプレイ51に警告を表示してもよい。 The warning unit 24 issues a warning via the indicator light 53 when a setting item described in the allocation information 22 is in a state where wasteful memory access occurs or when allocation exceeds a specified memory area. The medium for issuing the warning is not limited to an indicator light, and any medium or method may be used. For example, the warning may be displayed on the display 51.
なお、割当部23が変数の割り当てを行い、割当情報22を修正した後、取得部21によってユーザ入力を受け付けて、適宜変数の割り当てを変更してもよい。この場合でも、警告部24は動作しており、警告を発することができる。 In addition, after the allocation unit 23 allocates variables and modifies the allocation information 22, the acquisition unit 21 may accept user input and change the variable allocation as appropriate. Even in this case, the warning unit 24 remains operational and can issue a warning.
(不揮発性メモリについて)
ここで、RFIDタグ4の不揮発性メモリのメモリ構成に関して説明する。RFIDタグ4では、不揮発性メモリを多数のメモリブロックに分割して管理している。メモリブロックは所定のブロックサイズのアドレス単位のものである。メモリブロックのブロックサイズは、RFIDタグ4によって異なっている。例えば、本実施形態ではメモリブロックのブロックサイズを4バイトとする。
(Regarding non-volatile memory)
Here, we will explain the memory configuration of the nonvolatile memory of the RFID tag 4. In the RFID tag 4, the nonvolatile memory is divided into a number of memory blocks for management. The memory blocks are address units of a predetermined block size. The block size of the memory blocks varies depending on the RFID tag 4. For example, in this embodiment, the block size of the memory blocks is 4 bytes.
RFIDタグ4のメモリアクセスは、メモリブロックごとである。つまり、あるメモリブロックに含まれたアドレスの一部にアクセスする場合であっても、当該メモリブロック全てにメモリアクセスする。 Memory access to the RFID tag 4 is performed on a memory block basis. In other words, even if access is made to only a portion of an address contained in a memory block, memory access is made to the entire memory block.
例えば、先頭のメモリブロック(アドレスが0x00~0x03)のうち、アドレス0x00にアクセスする場合を説明する。アドレス0x00はアクセス対象であるためメモリアクセスし、アドレス0x01~0x03は同じメモリブロックに含まれるためメモリアクセスすることになる。メモリアクセスは、データの取得(読み込み)とデータ更新(書き込み)とがある。 For example, let's consider the case where address 0x00 in the first memory block (addresses 0x00 to 0x03) is accessed. Address 0x00 is the target of access, so memory access is performed, and addresses 0x01 to 0x03 are included in the same memory block, so memory access is also performed. Memory access can be for data acquisition (reading) or data updating (writing).
また、RFIDタグ4に用いられる不揮発性メモリは更新回数が制限されており、約10万回のものが一般的である。そのため、更新頻度および更新回数に応じてRFIDタグの寿命が決定される。 In addition, the non-volatile memory used in RFID tags 4 has a limited number of updates, typically around 100,000 times. Therefore, the lifespan of the RFID tag is determined by the update frequency and number of updates.
§3 動作例
(割当ルールの種類)
割当部23における割当ルールは3通りに大別される。割当ルールは、ユーザ入力を尊重する割当ルール1と、RFIDタグの寿命を優先する割当ルール2と、RFIDタグへの高速なメモリアクセスを優先する割当ルール3と、が挙げられる。
§3 Example of operation (type of allocation rule)
The allocation rules in the allocation unit 23 are roughly divided into three types: allocation rule 1, which respects user input, allocation rule 2, which prioritizes the lifespan of RFID tags, and allocation rule 3, which prioritizes high-speed memory access to RFID tags.
(割当ルール1について)
割当ルール1では、ユーザ入力を尊重するため、割当部23は変数の自動割当を行わず、ユーザ入力したものを取得した割当情報22に従って、変数をメモリブロックに割り当てることのみを行う。
(Regarding allocation rule 1)
In allocation rule 1, in order to respect user input, the allocation unit 23 does not automatically allocate variables, but only allocates variables to memory blocks in accordance with allocation information 22 obtained from user input.
図3は、メモリブロックが4バイトにおいて、図2の割当情報22を割当ルール1によって割り当てた結果である。図3では、行にメモリブロックを、列に当該メモリブロックにおける何番目のアドレスかを示した表である。また、MSB(Most Significant Bit)は最上位ビットであり、LSB(Least Significant Bit)は最下位ビットである。 Figure 3 shows the result of allocating the allocation information 22 in Figure 2 according to allocation rule 1 for a 4-byte memory block. Figure 3 is a table showing memory blocks in the rows and addresses in the memory blocks in the columns. The MSB (Most Significant Bit) is the most significant bit, and the LSB (Least Significant Bit) is the least significant bit.
図3に示すように、変数Aのサイズは3バイトであり、メモリブロックは1ブロックあれば割り当てることができるが、実際には0x02~0x04に割り当てられており、メモリブロックを2ブロックに亘って横断している。また、変数Bのサイズは8バイトであり、メモリブロックは2ブロックあれば割り当てることができるが、実際には0x05~0x0Cに割り当てられており、メモリブロックを3ブロックに亘って横断している。そのため、これらメモリブロックへのメモリアクセスは非効率である。 As shown in Figure 3, variable A is 3 bytes in size and can be allocated with just one memory block, but is actually allocated from 0x02 to 0x04, spanning two memory blocks. Also, variable B is 8 bytes in size and can be allocated with just two memory blocks, but is actually allocated from 0x05 to 0x0C, spanning three memory blocks. Therefore, memory access to these memory blocks is inefficient.
対して、変数Cが割り当てられた0x10と、変数Dが割り当てられた0x12~0x13と、変数Eが割り当てられた0x14~0x17と、では変数が単一のメモリブロックに収まっている。そのため、これらメモリブロックに対するメモリアクセスは効率的である。 In contrast, the variables 0x10, to which variable C is assigned, 0x12-0x13, to which variable D is assigned, and 0x14-0x17, to which variable E is assigned, are all contained in a single memory block. Therefore, memory access to these memory blocks is efficient.
このように、割り当てられているメモリブロックの数と、変数のサイズまたはアドレスの範囲から求まる変数を割り当てるために必要とする必要メモリブロック数(必要な最小メモリブロック数)とでは、異なる値を取ることがある。このような場合、これら変数へのメモリアクセスは、最小のメモリアクセスではなく、必要メモリブロック数に1を足したメモリブロックに対してメモリアクセスが必要となり、過剰なメモリアクセスをしていることになる。 As such, the number of allocated memory blocks and the number of memory blocks required to allocate a variable (minimum number of memory blocks required), calculated from the variable's size or address range, can be different values. In such cases, memory access to these variables will require not the minimum memory access, but rather memory access to the number of memory blocks required plus one, resulting in excessive memory access.
必要メモリブロック数は次式により求まる。
必要メモリブロック数=小数点第1位切り上げ(変数のサイズ/ブロックサイズ)
以降で説明する割当ルール2および3は、割当ルール1と比較して異なり、変数が使用するメモリブロックの数を、必要メモリブロック数とする処理を行っている。
The required number of memory blocks is calculated using the following formula:
Required number of memory blocks = (variable size / block size)
Allocation rules 2 and 3, which will be explained below, differ from allocation rule 1 in that the number of memory blocks used by a variable is set to the number of required memory blocks.
(割当ルール2について)
割当ルール2では、変数ごとに異なるメモリブロックを割り当てる。すなわち、単一のメモリブロックには、単一の変数のみが割り当てられる。
(Regarding allocation rule 2)
Allocation rule 2 allocates a different memory block for each variable, i.e., only one variable is allocated to a single memory block.
図4は、メモリブロックが4バイトにおいて、図2の割当情報22を割当ルール2によって割り当てた結果である。変数A~Eは、必要メモリブロック数にてメモリブロックに割り当てられている。そのため、最小のメモリアクセスにて各変数にメモリアクセスすることができ、効率的なメモリアクセスをすることができる。 Figure 4 shows the result of allocating allocation information 22 in Figure 2 according to allocation rule 2 when the memory block is 4 bytes. Variables A to E are allocated to memory blocks based on the required number of memory blocks. This allows each variable to be accessed with the minimum number of memory accesses, resulting in efficient memory access.
また、変数A~Eがそれぞれ含まれるメモリブロックには、他の変数が含まれないことがわかる。そのため、単一のメモリブロックを複数の変数が共有することがない。変数の更新に応じて対象となる変数のみを含むメモリブロックのみが更新されることになることから、更新回数が制限されているRFIDタグ4を長寿命化することができる。 It can also be seen that the memory blocks containing variables A through E do not contain any other variables. Therefore, a single memory block is not shared by multiple variables. When a variable is updated, only the memory block containing the target variable is updated, which extends the lifespan of RFID tags 4, which have a limited number of updates.
ここで、更新されるメモリブロックのうち、変数が割り当てられなかった領域に関しては、全て0または1のビットを書き込むパディング処理を行うものとする。 Here, for areas of the memory block to be updated where no variables have been assigned, padding is performed by writing all bits of 0 or 1.
(割当ルール3について)
割当ルール3では、既に割り当てられている第1変数と、まだ割り当てられていない第2変数とを割り当てる場合に、変数が使用するメモリブロックの数を必要メモリブロック数としつつ、単一のメモリブロックに複数の変数をできるだけつめる。つまり、もし第1変数が割り当てられた領域の続きに第2変数を割り当てると、第2変数が使用するメモリブロックの数が必要メモリブロック数よりも大きくなる場合、第2変数を第1変数が割り当てられたメモリブロックには割り当てず、別のメモリブロックに割り当てる。
(Regarding allocation rule 3)
Allocation rule 3, when allocating an already allocated first variable and an unallocated second variable, packs multiple variables into a single memory block as closely as possible, while keeping the number of memory blocks used by the variables as the required number of memory blocks. In other words, if allocating the second variable to the area following the area allocated to the first variable would result in the number of memory blocks used by the second variable being greater than the required number of memory blocks, the second variable is not allocated to the memory block allocated to the first variable, but is allocated to a different memory block.
図5は、メモリブロックが4バイトにおいて、図2の割当情報22を割当ルール3によって割り当てた結果である。 Figure 5 shows the result of allocating allocation information 22 in Figure 2 according to allocation rule 3 for a 4-byte memory block.
具体的には、割当部23は、まず変数Aを0x00~0x02に割り当てる。その次に変数Bを割り当てようとするが、必要メモリブロック数が2ブロックであり、変数Aが割り当てられた領域の続きに変数Bを割り当てると、変数Bはメモリブロックを3使用することになる。そのため、変数Bは異なるメモリブロックである0x04~0x0Bに割り当てられる。変数Bを割り当てた後の同一のメモリブロックの空いているサイズが0なため、変数Cは異なるメモリブロックの0x0Cに割り当てられる。その次に変数Dを割り当てようとするが、必要メモリブロック数が2ブロックであり、変数Cが割り当てられた領域の続きに変数Dを割り当てても、変数Dはメモリブロックを2ブロック使用するだけである。そのため、変数Cが割り当てられた領域の続きである0x0D~0x12に変数Dを割り当てる。最後に変数Eを割り当てようとするが、必要メモリブロック数が1ブロックであり、変数Dが割り当てられた領域の続きに変数Eを割り当てると、変数Eはメモリブロックを2ブロック使用することになる。そのため、変数Eは異なるメモリブロックである0x14~0x15に割り当てられる。 Specifically, the allocation unit 23 first allocates variable A to 0x00 to 0x02. Next, variable B is allocated, but the required number of memory blocks is two. If variable B is allocated to the area following variable A, variable B will use three memory blocks. Therefore, variable B is allocated to a different memory block, 0x04 to 0x0B. After variable B is allocated, the free size of the same memory block is zero, so variable C is allocated to a different memory block, 0x0C. Next, variable D is allocated, but the required number of memory blocks is two. Even if variable D is allocated to the area following variable C, variable D will only use two memory blocks. Therefore, variable D is allocated to 0x0D to 0x12, the area following variable C. Finally, variable E is allocated, but the required number of memory blocks is one. If variable E is allocated to the area following variable D, variable E will use two memory blocks. Therefore, variable E is assigned to a different memory block, 0x14 to 0x15.
この結果、変数A~Eは、必要メモリブロック数にてメモリブロックに割り当てられている。そのため、最小のメモリアクセスにて各変数にメモリアクセスすることができ、効率的なメモリアクセスをすることができる。 As a result, variables A through E are allocated to memory blocks based on the required number of memory blocks. This allows each variable to be accessed with minimal memory access, resulting in efficient memory access.
また、図4と図5とを比較すると、全体で使用しているメモリブロックの数が図4よりも図5が少なくなっている。これは、第1変数が割り当てられた領域の続きに第2変数を割り当てているため、複数の変数が単一のメモリブロックを共有することができる。そのため、RFIDタグの不揮発性メモリの使用量を節約することができる。また、使用するメモリブロックの数を削減することができるため、複数の変数へのアクセスをまとめることができ、メモリアクセスが高速になる。 Comparing Figures 4 and 5, the total number of memory blocks used is smaller in Figure 5 than in Figure 4. This is because the second variable is assigned to the area following the area assigned to the first variable, allowing multiple variables to share a single memory block. This reduces the amount of non-volatile memory used in the RFID tag. Furthermore, because the number of memory blocks used can be reduced, access to multiple variables can be consolidated, resulting in faster memory access.
ここで、更新されるメモリブロックのうち、変数が割り当てられなかった領域に関しては、全て0または1のビットを書き込むパディング処理を行うものとする。 Here, for areas of the memory block to be updated where no variables have been assigned, padding is performed by writing all bits of 0 or 1.
(警告部について)
割当部23によって自動割当を行った後、ユーザが様々な条件から意図した割り当てになっているかを確認し、手動で割当情報22を修正することがある。この時に、各変数が使用するメモリブロックの数が必要メモリブロック数となっているかを確認する必要がある。そのために警告部24によって、割当情報22を確認し、異常が発生している場合にユーザに警告を発する。
(Regarding the warning section)
After automatic allocation is performed by the allocation unit 23, the user may check whether the allocation is as intended based on various conditions and manually correct the allocation information 22. At this time, it is necessary to check whether the number of memory blocks used by each variable is the required number of memory blocks. For this purpose, the warning unit 24 checks the allocation information 22 and issues a warning to the user if an abnormality occurs.
警告部24は、ユーザによって割り当てられた前記変数が使用するメモリブロックの数が、必要メモリブロック数よりも大きい場合に、警告を発する。すなわち、過剰なメモリブロックに亘って横断して変数が割り当てられているか否かを判断している。そのため、警告部24による警告がなくなるようにすることで、ユーザ入力による手動での割当情報22の修正後でも、効率化したメモリアクセスを維持することができる。 The warning unit 24 issues a warning if the number of memory blocks used by the variable allocated by the user is greater than the number of memory blocks required. In other words, it determines whether the variable has been allocated across an excess of memory blocks. Therefore, by eliminating the warning from the warning unit 24, efficient memory access can be maintained even after the allocation information 22 has been manually modified by the user.
また、警告部24は、変数が予め定めたメモリ領域外に割り当てられる場合に、警告を発する。すなわち、変数が割り当てられているメモリブロックを使用してよいか否かでもって、警告を発するため、変数を割り当てられるメモリブロックを限定することができる。そのため、変数を割り当ててはいけない予約領域を設定することができるようになり、当該予約領域に変数が割り当てられることがないため、RFIDシステムの動作において、意図しないメモリブロックへの書き込みを防げることができる。 The warning unit 24 also issues a warning if a variable is allocated outside a predetermined memory area. In other words, the warning is issued based on whether the memory block to which the variable is allocated can be used, so the memory blocks to which variables can be allocated can be limited. This makes it possible to set reserved areas to which variables must not be allocated, and since variables will not be allocated to these reserved areas, it is possible to prevent unintended writing to memory blocks during operation of the RFID system.
§4 変形例
(ブロックサイズ)
実施形態1では、ブロックサイズを4バイトとしたが、これに限定されない。例えば、8バイトなどの任意の整数であればよい。図4~6で示したブロックサイズが4バイトの割り当て結果と、ブロックサイズが8バイトの割り当て結果とは異なり、ブロックサイズに応じて割り当ては変わってくる。
§4 Variations (Block Size)
In the first embodiment, the block size is set to 4 bytes, but is not limited to this. For example, any integer such as 8 bytes may be used. The allocation results for a block size of 4 bytes shown in Figures 4 to 6 are different from the allocation results for a block size of 8 bytes, and the allocation changes depending on the block size.
(RFIDシステム1の別の態様)
実施形態1では、RFIDシステム1は、サーバ2と、リーダライタ3と、RFIDタグ4とを備えていたが、これに限定されない。例えば、サーバ2に代わり、パソコンまたはPLC(Programmable Logic Controller)であってもよい。
(Another aspect of the RFID system 1)
In the first embodiment, the RFID system 1 includes the server 2, the reader/writer 3, and the RFID tag 4, but is not limited to this. For example, the server 2 may be replaced with a personal computer or a programmable logic controller (PLC).
また、サーバ2がなく、リーダライタ3にWEBサーバの機能が備わっており、変数の割り当てを行う処理ができてもよい。 Alternatively, there may be no server 2, and the reader/writer 3 may have web server functionality and be capable of performing variable assignment processing.
実施形態1では、RFIDシステム1に関して説明したが、RFIDシステムに限定されず、RFIDタグ4の割当装置であればよい。割当装置としては、サーバ、パソコン、PLC、またはWEBサーバを備えたリーダライタなどの種々の装置が考えられる。 In the first embodiment, an RFID system 1 was described, but the present invention is not limited to an RFID system and may be any allocation device for RFID tags 4. The allocation device may be a variety of devices, such as a server, a personal computer, a PLC, or a reader/writer equipped with a web server.
(グループによる割り当て)
割当情報22の設定項目に同じタイミングにメモリアクセスする対象の複数の変数であるグループが含まれてもよい。つまり、取得部21は、複数の前記変数を含むグループの情報(変数とグループの対応関係を示す情報)をさらに取得する。
(Group assignment)
A group of multiple variables that are targets of memory access at the same time may be included in the setting items of the allocation information 22. In other words, the acquisition unit 21 further acquires information on a group that includes multiple variables (information indicating the correspondence between variables and groups).
割当部23は、あるグループに所属する複数の変数で自動割当を行い、次に別のグループに所属する複数の変数で自動割当を行う。つまり、グループ単位で自動割当を行っていく。ここで、異なるグループでは、メモリブロックを共有しないようにする。また、複数の変数によって単一のメモリブロックが共有されることになるため、割当ルール3を用いることになる。 The allocation unit 23 performs automatic allocation for multiple variables belonging to one group, and then performs automatic allocation for multiple variables belonging to another group. In other words, automatic allocation is performed on a group-by-group basis. Here, different groups are prevented from sharing memory blocks. Also, since a single memory block will be shared by multiple variables, allocation rule 3 will be used.
また、割当部23だけではなく、警告部24もグループに対応した処理を行ってもよい。警告部24は、単一のメモリブロックに、異なるグループに属する変数が割り当てられている場合に、警告を発する。 In addition to the allocation unit 23, the warning unit 24 may also perform group-specific processing. The warning unit 24 issues a warning when variables belonging to different groups are assigned to a single memory block.
そのため、同じタイミングにメモリアクセスされる場合が多い複数の変数のグループごとにメモリブロックを割り当てることができるようになる。また、複数の変数が単一のメモリブロックを共有している場合であっても、同じタイミングにメモリアクセスする複数の変数が同一のグループに含まれることになるため、効率的なメモリアクセスと、RFIDタグ4の長寿命化と、高速なメモリアクセスとを実現できる。 This makes it possible to allocate a memory block to each group of multiple variables that often have memory access at the same time. Furthermore, even if multiple variables share a single memory block, multiple variables that have memory access at the same time will be included in the same group, achieving efficient memory access, a longer lifespan for the RFID tag 4, and high-speed memory access.
例えば、図2において変数Aおよび変数Cがグループ1で、変数Bがグループ2で、変数Dおよび変数Eがグループ3であったとする。この場合における、変数の割り当て結果を図6に示す。 For example, in Figure 2, assume that variables A and C are in group 1, variable B is in group 2, and variables D and E are in group 3. The resulting variable assignments in this case are shown in Figure 6.
グループごとに割当ルール3の処理を行うために、グループ1の処理として、まず変数Aを0x00~0x02に割り当てる。次に変数Cを割り当てようとするが、必要メモリブロック数が1であり、変数Aが割り当てられた領域の続きに変数Cを割り当てると、変数Cはメモリブロックを1使用することになる。そのため、変数Cは同一のメモリブロックである0x03に割り当てられる。その次に、異なるグループである変数Bを別のメモリブロックである0x04~0x0Bに割り当てる。さらに、異なるグループである変数Dを別のメモリブロックである0x0C~0c11に割り当てる。次に変数Eを割り当てようとするが、必要メモリブロック数が1であり、変数Dが割り当てられた領域の続きに変数Eを割り当てると、変数Eはメモリブロックを1使用することになる。そのため、変数Eは同一のメモリブロックである0x12~0x13に割り当てられる。 To process allocation rule 3 for each group, variable A is first assigned to 0x00-0x02 for group 1. Next, variable C is assigned, but the required number of memory blocks is 1. If variable C is assigned to the area following variable A, variable C will use up one memory block. Therefore, variable C is assigned to 0x03, which is the same memory block. Next, variable B, which is in a different group, is assigned to another memory block, 0x04-0x0B. Furthermore, variable D, which is in a different group, is assigned to another memory block, 0x0C-0x11. Next, variable E is assigned, but the required number of memory blocks is 1. If variable E is assigned to the area following variable D, variable E will use up one memory block. Therefore, variable E is assigned to 0x12-0x13, which is the same memory block.
この割り当ての結果、図6ではメモリブロックが5になり、図5の割当ルール3でのメモリブロックが6の場合よりも、メモリブロックの削減効果が得られる。 As a result of this allocation, the number of memory blocks in Figure 6 is 5, which is a reduction in memory blocks compared to the case where the number of memory blocks is 6 under allocation rule 3 in Figure 5.
このように、グループ単位で処理をするため、変数Aの次に変数Cの割り当てが行われるように、割当情報22の順番で割り当てが行われるとは限らない。また、グループごとに割り当てを行うメモリブロックを指定していてもよい。 As processing is performed in groups, allocation does not necessarily occur in the order of the allocation information 22, such as variable A being allocated followed by variable C. It is also possible to specify the memory block to be allocated for each group.
(更新頻度による割り当て)
割当情報22の設定項目に各変数の更新頻度が含まれていてもよい。つまり、取得部21は、変数の更新頻度をさらに取得する。
(Allocation based on update frequency)
The update frequency of each variable may be included in the setting items of the allocation information 22. That is, the acquisition unit 21 further acquires the update frequency of the variable.
割当部23は、更新頻度に応じて複数の変数が単一のメモリブロックを共有できるか否かを判断し、変数の割り当てを行う。この時、複数の変数で単一のメモリブロックを共有できるか否かを判断する条件は、任意に定めてもよい。つまり、単一のメモリブロックに、少なくとも2個以上の変数が含まれた場合に、一方の変数の更新頻度と、他方の変数の更新頻度とを比較し、予め定めた条件に従い複数の変数の割り当てを行う。 The allocation unit 23 determines whether multiple variables can share a single memory block based on their update frequency, and allocates the variables accordingly. At this time, the conditions for determining whether multiple variables can share a single memory block may be set arbitrarily. In other words, when a single memory block contains at least two or more variables, the update frequency of one variable is compared with the update frequency of the other variable, and the multiple variables are allocated according to predetermined conditions.
条件としては、例えば、同一の更新頻度の場合に単一のメモリブロックに変数を割り当ててもよい組み合わせがある。また、低頻度の変数と中頻度および高頻度の変数とは同一のメモリブロックを共有することができないが、中頻度の変数と高頻度の変数とでは同一のメモリブロックを共有することができるようにする組み合わせなどがある。条件はこれらのパターンに限定されず、任意の組み合わせを想定してよい。また、複数の変数によって単一のメモリブロックが共有されることになるため、割当ルール3を用いることになる。 Conditions include, for example, a combination in which variables with the same update frequency can be allocated to a single memory block. Also, a combination in which low-frequency variables cannot share the same memory block with medium-frequency and high-frequency variables, but medium-frequency variables can share the same memory block with high-frequency variables, etc. Conditions are not limited to these patterns, and any combination can be envisioned. Furthermore, because a single memory block will be shared by multiple variables, allocation rule 3 will be used.
また、割当部23だけではなく、警告部24も更新頻度に応じた処理を行ってもよい。警告部24は、単一のメモリブロックに、少なくとも2個以上の変数が含まれた場合に、一方の変数の更新頻度と、他方の変数の更新頻度とを比較し、予め定めた条件に従い警告を発する。 In addition to the allocation unit 23, the warning unit 24 may also perform processing according to the update frequency. When a single memory block contains at least two variables, the warning unit 24 compares the update frequency of one variable with the update frequency of the other variable, and issues a warning according to predetermined conditions.
そのため、複数の変数が単一のメモリブロックを共有する場合に、当該単一のメモリブロックに割り当てられた変数の更新頻度によって、許容される変数の組み合わせを限定することができる。 Therefore, when multiple variables share a single memory block, the allowable combinations of variables can be limited depending on the update frequency of the variables assigned to that single memory block.
例えば、更新頻度が高い変数と1回書き込んだ後は変更する必要がない変数とが単一のメモリブロックを共有する場合には、RFIDタグ4の寿命を十分保障することができることもある。しかし、あるタイミングで更新される更新頻度が高い変数と別のタイミングで更新される更新頻度が高い変数とが単一のメモリブロックを共有する場合では、RFIDタグ4の寿命を保障することができなくなることがある。更新頻度を考慮することで、このような場合を防ぐことができる。そのため、RFIDタグ4の長寿命化を実現できる。 For example, if a variable that is updated frequently and a variable that does not need to be changed after being written once share a single memory block, the lifespan of the RFID tag 4 may be sufficiently guaranteed. However, if a variable that is updated frequently at one time and a variable that is updated frequently at another time share a single memory block, it may not be possible to guarantee the lifespan of the RFID tag 4. By taking the update frequency into consideration, such cases can be prevented. As a result, a longer lifespan of the RFID tag 4 can be achieved.
具体的な条件を2例示すが、条件としてはこれらに限定されない。示す条件としては、警告部24によって、複数の変数が単一のメモリブロックを共有する場合において、変数の組み合わせによって警告を発する条件である。 Two specific conditions are given below, but the conditions are not limited to these. The conditions given are conditions under which the warning unit 24 issues a warning based on a combination of variables when multiple variables share a single memory block.
図7は、複数の変数が単一のメモリブロックを共有する場合において、ある条件で警告を発するか否かを判断する条件表である。図8は、複数の変数が単一のメモリブロックを共有する場合において、別の条件で警告を発するか否かを判断する条件表である。 Figure 7 shows a condition table that determines whether to issue a warning under certain conditions when multiple variables share a single memory block. Figure 8 shows a condition table that determines whether to issue a warning under different conditions when multiple variables share a single memory block.
図7での条件では、低頻度と中頻度または高頻度とが単一のメモリブロックを共有する組み合わせ、あるいは中頻度と高頻度とが単一のメモリブロックを共有する組み合わせの場合、警告部24は警告を発する。つまり、異なる更新頻度の複数の変数が単一のメモリブロックを共有する場合に警告を発する。 Under the conditions in Figure 7, the warning unit 24 issues a warning when a combination of low-frequency and medium-frequency or high-frequency variables shares a single memory block, or when a combination of medium-frequency and high-frequency variables shares a single memory block. In other words, a warning is issued when multiple variables with different update frequencies share a single memory block.
この場合、更新頻度が異なることから、異なるタイミングで更新される変数である可能性が高く、RFIDタグ4の寿命を低下させることに繋がると判断されている。 In this case, since the update frequencies are different, it is highly likely that the variables are updated at different times, which is thought to lead to a shortened lifespan of the RFID tag 4.
また、図8での条件では、低頻度と中頻度または高頻度とが単一のメモリブロックを共有する組み合わせ、中頻度と低頻度、中頻度または高頻度とが単一のメモリブロックを共有する組み合わせ、あるいは高頻度と低頻度、中頻度または高頻度とが単一のメモリブロックを共有する組み合わせ、のいずれかの場合、警告部24は警告を発する。つまり、中頻度以上で同一のメモリブロックに複数の変数が存在している場合に警告を発する。 Furthermore, under the conditions in Figure 8, the warning unit 24 issues a warning if there is any combination in which a low frequency and a medium or high frequency share a single memory block, a combination in which a medium frequency and a low frequency, a medium frequency or a high frequency share a single memory block, or a combination in which a high frequency and a low frequency, a medium frequency or a high frequency share a single memory block. In other words, a warning is issued if multiple variables exist in the same memory block at a medium frequency or higher.
この場合、更新頻度が中頻度以上では、当該変数の更新回数が多くなり易く、複数の変数が単一のメモリブロックを共有した場合に、当該メモリブロックが寿命回数を迎えることが考えられる。そのため、RFIDタグ4の寿命を低下させることに繋がると判断されている。 In this case, if the update frequency is medium or higher, the variable is likely to be updated many times, and if multiple variables share a single memory block, the memory block may reach the end of its lifespan. Therefore, it is believed that this will shorten the lifespan of the RFID tag 4.
ここで、低頻度は更新回数が寿命回数を迎えないと考えられる頻度であり、中頻度は単体では更新回数が寿命回数を迎えないと考えられる頻度であり、高頻度は単体でも更新回数が寿命回数を迎えると考えられる頻度である。そのため、ある中頻度の変数と別の中頻度の変数とが単一のメモリブロックを共有する場合は、寿命回数を超過し、RFIDタグ4の寿命を低下させることは起こり得る。また、1回のみは、1回のみ更新を行い、それ以降更新しない変数であり、例えば、管理対象を識別するシリアル番号または製造年月日などの情報が挙げられる。 Here, low frequency refers to a frequency at which the number of updates is not expected to reach the end of its lifespan, medium frequency refers to a frequency at which the number of updates is not expected to reach the end of its lifespan when used alone, and high frequency refers to a frequency at which the number of updates is expected to reach the end of its lifespan when used alone. Therefore, if a medium-frequency variable and another medium-frequency variable share a single memory block, it is possible that the end of its lifespan may be exceeded, shortening the lifespan of the RFID tag 4. Furthermore, only once refers to a variable that is updated only once and is not updated thereafter; examples include information such as a serial number or manufacturing date that identifies the managed object.
§5 作用・効果
取得部21によって取得した割当情報22を、割当部23が適宜修正することによって、各変数が必要メモリブロック数のメモリブロックに割り当てられることになる。そのため、最小のメモリアクセスにて各変数にメモリアクセスすることができ、メモリアクセスが効率的である。
§5 Actions and Effects Each variable is allocated to the required number of memory blocks by the allocation unit 23 appropriately modifying the allocation information 22 acquired by the acquisition unit 21. Therefore, each variable can be accessed with the minimum number of memory accesses, resulting in efficient memory access.
また、割当ルール2では、単一のメモリブロックには単一の変数のみを割り当てるため、RFIDタグ4を長寿命化することができる。割当ルール3では、単一のメモリブロックに複数の変数を割り当てるため、メモリの節約効果と複数の変数への高速なメモリアクセスが実現する。 Allocation rule 2 also allows only a single variable to be assigned to a single memory block, thereby extending the lifespan of the RFID tag 4. Allocation rule 3 allows multiple variables to be assigned to a single memory block, thereby saving memory and enabling high-speed memory access to multiple variables.
さらに、割当情報22にグループまたは更新頻度などの付加情報を付加することで、更新タイミングとRFIDタグ4の寿命を考慮した割り当てが可能になる。 Furthermore, by adding additional information such as group or update frequency to the allocation information 22, allocation can be performed taking into account the update timing and lifespan of the RFID tag 4.
〔ソフトウェアによる実現例〕
サーバ2または割当装置(以下、「装置」と呼ぶ)の機能は、当該装置としてコンピュータを機能させるためのプログラムであって、当該装置の各制御ブロックとしてコンピュータを機能させるためのプログラムにより実現することができる。
[Software implementation example]
The functions of the server 2 or the allocation device (hereinafter referred to as the "device") can be realized by a program that causes a computer to function as the device, and a program that causes a computer to function as each control block of the device.
この場合、上記装置は、上記プログラムを実行するためのハードウェアとして、少なくとも1つの制御装置(例えばプロセッサ)と少なくとも1つの記憶装置(例えばメモリ)を有するコンピュータを備えている。この制御装置と記憶装置により上記プログラムを実行することにより、上記各実施形態で説明した各機能が実現される。 In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The functions described in each of the above embodiments are realized by executing the program using this control device and storage device.
上記プログラムは、一時的ではなく、コンピュータ読み取り可能な、1または複数の記録媒体に記録されていてもよい。この記録媒体は、上記装置が備えていてもよいし、備えていなくてもよい。後者の場合、上記プログラムは、有線または無線の任意の伝送媒体を介して上記装置に供給されてもよい。 The above program may be stored non-transitory on one or more computer-readable storage media. These storage media may or may not be included in the device. In the latter case, the program may be supplied to the device via any wired or wireless transmission medium.
また、上記各制御ブロックの機能の一部または全部は、論理回路により実現することも可能である。例えば、上記各制御ブロックとして機能する論理回路が形成された集積回路も本発明の範疇に含まれる。この他にも、例えば量子コンピュータにより上記各制御ブロックの機能を実現することも可能である。 Furthermore, some or all of the functions of each of the above control blocks can be realized by logic circuits. For example, integrated circuits incorporating logic circuits that function as each of the above control blocks are also included in the scope of the present invention. In addition, the functions of each of the above control blocks can also be realized by, for example, a quantum computer.
また、上記各実施形態で説明した各処理は、AI(Artificial Intelligence:人工知能)に実行させてもよい。この場合、AIは上記制御装置で動作するものであってもよいし、他の装置(例えばエッジコンピュータまたはクラウドサーバ等)で動作するものであってもよい。 Furthermore, each process described in each of the above embodiments may be executed by AI (Artificial Intelligence). In this case, the AI may run on the control device, or on another device (for example, an edge computer or a cloud server).
〔付記事項〕
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
[Additional Notes]
The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present invention.
1 RFIDシステム
2 サーバ(割当装置)
3 リーダライタ
4 RFIDタグ
21 取得部
23 割当部
24 警告部
1 RFID system 2 Server (allocation device)
3 Reader/writer 4 RFID tag 21 Acquisition unit 23 Allocation unit 24 Warning unit
Claims (9)
前記RFIDタグのメモリに割り当てる複数の変数と、各変数のサイズまたはアドレスの範囲とを取得する取得部と、
前記変数が使用する前記メモリブロックの数を、前記変数のサイズまたはアドレスの範囲から求まる前記変数を割り当てるために必要とする必要メモリブロック数とするように、前記変数をメモリに割り当てる割当部と、を備えるRFIDシステム。 An RFID system using an RFID tag that performs memory access for each memory block, which is an address unit of a predetermined block size,
an acquisition unit that acquires a plurality of variables to be allocated to the memory of the RFID tag and the size or address range of each variable;
an allocation unit that allocates the variable to memory so that the number of memory blocks used by the variable is the number of memory blocks required to allocate the variable, which is determined from the size or address range of the variable.
前記RFIDシステムは、単一の前記メモリブロックに、異なるグループに属する前記変数が割り当てられている場合に、警告を発する警告部を更に備える請求項1から3のいずれか1項に記載のRFIDシステム。 the acquisition unit further acquires information on a group including a plurality of the variables;
The RFID system according to claim 1 , further comprising a warning unit that issues a warning when the variables that belong to different groups are assigned to a single memory block.
前記RFIDシステムは、単一の前記メモリブロックに、少なくとも2個以上の前記変数が含まれた場合に、一方の変数の前記更新頻度と、他方の変数の前記更新頻度とを比較し、予め定めた条件に従い警告を発する警告部を更に備える請求項1から3のいずれか1項に記載のRFIDシステム。 The acquisition unit further acquires an update frequency of the variable,
The RFID system according to any one of claims 1 to 3, further comprising an alarm unit that, when a single memory block contains at least two or more of the variables, compares the update frequency of one variable with the update frequency of another variable and issues an alarm according to predetermined conditions.
前記RFIDタグのメモリに割り当てる複数の変数と、各変数のサイズまたはアドレスの範囲とを取得する取得部と、
前記変数が使用する前記メモリブロックの数を、前記変数のサイズまたはアドレスの範囲から求まる前記変数を割り当てるために必要とする必要メモリブロック数とするように、前記変数をメモリに割り当てる割当部と、を備える割当装置。 An allocation device that allocates memory to an RFID tag that accesses memory for each memory block, which is an address unit of a predetermined block size, comprising:
an acquisition unit that acquires a plurality of variables to be allocated to the memory of the RFID tag and the size or address range of each variable;
an allocation unit that allocates the variable to memory so that the number of memory blocks used by the variable is equal to the number of memory blocks required to allocate the variable, which is determined from the size or address range of the variable.
前記変数が使用するメモリブロックの数を、前記変数のサイズまたはアドレスの範囲から求まる前記変数を割り当てるために必要とする必要メモリブロック数とするように、前記変数をメモリに割り当てる割当ステップと、を含む割当方法。 an acquisition step of acquiring a plurality of variables to be allocated to the memory of the RFID tag and the size or address range of each variable;
an allocating step of allocating the variable to memory so that the number of memory blocks used by the variable is the number of memory blocks required to allocate the variable, which is determined from the size or address range of the variable.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022062117A JP7797946B2 (en) | 2022-04-01 | 2022-04-01 | RFID system, allocation device, and allocation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022062117A JP7797946B2 (en) | 2022-04-01 | 2022-04-01 | RFID system, allocation device, and allocation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023152145A JP2023152145A (en) | 2023-10-16 |
| JP7797946B2 true JP7797946B2 (en) | 2026-01-14 |
Family
ID=88327759
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022062117A Active JP7797946B2 (en) | 2022-04-01 | 2022-04-01 | RFID system, allocation device, and allocation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7797946B2 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006185456A (en) | 1997-11-21 | 2006-07-13 | Omron Corp | Memory allocation device, memory allocation method, and program recording medium |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008018258A1 (en) * | 2006-08-09 | 2008-02-14 | Hitachi Ulsi Systems Co., Ltd. | Storage device |
-
2022
- 2022-04-01 JP JP2022062117A patent/JP7797946B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006185456A (en) | 1997-11-21 | 2006-07-13 | Omron Corp | Memory allocation device, memory allocation method, and program recording medium |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023152145A (en) | 2023-10-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105975399B (en) | Method for managing a memory device and related memory device | |
| CN1087085C (en) | Multi-user data processing system with storage protection | |
| CN104205132B (en) | Write data in the smart card's non-volatile memory | |
| CN106843842B (en) | Method and device for updating application program configuration file | |
| EP1939751A1 (en) | Storing compressed data | |
| EP1956482B1 (en) | Generating delta updates for a processing device | |
| US5963982A (en) | Defragmentation of stored data without pointer indirection | |
| EP1418538B1 (en) | Multi-application ic card | |
| US10628301B1 (en) | System and method for optimizing write amplification of non-volatile memory storage media | |
| EP1381966B1 (en) | A method and apparatus for reducing ram size while maintaining fast data access | |
| JP7797946B2 (en) | RFID system, allocation device, and allocation method | |
| JP5895565B2 (en) | IC card and program | |
| CN114168316A (en) | Video memory allocation processing method, device, equipment and system | |
| EP0525308A1 (en) | Memory map for processor cache macro | |
| CN112764793B (en) | Method for incrementally updating parameters of function block | |
| CN114327246A (en) | Data storage method in storage medium, storage medium and computer equipment | |
| EP4697190A1 (en) | File processing method and apparatus, and device and storage medium | |
| JP6769150B2 (en) | Electronic information storage media, information processing methods, and information processing programs | |
| JP3446397B2 (en) | Method of controlling EEPROM | |
| TWI919248B (en) | Method, recording medium, and apparatus of identifying unused function included in source code | |
| CN106991114B (en) | Method and apparatus for managing non-volatile memory of a control device | |
| KR20250065405A (en) | Method for changing memory contents of main memory of microcontroller without separate memory management unit, its use, microcontroller and vehicle | |
| JPH09231111A (en) | IC card | |
| KR20240006181A (en) | Programmable logic controller system and method for controlling the same | |
| KR20260001914A (en) | Memory controller and operation method thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20250213 |
|
| 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: 20251125 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20251208 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7797946 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |