CN113127291B - Micro controller - Google Patents
Micro controller Download PDFInfo
- Publication number
- CN113127291B CN113127291B CN202011560867.4A CN202011560867A CN113127291B CN 113127291 B CN113127291 B CN 113127291B CN 202011560867 A CN202011560867 A CN 202011560867A CN 113127291 B CN113127291 B CN 113127291B
- Authority
- CN
- China
- Prior art keywords
- microcontroller
- access
- slave
- trigger event
- monitoring result
- 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
- 238000012544 monitoring process Methods 0.000 claims abstract description 55
- 238000012545 processing Methods 0.000 claims description 3
- 230000002093 peripheral effect Effects 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000000034 method Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 229920002939 poly(N,N-dimethylacrylamides) Polymers 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3037—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
一种微控制器,包括一从装置、一主装置以及一汇流排。从装置根据一存取指令,存取一存储装置。主装置执行一程序码,用以提供存取指令。汇流排耦接于从装置与主装置之间,用以传送存取指令予从装置。当一触发事件发生时,主装置监控存储装置的存取状态,用以产生一监控结果予一外部装置。本申请提供的微控制器能够监控本身的存储装置的存取状态。
A microcontroller includes a slave device, a master device and a bus. The slave device accesses a storage device according to an access instruction. The master device executes a program code to provide the access instruction. The bus is coupled between the slave device and the master device to transmit the access instruction to the slave device. When a trigger event occurs, the master device monitors the access status of the storage device to generate a monitoring result to an external device. The microcontroller provided in the present application is capable of monitoring the access status of its own storage device.
Description
技术领域Technical Field
本发明是有关于一种微控制器,特别是有关于一种监控本身的存储装置的存取状态的微控制器。The invention relates to a microcontroller, and in particular to a microcontroller for monitoring the access status of its own storage device.
背景技术Background technique
随着科技的进步,电子装置的种类及功能愈来愈多。一般电子装置内部具有一微控制器。该微控制器是根据本身内部的程序码而动作。当程序码具有错误(bug)时,微控制器将无法正常工作。With the advancement of technology, the types and functions of electronic devices are increasing. Generally, there is a microcontroller inside an electronic device. The microcontroller operates according to its internal program code. When the program code has an error (bug), the microcontroller will not work properly.
发明内容Summary of the invention
本发明提供一种微控制器,包括一从装置、一主装置以及一汇流排。从装置根据一存取指令,存取一存储装置。主装置执行一程序码,用以提供存取指令。汇流排耦接于从装置与主装置之间,用以传送存取指令予从装置。当一触发事件发生时,主装置监控存储装置的存取状态,用以产生一监控结果予一外部装置。本申请提供的微控制器能够监控本身的存储装置的存取状态。The present invention provides a microcontroller, including a slave device, a master device and a bus. The slave device accesses a storage device according to an access instruction. The master device executes a program code to provide the access instruction. The bus is coupled between the slave device and the master device to transmit the access instruction to the slave device. When a trigger event occurs, the master device monitors the access status of the storage device to generate a monitoring result to an external device. The microcontroller provided by the present application can monitor the access status of its own storage device.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明的操作系统的示意图。FIG. 1 is a schematic diagram of an operating system of the present invention.
图2为本发明的微控制器的示意图。FIG. 2 is a schematic diagram of a microcontroller according to the present invention.
图3为本发明的微控制器的另一示意图。FIG. 3 is another schematic diagram of the microcontroller of the present invention.
图4为本发明的存储模块的内部示意图。FIG. 4 is a schematic diagram of the interior of a storage module of the present invention.
【符号说明】【Symbol Description】
100:操作系统;100: operating system;
110:外部装置;110: external device;
120:连接器;120: Connector;
130、200、300:微控制器;130, 200, 300: microcontroller;
121、122:传输接口;121, 122: transmission interface;
210、310、320:主装置;210, 310, 320: main device;
220、230、330、340:从装置;220, 230, 330, 340: slave device;
240、250、350、60:汇流排;240, 250, 350, 60: busbar;
CM1、CM2:存取指令;CM 1 , CM 2 : access instructions;
CM3:控制指令;CM 3 : control instructions;
221、231、232、331、341:存储装置;221, 231, 232, 331, 341: storage device;
260、270:存储器;260, 270: memory;
370:存储模块;370: storage module;
PRC:程序码;PRC: program code;
SM、SMA、SMB:监控结果;S M , S MA , S MB : monitoring results;
411~418:存储库;411-418: Repository;
addr_A、addr_B:地址参数组;addr_A, addr_B: address parameter group;
DA_A、DA_B:数据参数组;DA_A, DA_B: data parameter group;
TMS_A、TMS_B:时间参数组;TMS_A, TMS_B: time parameter group;
RorW_A、RorW_B:存取参数组。RorW_A, RorW_B: access parameter groups.
具体实施方式Detailed ways
为让本发明的目的、特征和优点能更明显易懂,下文特举出实施例,并配合所附图式,做详细的说明。本发明说明书提供不同的实施例来说明本发明不同实施方式的技术特征。其中,实施例中的各元件的配置是为说明之用,并非用以限制本发明。另外,实施例中图式标号的部分重复,是为了简化说明,并非意指不同实施例之间的关联性。In order to make the purpose, features and advantages of the present invention more clearly understood, the following embodiments are specifically cited and described in detail with reference to the accompanying drawings. The present invention specification provides different embodiments to illustrate the technical features of different implementations of the present invention. Among them, the configuration of each element in the embodiment is for illustrative purposes and is not intended to limit the present invention. In addition, some repetitions of the figure numbers in the embodiments are for the purpose of simplifying the description and do not mean the relevance between different embodiments.
图1为本发明的操作系统的示意图。如图所示,操作系统100包括一外部装置110、一连接器120以及一微控制器130。外部装置110通过连接器120与微控制器130沟通。在本实施例中,外部装置110分析微控制器130所提供的参数组,用以供使用者判断微控制器130内部的程序码的流程是否正确。本发明并不限定外部装置110的种类。在一可能实施例中,外部装置110是为一计算机设备。在此例中,外部装置110可能安装一监控应用程序码。当使用者开启监控应用程序码时,外部装置110便根据微控制器130所提供的参数组,呈现一分析画面供使用者参考。FIG. 1 is a schematic diagram of an operating system of the present invention. As shown in the figure, the operating system 100 includes an external device 110, a connector 120, and a microcontroller 130. The external device 110 communicates with the microcontroller 130 through the connector 120. In the present embodiment, the external device 110 analyzes the parameter group provided by the microcontroller 130 for the user to determine whether the flow of the program code inside the microcontroller 130 is correct. The present invention does not limit the type of the external device 110. In one possible embodiment, the external device 110 is a computer device. In this example, the external device 110 may be installed with a monitoring application code. When the user turns on the monitoring application code, the external device 110 presents an analysis screen for the user's reference based on the parameter group provided by the microcontroller 130.
连接器120耦接于外部装置110与微控制器130之间。在本实施例中,连接器120具有传输接口121与122。传输接口121用以耦接外部装置110。传输接口122用以耦接微控制器130。本发明并不限定传输接口121及122的种类。在一可能实施例中,传输接口121是为一USB接口。在其它实施例中,传输接口121的种类可能相同或不同于传输接口122的种类。The connector 120 is coupled between the external device 110 and the microcontroller 130. In the present embodiment, the connector 120 has transmission interfaces 121 and 122. The transmission interface 121 is used to couple the external device 110. The transmission interface 122 is used to couple the microcontroller 130. The present invention does not limit the types of the transmission interfaces 121 and 122. In one possible embodiment, the transmission interface 121 is a USB interface. In other embodiments, the type of the transmission interface 121 may be the same as or different from the type of the transmission interface 122.
在一可能实施例中,连接器120是作为一金钥(key)。通过连接器120,外部装置110才能对微控制器130进行存取。同样地,通过连接器120,微控制器130才会提供相关参数组予外部装置110。在其它实施例中,连接器120可能整合于外部装置110或微控制器130之中。在一些实施例中,连接器120可省略。在此例中,外部装置110及微控制器130具有加密及解密功能,以提高安全性。In one possible embodiment, the connector 120 is used as a key. Through the connector 120, the external device 110 can access the microcontroller 130. Similarly, through the connector 120, the microcontroller 130 provides the relevant parameter set to the external device 110. In other embodiments, the connector 120 may be integrated into the external device 110 or the microcontroller 130. In some embodiments, the connector 120 may be omitted. In this example, the external device 110 and the microcontroller 130 have encryption and decryption functions to improve security.
微控制器130通过连接器120与外部装置110沟通。当一触发事件发生时,微控制器130监控本身内部的存储装置的存取状态,并提供一监控结果予外部装置110。在一可能实施例中,触发事件是指一按钮(未显示)被按下。该按钮可能设置于微控制器130之中。当使用者按下按钮时,微控制器130便进行一监控操作。在另一可能实施例中,触发事件是指外部装置110发出一监控触发。在此例中,当使用者开启外部装置110的一监控应用程序码时,外部装置110发出该监控触发,用以命令微控制器130进行一监控操作。The microcontroller 130 communicates with the external device 110 through the connector 120. When a trigger event occurs, the microcontroller 130 monitors the access status of the internal storage device and provides a monitoring result to the external device 110. In one possible embodiment, the trigger event refers to a button (not shown) being pressed. The button may be set in the microcontroller 130. When the user presses the button, the microcontroller 130 performs a monitoring operation. In another possible embodiment, the trigger event refers to the external device 110 issuing a monitoring trigger. In this example, when the user opens a monitoring application code of the external device 110, the external device 110 issues the monitoring trigger to command the microcontroller 130 to perform a monitoring operation.
由于使用者根据微控制器130的监控结果,得知微控制器130内部的存储装置的存取状态,故当微控制器130内部的存储装置的存取状态不符合预设值时,使用者可快速地找出异常之处,并进行除错(debug)。再者,由于微控制器130只监控存储装置的存取状态,故只需二进位格式文件(binary file),便可得知数据流(data flow),并且外部装置110并不需具有来源码(source code),便可重建出微控制器130所执行的程序码流程,因而简化除错的过程。Since the user can know the access status of the storage device inside the microcontroller 130 according to the monitoring result of the microcontroller 130, when the access status of the storage device inside the microcontroller 130 does not meet the preset value, the user can quickly find out the abnormality and perform debugging. Furthermore, since the microcontroller 130 only monitors the access status of the storage device, only a binary file is needed to know the data flow, and the external device 110 does not need to have the source code to reconstruct the program code flow executed by the microcontroller 130, thereby simplifying the debugging process.
图2为本发明的微控制器的示意图。如图所示,微控制器200包括一主装置210、从装置220、230、汇流排240及250。主装置210执行一程序码PRC,用以发出存取指令CM1及CM2。本发明并不限定主装置210的架构。任何可发出存取指令的装置,均可作为主装置210。在一可能实施例中,主装置210是为一中央处理器(CPU)或是一周边存储器直接存取控制器(Peripheral Direct Memory Access controller;PDMA controller)。FIG2 is a schematic diagram of a microcontroller of the present invention. As shown in the figure, the microcontroller 200 includes a master device 210, slave devices 220, 230, and buses 240 and 250. The master device 210 executes a program code PRC to issue access instructions CM 1 and CM 2. The present invention does not limit the architecture of the master device 210. Any device that can issue access instructions can be used as the master device 210. In a possible embodiment, the master device 210 is a central processing unit (CPU) or a peripheral direct memory access controller (PDMA controller).
从装置220根据存取指令CM1,存取一存储装置221。本发明并不限定存储装置的数量。在其它实施例中,从装置220具有更多的存储装置。另外,在本实施例中,存储装置221是整合于从装置220中,但并非用以限制本发明。在其它实施例中,存储装置221可能独立于从装置220之外。在一可能实施例中,存储装置221包括至少一寄存器(register)。The slave device 220 accesses a storage device 221 according to the access instruction CM1 . The present invention does not limit the number of storage devices. In other embodiments, the slave device 220 has more storage devices. In addition, in this embodiment, the storage device 221 is integrated into the slave device 220, but it is not used to limit the present invention. In other embodiments, the storage device 221 may be independent of the slave device 220. In one possible embodiment, the storage device 221 includes at least one register.
从装置230根据存取指令CM2,存取存储装置231及232的至少一者。在其它实施例中,从装置230具有更多或更少的存储装置。另外,在本实施例中,存储装置231及232是整合于从装置230中,但并非用以限制本发明。在其它实施例中,存储装置231及232的至少一者独立于从装置230之外。在一可能实施例中,存储装置231及232均包括至少一寄存器(register)。The slave device 230 accesses at least one of the storage devices 231 and 232 according to the access command CM 2 . In other embodiments, the slave device 230 has more or fewer storage devices. In addition, in this embodiment, the storage devices 231 and 232 are integrated into the slave device 230, but this is not intended to limit the present invention. In other embodiments, at least one of the storage devices 231 and 232 is independent of the slave device 230. In one possible embodiment, the storage devices 231 and 232 each include at least one register.
本发明并不限定从装置220及230的种类。从装置220的种类可能相同或不同于从装置230的种类。在一可能实施例中,从装置220是为一集成电路间(Inter-IntegratedCircuit;I2C)电路,从装置220是为一通用非同步收发传输器(Universal AsynchronousReceiver/Transmitter;UART)。The present invention does not limit the types of slave devices 220 and 230. The type of slave device 220 may be the same as or different from the type of slave device 230. In one possible embodiment, slave device 220 is an Inter-Integrated Circuit (I2C) circuit, and slave device 220 is a Universal Asynchronous Receiver/Transmitter (UART).
汇流排240耦接于从装置220与主装置210之间,用以传送存取指令CM1。汇流排250耦接于从装置230与主装置210之间,用以传送存取指令CM2。本发明并不限定汇流排240及250的种类。汇流排240及250的种类分别对应于从装置220及230的传输接口。举例而言,假设,从装置220是为一I2C电路,并且从装置220是为一UART。在此例中,汇流排240为一I2C汇流排,并且汇流排250为一UART汇流排。The bus 240 is coupled between the slave device 220 and the master device 210 to transmit the access command CM 1 . The bus 250 is coupled between the slave device 230 and the master device 210 to transmit the access command CM 2 . The present invention does not limit the types of the buses 240 and 250 . The types of the buses 240 and 250 correspond to the transmission interfaces of the slave devices 220 and 230 , respectively. For example, it is assumed that the slave device 220 is an I2C circuit, and the slave device 220 is a UART. In this example, the bus 240 is an I2C bus, and the bus 250 is a UART bus.
本发明并不限定微控制器200的从装置的数量。在其它实施例中,微控制器200可能具有更多或更少的从装置。在此例中,汇流排的数量也会随着从装置的数量而变化。举例而言,当微控制器200具有更多的从装置时,微控制器200需要利用更多的汇流排传送指令予从装置。The present invention does not limit the number of slave devices of the microcontroller 200. In other embodiments, the microcontroller 200 may have more or fewer slave devices. In this case, the number of buses will also vary with the number of slave devices. For example, when the microcontroller 200 has more slave devices, the microcontroller 200 needs to use more buses to transmit instructions to the slave devices.
在其它实施例中,微控制器200还包括一存储器260。存储器260用以存储程序码PRC。在主装置210执行程序码PRC时,主装置210产生存取指令CM1及CM2,用以存取存储装置221、231及232。当一第一触发事件发生时,主装置210监控存储装置221、231及232的存取状态,用以产生一监控结果SM。在一可能实施例中,主装置210直接输出监控结果SM予外部装置110。在另一可能实施例中,微控制器200还包括一存储器270。存储器270用以存储监控结果SM。在此例中,主装置210先将监控结果SM存储于存储器270中,并在一特定时间,读取存储器270的监控结果SM,并输出监控结果SM予外部装置110。本发明并不限定存储器270的种类。存储器270可能是一易失性存储器或是一非易失性存储器。在一可能实施例中,存储器270是为一静态随机存取存储器(SRAM)。In other embodiments, the microcontroller 200 further includes a memory 260. The memory 260 is used to store the program code PRC. When the host device 210 executes the program code PRC, the host device 210 generates access instructions CM1 and CM2 to access the storage devices 221, 231, and 232. When a first trigger event occurs, the host device 210 monitors the access status of the storage devices 221, 231, and 232 to generate a monitoring result SM . In one possible embodiment, the host device 210 directly outputs the monitoring result SM to the external device 110. In another possible embodiment, the microcontroller 200 further includes a memory 270. The memory 270 is used to store the monitoring result SM . In this example, the host device 210 first stores the monitoring result SM in the memory 270, and at a specific time, reads the monitoring result SM of the memory 270, and outputs the monitoring result SM to the external device 110. The present invention does not limit the type of the memory 270. The memory 270 may be a volatile memory or a non-volatile memory. In one embodiment, the memory 270 is a static random access memory (SRAM).
在其它实施例中,当一第二触发事件发生时,主装置210停止监控存储装置221、231及232的存取状态。在此例中,主装置210可能读取存储器270所存储的监控结果SM,并提供监控结果SM予外部装置110。外部装置110分析监控结果SM,用以产生一分析画面。在此例中,使用者根据外部装置110的分析画面,判断程序码PRC的流程是否正确。In other embodiments, when a second trigger event occurs, the host device 210 stops monitoring the access status of the storage devices 221, 231, and 232. In this example, the host device 210 may read the monitoring result S M stored in the memory 270 and provide the monitoring result S M to the external device 110. The external device 110 analyzes the monitoring result S M to generate an analysis screen. In this example, the user determines whether the flow of the program code PRC is correct based on the analysis screen of the external device 110.
本发明并不限定第一及第二触发事件的种类。在一可能实施例中,主装置210判断一第一按钮(未显示)以及一第二按钮(未显示)是否被按下。当第一按钮被按下时,表示发生第一触发事件。因此,主装置210进行监控操作。当第二按钮被按下时,表示发生第二触发事件。因此,主装置210停止监控操作。The present invention does not limit the types of the first and second trigger events. In one possible embodiment, the main device 210 determines whether a first button (not shown) and a second button (not shown) are pressed. When the first button is pressed, it indicates that the first trigger event occurs. Therefore, the main device 210 performs a monitoring operation. When the second button is pressed, it indicates that the second trigger event occurs. Therefore, the main device 210 stops the monitoring operation.
在另一可能实施例中,当使用者开启外部装置110的一监控应用程序码(未显示),并点选一监控选项时,外部装置110发出一第一触发信号予主装置210。主装置210根据第一触发信号开始监控存储装置221、231及232的存取状态。当使用者点选一停止选项时,外部装置110发出一第二触发信号予主装置210。主装置210根据第二触发信号停止监控存储装置221、231及232的存取状态。在此例中,当使用者点选一传送选项时,外部装置110发出一第三触发信号予主装置210。主装置210根据第三触发信号回报监控结果SM。在其它实施例中,当主装置210执行程序码,并执行到一断点时,表示第二触发事件发生。因此,主装置210停止监控。In another possible embodiment, when the user opens a monitoring application code (not shown) of the external device 110 and clicks a monitoring option, the external device 110 sends a first trigger signal to the host device 210. The host device 210 starts to monitor the access status of the storage devices 221, 231, and 232 according to the first trigger signal. When the user clicks a stop option, the external device 110 sends a second trigger signal to the host device 210. The host device 210 stops monitoring the access status of the storage devices 221, 231, and 232 according to the second trigger signal. In this example, when the user clicks a transfer option, the external device 110 sends a third trigger signal to the host device 210. The host device 210 reports the monitoring result S M according to the third trigger signal. In other embodiments, when the host device 210 executes the program code and reaches a breakpoint, it indicates that the second trigger event occurs. Therefore, the host device 210 stops monitoring.
图3为本发明的微控制器的另一示意图。图3相似图2,不同之处在于图3的存取指令CM1及CM2是由不同的主装置(如310及320)所提供。在本实施例中,主装置310通过汇流排350传送存取指令CM1予从装置330。从装置330根据存取指令CM1存取存储装置331。另外,主装置320通过汇流排360传送存取指令CM2予从装置340。从装置340根据存取指令CM2存取存储装置341。FIG. 3 is another schematic diagram of the microcontroller of the present invention. FIG. 3 is similar to FIG. 2, except that the access commands CM1 and CM2 of FIG. 3 are provided by different master devices (such as 310 and 320). In this embodiment, the master device 310 transmits the access command CM1 to the slave device 330 via the bus 350. The slave device 330 accesses the storage device 331 according to the access command CM1 . In addition, the master device 320 transmits the access command CM2 to the slave device 340 via the bus 360. The slave device 340 accesses the storage device 341 according to the access command CM2 .
在一可能实施例中,主装置310是为一中央处理器,并且主装置320是为一PDMA控制器。当一第一触发事件发生时,主装置310监控从装置330的存取操作,用以产生一监控结果SMA。当一第二触发事件发生时,主装置310停止监控从装置330的存取操作。当一第三触发事件发生时,主装置320监控从装置340的存取操作,用以产生一监控结果SMB。当一第四触发事件发生时,主装置320停止监控从装置340的存取操作。In one possible embodiment, the master device 310 is a central processing unit, and the master device 320 is a PDMA controller. When a first trigger event occurs, the master device 310 monitors the access operation of the slave device 330 to generate a monitoring result S MA . When a second trigger event occurs, the master device 310 stops monitoring the access operation of the slave device 330. When a third trigger event occurs, the master device 320 monitors the access operation of the slave device 340 to generate a monitoring result S MB . When a fourth trigger event occurs, the master device 320 stops monitoring the access operation of the slave device 340.
在一可能实施例中,主装置310及320可能分别存储监控结果SMA及SMB于存储模块370中。在其它实施例中,主装置310及320的至少一者是直接输出监控结果(SMA及/或SMB)予一外部装置。在本实施例中,存储模块370具有至少一存储器(未显示),用以存储程序码及监控结果SMA及SMB。由于从装置330、340、汇流排350、360的特性与图2的从装置220、230、汇流排240、250的特性相似,故不再赘述。In one possible embodiment, the master devices 310 and 320 may store the monitoring results S MA and S MB in the storage module 370, respectively. In other embodiments, at least one of the master devices 310 and 320 directly outputs the monitoring results (S MA and/or S MB ) to an external device. In this embodiment, the storage module 370 has at least one memory (not shown) for storing program code and the monitoring results S MA and S MB . Since the characteristics of the slave devices 330, 340, and the bus 350, 360 are similar to those of the slave devices 220, 230, and the bus 240, 250 of FIG. 2 , they are not described in detail.
在一些实施例中,主装置310执行存储模块370所存储的一程序码,用以产生一控制指令CM3。主装置320根据控制指令CM3,产生存取指令CM2,用以存取从装置340。在其它实施例中,主装置320是直接执行存储模块370所存储的程序码,用以产生存取指令CM2。在一可能实施例中,存储模块370具有一非易失性存储器,用以存储程序码。在此例中,存储模块370更具有一易失性存储器,用以存储监控结果SMA及SMB。在其它实施例中,监控结果SMA及SMB是存储于非易失性存储器中。In some embodiments, the master device 310 executes a program code stored in the storage module 370 to generate a control instruction CM 3 . The master device 320 generates an access instruction CM 2 according to the control instruction CM 3 to access the slave device 340 . In other embodiments, the master device 320 directly executes the program code stored in the storage module 370 to generate the access instruction CM 2 . In one possible embodiment, the storage module 370 has a non-volatile memory to store the program code. In this example, the storage module 370 further has a volatile memory to store the monitoring results S MA and S MB . In other embodiments, the monitoring results S MA and S MB are stored in the non-volatile memory.
图4为本发明的存储模块370的内部示意图。如图所示,存储模块370包括存储库(bank)411~418,但并非用以限制本发明。在其它实施例中,存储模块370具有更多或更少的存储库。在本实施例中,存储库411~414用以存储监控结果SMA,而存储库415~418用以存储监控结果SMB。FIG4 is an internal schematic diagram of the storage module 370 of the present invention. As shown in the figure, the storage module 370 includes storage banks 411-418, but this is not intended to limit the present invention. In other embodiments, the storage module 370 has more or fewer storage banks. In this embodiment, the storage banks 411-414 are used to store the monitoring results S MA , and the storage banks 415-418 are used to store the monitoring results S MB .
存储库411用以存储监控结果SMA里的地址参数组addr_A。举例而言,当主装置310针对存储装置331的地址0x4007003x及0x4007000c的数据进行存取时,主装置310记录地址0x4007003x及0x4007000c于存储库411中。The memory bank 411 is used to store the address parameter set addr_A in the monitoring result S MA . For example, when the host device 310 accesses data at addresses 0x4007003x and 0x4007000c of the storage device 331 , the host device 310 records the addresses 0x4007003x and 0x4007000c in the memory bank 411 .
存储库412用以存储监控结果SMA里的数据参数组DA_A。在一可能实施例中,数据参数组DA_A用以表示主装置310写入地址0x4007003x及0x4007000c的数据数值,或是主装置310从地址0x4007003x及0x4007000c所得到的数据数值。The storage memory 412 is used to store the data parameter group DA_A in the monitoring result S MA . In one embodiment, the data parameter group DA_A is used to represent the data values written by the host device 310 to the addresses 0x4007003x and 0x4007000c, or the data values obtained by the host device 310 from the addresses 0x4007003x and 0x4007000c.
存储库413用以存储监控结果SMA里的时间参数组TMS_A。举例而言,主装置310可能在一操作频率的第五个周期及第六个周期存取存储装置331。在此例中,主装置310将周期cycle5及cycle6记录于存储库413中。The memory bank 413 is used to store the time parameter set TMS_A in the monitoring result S MA . For example, the host device 310 may access the memory device 331 at the fifth cycle and the sixth cycle of an operating frequency. In this example, the host device 310 records the cycles cycle5 and cycle6 in the memory bank 413 .
存储库414用以存储监控结果SMA里的存取参数组RorW_A。举例而言,主装置310可能写入两数据分别写入存储装置331中。因此,存储库414记录两次的写入操作Write。The storage memory 414 is used to store the access parameter set RorW_A in the monitoring result S MA . For example, the host device 310 may write two data into the storage device 331 respectively. Therefore, the storage memory 414 records two write operations Write.
存储库415~418分别记录监控结果SMB里的地址参数组addr_B、数据参数组DA_B、时间参数组TMS_B及存取参数组RorW_B。由于地址参数组addr_B、数据参数组DA_B、时间参数组TMS_B及存取参数组RorW_B的特性与地址参数组addr_A、数据参数组DA_A、时间参数组TMS_A及存取参数组RorW_A的特性相同,故不再赘述。在其它实施例中,地址参数组addr_B、数据参数组DA_B、时间参数组TMS_B及存取参数组RorW_B可能分别存储于存储库411~414中。The memory banks 415-418 respectively record the address parameter group addr_B, data parameter group DA_B, time parameter group TMS_B and access parameter group RorW_B in the monitoring result S MB . Since the characteristics of the address parameter group addr_B, data parameter group DA_B, time parameter group TMS_B and access parameter group RorW_B are the same as those of the address parameter group addr_A, data parameter group DA_A, time parameter group TMS_A and access parameter group RorW_A, they are not described in detail. In other embodiments, the address parameter group addr_B, data parameter group DA_B, time parameter group TMS_B and access parameter group RorW_B may be stored in the memory banks 411-414 respectively.
由于主装置仅监控存储装置(如寄存器)的存取状态,故监控结果SMA及SMB只是单纯的二进制格式文件。外部装置(如计算机设备)分析监控结果SMA及SMB,用以产生易读的格式(如波形)供使用者参考,以便使用者快速地得知程序码的流程是否正确。Since the main device only monitors the access status of the storage device (such as a register), the monitoring results S MA and S MB are just simple binary format files. The external device (such as a computer device) analyzes the monitoring results S MA and S MB to generate an easy-to-read format (such as a waveform) for the user's reference, so that the user can quickly know whether the flow of the program code is correct.
除非另作定义,在此所有词汇(包含技术与科学词汇)均属本发明所属领域技术人员的一般理解。此外,除非明白表示,词汇于一般字典中的定义应解释为与其相关技术领域的文章中意义一致,而不应解释为理想状态或过分正式的语态。Unless otherwise defined, all words (including technical and scientific words) herein are generally understood by those skilled in the art to which the present invention belongs. In addition, unless expressly stated, the definition of a word in a general dictionary should be interpreted as consistent with the meaning in the article in the relevant technical field, and should not be interpreted as an ideal state or overly formal tone.
虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明,任何所属领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰。举例来说,本发明实施例所述的系统、装置或是方法可以硬件、软件或硬件以及软件的组合的实体实施例加以实现。因此本发明的保护范围当视权利要求所界定的为准。Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. For example, the system, device or method described in the embodiments of the present invention may be implemented in a physical embodiment of hardware, software or a combination of hardware and software. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims (9)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108148541A TWI709907B (en) | 2019-12-31 | 2019-12-31 | Micro-controller |
TW108148541 | 2019-12-31 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113127291A CN113127291A (en) | 2021-07-16 |
CN113127291B true CN113127291B (en) | 2024-04-05 |
Family
ID=74202347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011560867.4A Active CN113127291B (en) | 2019-12-31 | 2020-12-25 | Micro controller |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113127291B (en) |
TW (1) | TWI709907B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI761917B (en) * | 2020-08-19 | 2022-04-21 | 鴻海精密工業股份有限公司 | Program debugging method, device and storage media |
TWI818659B (en) * | 2022-08-04 | 2023-10-11 | 新唐科技股份有限公司 | Micro-controller, operating system and control method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5772491A (en) * | 1980-10-23 | 1982-05-06 | Meisei Electric Co Ltd | Control system for terminal equipment |
JPS6295647A (en) * | 1985-10-22 | 1987-05-02 | Nec Corp | Microprogram controller with run monitoring device |
US5819108A (en) * | 1996-10-17 | 1998-10-06 | Acer Peripherals, Inc. | Programming of software into programmable memory within a peripheral device |
KR20050095981A (en) * | 2004-03-29 | 2005-10-05 | 매그나칩 반도체 유한회사 | Microcontroller having an internal process mornitoring function and method thereof |
CN105740718A (en) * | 2014-11-26 | 2016-07-06 | 纬创资通股份有限公司 | Electronic system, electronic device and access authentication method of electronic device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9703524B2 (en) * | 2015-11-25 | 2017-07-11 | Doppler Labs, Inc. | Privacy protection in collective feedforward |
WO2019220221A1 (en) * | 2018-05-14 | 2019-11-21 | Terrence Keith Ashwin | An emergency controller unit having a wifi authentication sensor |
-
2019
- 2019-12-31 TW TW108148541A patent/TWI709907B/en active
-
2020
- 2020-12-25 CN CN202011560867.4A patent/CN113127291B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5772491A (en) * | 1980-10-23 | 1982-05-06 | Meisei Electric Co Ltd | Control system for terminal equipment |
JPS6295647A (en) * | 1985-10-22 | 1987-05-02 | Nec Corp | Microprogram controller with run monitoring device |
US5819108A (en) * | 1996-10-17 | 1998-10-06 | Acer Peripherals, Inc. | Programming of software into programmable memory within a peripheral device |
KR20050095981A (en) * | 2004-03-29 | 2005-10-05 | 매그나칩 반도체 유한회사 | Microcontroller having an internal process mornitoring function and method thereof |
CN105740718A (en) * | 2014-11-26 | 2016-07-06 | 纬创资通股份有限公司 | Electronic system, electronic device and access authentication method of electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN113127291A (en) | 2021-07-16 |
TWI709907B (en) | 2020-11-11 |
TW202127234A (en) | 2021-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8990462B2 (en) | Storage device, computing system including the same and data transferring method thereof | |
US8874959B2 (en) | Information processing apparatus, image forming apparatus, and information processing program | |
CN113806253A (en) | Detection of compromised storage device firmware | |
TWI588837B (en) | System on chip with debug controller and operating method thereof | |
KR101986355B1 (en) | A embedded Multimedia Card(eMMC), eMMC system including the eMMC, and a method for operating the eMMC | |
CN113127291B (en) | Micro controller | |
KR20160066973A (en) | Data storage device for self-detecting error and logging operation, and system having the same | |
CN108549591A (en) | A kind of black box device and its implementation of embedded system | |
US8683130B2 (en) | Fabricating key fields | |
CN205942670U (en) | Multi -computer auto -change over device | |
CN115599719A (en) | An FPGA-based FIFO interface multi-channel DMA controller | |
WO2011109971A1 (en) | Circuit and method for microcontroller online debugging, microcontroller | |
CN201569497U (en) | Control system for temperature measurement and alarm | |
TWI420318B (en) | A non-intrusive general-purpose common busbar switching device | |
JP2021515308A (en) | Devices and methods for accessing metadata when debugging devices | |
CN113824741A (en) | IIC device communication method, apparatus, device, system and medium | |
CN113434442A (en) | A switch and data access method | |
CN110765060B (en) | MDIO bus-to-parallel bus conversion method and device, equipment and medium | |
TWI463501B (en) | Development system for a flash memory module | |
CN108628761A (en) | Atomic commands execute method and apparatus | |
CN113177388B (en) | Apparatus, system and method for IP core testing and verification | |
CN113535459B (en) | Data access method and device in response to power supply events | |
TWI718858B (en) | Data storage device and non-volatile memory control method | |
JP7516974B2 (en) | DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE | |
JP2003263339A (en) | Microcomputer with built-in debug function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |