[go: up one dir, main page]

CN106980587B - General input/output time sequence processor and time sequence input/output control method - Google Patents

General input/output time sequence processor and time sequence input/output control method Download PDF

Info

Publication number
CN106980587B
CN106980587B CN201710335729.8A CN201710335729A CN106980587B CN 106980587 B CN106980587 B CN 106980587B CN 201710335729 A CN201710335729 A CN 201710335729A CN 106980587 B CN106980587 B CN 106980587B
Authority
CN
China
Prior art keywords
sequence
processor
time sequence
input
serial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710335729.8A
Other languages
Chinese (zh)
Other versions
CN106980587A (en
Inventor
葛松芬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Yangyi Information Technology Co ltd
Original Assignee
Suzhou Yangyi Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Yangyi Information Technology Co ltd filed Critical Suzhou Yangyi Information Technology Co ltd
Priority to CN201710335729.8A priority Critical patent/CN106980587B/en
Priority to CN202310732544.6A priority patent/CN117033279A/en
Publication of CN106980587A publication Critical patent/CN106980587A/en
Application granted granted Critical
Publication of CN106980587B publication Critical patent/CN106980587B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4027Coupling between buses using bus bridges
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Programmable Controllers (AREA)
  • Communication Control (AREA)

Abstract

本发明涉及一种通用输入输出时序处理器及时序输入输出控制方法,由总线接口桥、处理器寄存器堆、时序控制状态机、时序发生计数器、时序RAM存储器、串并转换控制器组成,所述处理器寄存器堆包含多个序列控制寄存器组。本发明的有益效果是:实现一种通用的,即支持各种数字端口输入输出时序变化要求,应对复杂多变的各种数字接口协议;降低芯片研发周期;功耗更低。

The invention relates to a universal input and output timing processor and a timing input and output control method, which is composed of a bus interface bridge, a processor register file, a timing control state machine, a timing generation counter, a timing RAM memory, and a serial-to-parallel conversion controller. The processor register file contains several sets of sequence control registers. The beneficial effects of the present invention are: realizing a universal protocol that supports various digital port input and output timing change requirements, coping with various complex and changeable digital interface protocols; reducing the chip development cycle; and lower power consumption.

Description

一种通用输入输出时序处理器及时序输入输出控制方法A universal input and output timing processor and timing input and output control method

技术领域Technical field

本发明涉及处理器技术领域,具体的说是一种通用输入输出时序处理器及时序输入输出控制方法。The invention relates to the technical field of processors, and specifically relates to a universal input and output timing processor and a timing input and output control method.

背景技术Background technique

在现有的芯片中,如果要实现各种数字接口,就必须在内部加入其控制器。例如要实现SPI接口,就必须加入SPI控制器,要加入UART接口,就必须加入UART控制器,要实现对片外SRAM的读写访问就必须加入SRAM的控制器。然而这些芯片在不同使用者那里的应用场景并不相同。有些客户不需要SPI,但芯片却集成了;而有些客户需要XXX接口,但芯片却没有集成;有些客户需要8路PWM接口,而芯片却只集成了2路。芯片集成了客户不需要的接口,导致性价比下降,不必要的功耗也会增加。而且每设计一种接口会比较复杂,延长了芯片研发生产的周期,也导致成本上升。同时过多接口的加入,导致芯片设计复杂,漏洞过多,出现错误概率增加。In existing chips, if you want to implement various digital interfaces, you must add its controller internally. For example, to implement the SPI interface, you must add an SPI controller, to add a UART interface, you must add a UART controller, and to implement read and write access to off-chip SRAM, you must add an SRAM controller. However, the application scenarios of these chips are different for different users. Some customers do not need SPI, but the chip is integrated; some customers need XXX interface, but the chip is not integrated; some customers need 8-channel PWM interface, but the chip only integrates 2 channels. The chip integrates interfaces that customers do not need, resulting in a decrease in cost performance and unnecessary power consumption. Moreover, designing each interface will be more complicated, prolonging the cycle of chip development and production, and also leading to increased costs. At the same time, the addition of too many interfaces makes the chip design complex, has too many loopholes, and increases the probability of errors.

发明内容Contents of the invention

针对上述现有技术不足,本发明提供一种通用输入输出时序处理器。In view of the above-mentioned shortcomings of the prior art, the present invention provides a universal input-output timing processor.

本发明提供的一种通用输入输出时序处理器及时序输入输出控制方法是通过以下技术方案实现的:A universal input and output timing processor and a timing input and output control method provided by the present invention are realized through the following technical solutions:

一种通用输入输出时序处理器,由总线接口桥、处理器寄存器堆、时序控制状态机、时序发生计数器、时序RAM存储器、串并转换控制器组成,所述处理器寄存器堆包含多个序列控制寄存器组,其中:A general input and output timing processor, consisting of a bus interface bridge, a processor register file, a timing control state machine, a timing generation counter, a timing RAM memory, and a serial-to-parallel conversion controller. The processor register file contains multiple sequence controls register group, where:

所述总线接口桥分别连接处理器寄存器堆、时序RAM存储器,总线接口桥从总线上接收CPU的各种命令传递给各个寄存器,起到了一个命令格式转换的作用;The bus interface bridge is connected to the processor register file and the sequential RAM memory respectively. The bus interface bridge receives various commands of the CPU from the bus and passes them to each register, which plays a role in command format conversion;

所述处理器寄存器堆连接时序控制状态机,处理器寄存器堆用于暂存处理器的处理数据;The processor register file is connected to the timing control state machine, and the processor register file is used to temporarily store the processing data of the processor;

所述时序控制状态机连接时序发生计数器,时序控制状态机由取指控制器、译码器、执行器组成,取指器用于读取控制代码,译码器用于分析代码并翻译成执行器便于执行控制的代码,执行器用于配合计数器具体实施控制;The timing control state machine is connected to a timing generation counter. The timing control state machine is composed of an instruction controller, a decoder, and an executor. The instruction fetcher is used to read the control code, and the decoder is used to analyze the code and translate it into an executor for convenience. Execution control code, the executor is used to cooperate with the counter to implement specific control;

所述时序发生计数器连接时序RAM存储器;The timing generation counter is connected to the timing RAM memory;

时序RAM存储器连接串并转换控制器组,时序RAM存储器存储各个序列的控制代码,方便于序列状态机和串并转换控制器的读取,所述串并转换控制器用于完成位宽转换,从时序RAM存储器读取数据,然后依次输送到指定的引脚上;The sequential RAM memory is connected to the serial-to-parallel conversion controller group. The sequential RAM memory stores the control codes of each sequence to facilitate the reading of the sequence state machine and the serial-to-parallel conversion controller. The serial-to-parallel conversion controller is used to complete the bit width conversion, from The sequential RAM memory reads the data and then transfers it to the designated pin in turn;

所述序列控制寄存器组中,每个序列控制寄存器组对应1个序列控制。In the sequence control register group, each sequence control register group corresponds to one sequence control.

所述串并转换控制器是双向的,可从当前设定成输入的引脚上读取数据,写入到存储器的指定位置。The serial-to-parallel conversion controller is bidirectional and can read data from the pin currently set as input and write it to a designated location in the memory.

一种时序输入输出控制方法,采用芯片引脚与RAM交换数据的方式,在控制器的控制下,当设定为输出时,从RAM中读取数据输出到芯片引脚;当设定为输入时,从芯片引脚读取数据写入到RAM中。图2中有两个RAM,1个RAM(数据RAM)中存放输入输出序列的数据。当输出时将RAM中的数据写入芯片引脚。当输入时读取芯片引脚的数据写入RAM。另1个RAM(方向控制RAM)存储序列的输入输出方向选择控制序列。在控制器的控制下随着序列的发生依次读取RAM中的输入写入芯片引脚的输入输出方向选择寄存器,控制芯片输入输出方向,也同时根据方向控制数据RAM当前是读取还是写入;A timing input and output control method that uses the method of exchanging data between chip pins and RAM. Under the control of the controller, when set to output, data is read from RAM and output to the chip pin; when set to input When, the data is read from the chip pin and written to the RAM. There are two RAMs in Figure 2. One RAM (data RAM) stores input and output sequence data. When output, the data in RAM is written to the chip pin. When input is read the data from the chip pins is written to RAM. Another RAM (direction control RAM) stores the input and output direction selection control sequence of the sequence. Under the control of the controller, as the sequence occurs, the input in the RAM is sequentially read and written into the input and output direction selection register of the chip pin, which controls the input and output direction of the chip. It also controls whether the data RAM is currently reading or writing according to the direction. ;

将一个或多个序列存储在RAM中,当同一时刻只有1个序列在运行或者没有序列在运行;每个序列对应着1个序列控制寄存器组,组内至少设置4个寄存器,采用波特率寄存器控制本序列的速度;Store one or more sequences in RAM, when only one sequence is running or no sequence is running at the same time; each sequence corresponds to a sequence control register group, with at least 4 registers set in the group, using the baud rate The register controls the speed of this sequence;

序列首地址寄存器存放本序列在RAM中存放的开始处地址,尾地址寄存器存放本序列在RAM中存放的结束地址;控制寄存器指明本序列的属性。The first address register of the sequence stores the starting address of this sequence stored in RAM, and the tail address register stores the end address of this sequence stored in RAM; the control register specifies the attributes of this sequence.

常见属性有:Common attributes are:

1、方向灵活性控制。本序列的方向可以像上面所描述的采用1个专门的RAM存储来控制,这样灵活性比较高,可随着序列发生随时切换方向。但也可由本属性指明本序列只是输入,或只是输出,或者输入输出同时支持。如果指明只是输入或输出,那么方向控制RAM在本序列发生时不会读取。1. Directional flexibility control. The direction of this sequence can be controlled using a dedicated RAM storage as described above. This provides high flexibility and can switch the direction at any time as the sequence occurs. However, this attribute can also be used to indicate that this sequence is only input, or only output, or supports both input and output. If input or output only is specified, the direction control RAM will not be read while this sequence occurs.

2、串并转换设置。上面说明的是一种无串并转换设置。1个RAM 1次读取或写入可以是1个字节(8位),2个字节(16位)或4个字节(32位)等等(本文描述以1个字节为例),每位对应芯片的1个引脚。但还有1种带串并转换的设置,就是1个RAM的数据都对应1个引脚,要写入引脚时,需要将每次RAM读取的数据由并行到串行转换成位流,依次送入芯片的1个引脚;要读取引脚时,将引脚上的数据由串行转换成并行数据,再写入RAM。当需要进行串并转换时,序列的方向控制如果由RAM提供,那么方向控制RAM中读出的数据也要进行从并行到串行的转换。而如果是由本序列的控制寄存器提供,则不需要。2. Serial to parallel conversion settings. What is described above is a setup without serial-to-parallel conversion. One RAM read or write can be 1 byte (8 bits), 2 bytes (16 bits) or 4 bytes (32 bits), etc. (This article uses 1 byte as an example. ), each bit corresponds to 1 pin of the chip. But there is also a setting with serial-to-parallel conversion, that is, the data of a RAM corresponds to a pin. When writing to a pin, the data read by the RAM needs to be converted from parallel to serial into a bit stream each time. , sent to one pin of the chip in turn; when the pin is to be read, the data on the pin is converted from serial to parallel data, and then written into RAM. When serial-to-parallel conversion is required, if the direction control of the sequence is provided by RAM, then the data read out from the direction control RAM must also be converted from parallel to serial. If it is provided by the control register of this sequence, it is not needed.

3、序列启动条件控制。1个控制器可以有几组序列控制寄存器组,以支持多个序列发生。每个序列的启动条件包括:3. Sequence start condition control. A controller can have several sets of sequence control register sets to support multiple sequence occurrences. The starting conditions for each sequence include:

(1)、当指定的芯片引脚出现上升沿时;(1) When the designated chip pin has a rising edge;

(2)、当指定的芯片引脚出现下降沿时;(2) When the specified chip pin has a falling edge;

(3)、当指定的芯片引脚出现上升沿或者下降沿时;(3) When the designated chip pin has a rising edge or falling edge;

(4)、当指定的芯片引脚等于0时;(4) When the specified chip pin is equal to 0;

(5)、当指定的芯片引脚等于1时;(5) When the specified chip pin is equal to 1;

(6)、当输入输出时序处理器收到其它CPU命令要求启动时;(6) When the input and output timing processor receives other CPU commands to start;

(7)、当指定的其它输入输出时序处理器(1个芯片内可以有多个输入输出时序处理器)的某个序列开始,与之同时开始;(7) When a sequence of other specified input and output timing processors (one chip can have multiple input and output timing processors) starts, it starts at the same time;

(8)、当指定的某个序列结束时开始;(8) Start when a specified sequence ends;

4、大小端控制。指明在串行传输时先发送字节中的高位还是低位。4. Big and small endian control. Indicates whether to send the high-order bit or low-order bit of the byte first during serial transmission.

本发明的有益效果是:The beneficial effects of the present invention are:

1、实现一种通用的,即支持各种数字端口输入输出时序变化要求,应对复杂多变的各种数字接口协议;1. Implement a universal protocol that supports input and output timing changes of various digital ports and copes with various complex and changeable digital interface protocols;

2、每个端口只需支持1个通用输入输出时序处理器即可,降低芯片研发周期;2. Each port only needs to support one universal input and output timing processor, reducing the chip development cycle;

3、功耗更低;3. Lower power consumption;

4、可应用于各种带输入输出数字接口的芯片中。在应用过程中也可以根据应用场景将时序处理器分类以进行简化。例如,有些端口上的时序处理器只支持串行输入(读取某一引脚上的数值将其串转并成字节数据写入RAM)或输出(将RAM字节数据并转串输出到某一引脚);有些端口上的时序处理器只支持并行输入(例如,同时读取8个引脚上的数据,作为1个字节写入RAM)或输出(例如,从RAM中读取1个字节并行输出到8个引脚),不进行串并转换;有些端口上的时序处理器支持并行输出,不支持并行输入等等。这些都是为了根据实际情况简化设计而作的类别划分。4. Can be used in various chips with input and output digital interfaces. During the application process, timing processors can also be classified according to application scenarios for simplification. For example, the timing processor on some ports only supports serial input (read the value on a certain pin, convert it into serial data and write it into byte data into RAM) or output (convert RAM byte data into serial data and output it to a certain pin); the timing processor on some ports only supports parallel input (for example, reading data on 8 pins simultaneously and writing it to RAM as 1 byte) or output (for example, reading from RAM 1 byte parallel output to 8 pins), no serial-to-parallel conversion is performed; the timing processor on some ports supports parallel output, but does not support parallel input, etc. These are classifications made to simplify the design based on actual conditions.

附图说明Description of the drawings

图1是通用输入输出时序处理器结构示意图;Figure 1 is a schematic structural diagram of a general-purpose input and output timing processor;

图2是一种时序输入输出控制方法示意图;Figure 2 is a schematic diagram of a timing input and output control method;

图3是串并转换设置示意图。Figure 3 is a schematic diagram of the serial-to-parallel conversion setup.

具体实施方式Detailed ways

下面将通过实施例对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solution of the present invention will be clearly and completely described below through examples. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of the present invention.

文中英文缩写释义:CPU:中央处理器单元;GPIO:通用输入输出端口;MUX:多路选择器;IIC:集成电路总线;UART:通用异步收发传输器;PWM:脉冲宽度调制;RAM:随机存取存储器;SPI:串行外设接口;外设IP:在集成电路的可重用设计方法学中,IP核,全称知识产权核(英语:intellectual property core),是指某一方提供的、形式为逻辑单元、芯片设计的可重用模块。Definition of English abbreviations in this article: CPU: Central Processing Unit; GPIO: General Input and Output Port; MUX: Multiplexer; IIC: Integrated Circuit Bus; UART: Universal Asynchronous Receiver and Transmitter; PWM: Pulse Width Modulation; RAM: Random Memory Access memory; SPI: Serial Peripheral Interface; Peripheral IP: In the reusable design methodology of integrated circuits, IP core, the full name is intellectual property core (English: intellectual property core), refers to the form provided by a certain party. Logic units, reusable modules for chip design.

实施例1:Example 1:

如图1所示的一种通用输入输出时序处理器,由总线接口桥、处理器寄存器堆、时序控制状态机、计数器,时序RAM存储器,串并转换控制器组成。As shown in Figure 1, a general-purpose input and output timing processor is composed of a bus interface bridge, a processor register file, a timing control state machine, a counter, a timing RAM memory, and a serial-to-parallel conversion controller.

总线接口桥用于从总线上接收CPU的各种命令传递给各个寄存器。起到了一个命令格式转换的作用。The bus interface bridge is used to receive various commands of the CPU from the bus and pass them to various registers. It functions as a command format conversion.

处理器寄存器堆内部包含若干个序列控制寄存器组(每个寄存器组对应1个序列控制),用于暂存处理器的处理数据。序列首地址寄存器记录了要发生序列的在存储器中访问的起始地址,序列尾地址寄存器记录了要发生序列的在存储器中的结束地址。序列控制寄存器有方向灵活性控制,串并转换,启动条件,大小端控制,序列长度控制,发生次数控制,位使能等。The processor register file contains several sequence control register groups (each register group corresponds to one sequence control), which are used to temporarily store the processing data of the processor. The sequence head address register records the starting address in the memory where the sequence is to occur, and the sequence tail address register records the end address in the memory where the sequence is to occur. The sequence control register has direction flexibility control, serial-to-parallel conversion, start conditions, big and small endian control, sequence length control, occurrence number control, bit enable, etc.

序列长度控制要发生序列的长度和序列发生次数。其序列长度最大值受限于存储器的大小,根据应用场景和系统规格确定时序存储器的容量。容量越大,序列长度最大值也就越大。序列长度最小值为1位。另外注意存储器中不止存储1个序列,可以存储多个序列。也可以通过程序控制各个序列的发生先后顺序和次数。The sequence length controls the length of the sequence to occur and the number of times the sequence occurs. The maximum sequence length is limited by the size of the memory, and the capacity of the sequential memory is determined according to the application scenario and system specifications. The larger the capacity, the larger the maximum sequence length. The minimum sequence length is 1 bit. Also note that there is not only one sequence stored in the memory, but multiple sequences can be stored. The sequence and number of occurrences of each sequence can also be controlled through a program.

每个序列的发生次数从只发生1次到无数次(即持续不停的发生)。每个序列启动的条件有:1、受CPU控制直接启动;2、当某个序列结束时启动或者和某个序列同时启动;3、当输入引脚上出现指定的上升沿,下降沿,边沿(上升沿或下降沿),等于0时或等于1时启动,这些条件要由CPU事先配置入控制寄存器。序列速度寄存器控制要发生序列的运行速度,即每个位占用多少个时钟周期。支持每个序列设定不同的速度。The number of occurrences of each sequence ranges from just one to countless (i.e., continuous occurrences). The conditions for each sequence to start are: 1. Start directly under the control of the CPU; 2. Start when a certain sequence ends or start at the same time as a certain sequence; 3. When the specified rising edge, falling edge, edge appears on the input pin (rising edge or falling edge), starts when equal to 0 or equals to 1. These conditions must be configured into the control register by the CPU in advance. The Sequence Speed register controls how fast the sequence is to occur, i.e. how many clock cycles each bit takes. Support setting different speeds for each sequence.

位使能决定究竟是哪些引脚参与本次序列发生。The bit enable determines which pins participate in this sequence.

序列发生控制状态机是中央控制器,决定序列发生的各个步骤,并具体实施。与之配合的计数器起到定时的辅助控制的作用。序列发生控制状态机由3个控制器组成。取指器用于读取控制代码,译码器用于分析代码并翻译成执行器便于执行控制的代码。而执行器用于配合计数器具体实施控制。The sequence control state machine is the central controller that determines and implements each step of the sequence. The counter matched with it plays the role of timing auxiliary control. The sequence control state machine consists of 3 controllers. The pointer is used to read the control code, and the decoder is used to analyze the code and translate it into a code that the executor can easily execute control. The actuator is used to cooperate with the counter to implement specific control.

时序RAM存储器存储各个序列的控制代码,方便于序列状态机和串并转换控制器的读取。CPU可以像访问普通RAM存储器那样访问这个RAM存储器,所以当时序处理器不工作时,这个RAM存储器可以当做一般存储器供CPU使用。The sequential RAM memory stores the control code of each sequence, which is convenient for reading by the sequence state machine and the serial-to-parallel conversion controller. The CPU can access this RAM memory like an ordinary RAM memory, so when the sequence processor is not working, this RAM memory can be used as a general memory for the CPU.

因为从存储器中读取的数据和写入的数据的位宽是固定的,而每个序列所作用于的引脚的个数不同,引脚的编号也不同。例如序列A控制了4个引脚,分别是引脚0,1,2,3;序列B控制了8个引脚,分别是引脚0,1,5,6,10,11,12,13。所以需要串并转换控制器来完成这个转换操作。串并转换控制器用于完成位宽转换,受中央控制器的决定,从存储器读取数据,然后依次输送到制定的引脚上。同时串并转换控制器是双向,从当前设定成输入的引脚上读取数据,写入到存储器的指定位置。Because the bit width of the data read from the memory and the data written is fixed, and the number of pins applied to each sequence is different, the number of the pins is also different. For example, sequence A controls 4 pins, namely pins 0, 1, 2, and 3; sequence B controls 8 pins, namely pins 0, 1, 5, 6, 10, 11, 12, and 13. . Therefore, a serial-to-parallel conversion controller is needed to complete this conversion operation. The serial-to-parallel conversion controller is used to complete bit-width conversion. It is determined by the central controller, reads data from the memory, and then transmits it to the specified pins in sequence. At the same time, the serial-to-parallel conversion controller is bidirectional, reading data from the pin currently set as input and writing it to the specified location in the memory.

实施例2Example 2

如图2所示的一种时序输入输出控制方法,采用芯片引脚与RAM交换数据的方式,在控制器的控制下,当设定为输出时,从RAM中读取数据输出到芯片引脚;当设定为输入时,从芯片引脚读取数据写入到RAM中。图2中有两个RAM,1个RAM(数据RAM)中存放输入输出序列的数据。当输出时将RAM中的数据写入芯片引脚。当输入时读取芯片引脚的数据写入RAM。另1个RAM(方向控制RAM)存储序列的输入输出方向选择控制序列。在控制器的控制下随着序列的发生依次读取RAM中的输入写入芯片引脚的输入输出方向选择寄存器,控制芯片输入输出方向,也同时根据方向控制数据RAM当前是读取还是写入;As shown in Figure 2, a timing input and output control method uses the method of exchanging data between chip pins and RAM. Under the control of the controller, when set to output, the data is read from the RAM and output to the chip pins. ; When set as input, data is read from the chip pin and written to RAM. There are two RAMs in Figure 2. One RAM (data RAM) stores input and output sequence data. When output, the data in RAM is written to the chip pin. When input is read the data from the chip pins is written to RAM. Another RAM (direction control RAM) stores the input and output direction selection control sequence of the sequence. Under the control of the controller, as the sequence occurs, the input in the RAM is sequentially read and written into the input and output direction selection register of the chip pin, which controls the input and output direction of the chip. It also controls whether the data RAM is currently reading or writing according to the direction. ;

将一个或多个序列存储在RAM中,当同一时刻只有1个序列在运行或者没有序列在运行;每个序列对应着1个序列控制寄存器组,组内至少设置4个寄存器,采用波特率寄存器控制本序列的速度;Store one or more sequences in RAM, when only one sequence is running or no sequence is running at the same time; each sequence corresponds to a sequence control register group, with at least 4 registers set in the group, using the baud rate The register controls the speed of this sequence;

序列首地址寄存器存放本序列在RAM中存放的开始处地址,尾地址寄存器存放本序列在RAM中存放的结束地址;控制寄存器指明本序列的属性。The first address register of the sequence stores the starting address of this sequence stored in RAM, and the tail address register stores the end address of this sequence stored in RAM; the control register specifies the attributes of this sequence.

常见属性有:Common attributes are:

1、方向灵活性控制。本序列的方向可以像上面所描述的采用1个专门的RAM存储来控制,这样灵活性比较高,可随着序列发生随时切换方向。但也可由本属性指明本序列只是输入,或只是输出,或者输入输出同时支持。如果指明只是输入或输出,那么方向控制RAM在本序列发生时不会读取。1. Directional flexibility control. The direction of this sequence can be controlled using a dedicated RAM storage as described above. This provides high flexibility and can switch the direction at any time as the sequence occurs. However, this attribute can also be used to indicate that this sequence is only input, or only output, or supports both input and output. If input or output only is specified, the direction control RAM will not be read while this sequence occurs.

2、串并转换设置。上面说明的是一种无串并转换设置。1个RAM 1次读取或写入可以是1个字节(8位),2个字节(16位)或4个字节(32位)等等(本文描述以1个字节为例),每位对应芯片的1个引脚。但还有1种带串并转换的设置,就是1个RAM的数据都对应1个引脚,要写入引脚时,需要将每次RAM读取的数据由并行到串行转换成位流,依次送入芯片的1个引脚;要读取引脚时,将引脚上的数据由串行转换成并行数据,再写入RAM。当需要进行串并转换时,如图3所示,序列的方向控制如果由RAM提供,那么方向控制RAM中读出的数据也要进行从并行到串行的转换。而如果是由本序列的控制寄存器提供,则不需要。2. Serial to parallel conversion settings. What is described above is a setup without serial-to-parallel conversion. One RAM read or write can be 1 byte (8 bits), 2 bytes (16 bits) or 4 bytes (32 bits), etc. (This article uses 1 byte as an example. ), each bit corresponds to 1 pin of the chip. But there is also a setting with serial-to-parallel conversion, that is, the data of a RAM corresponds to a pin. When writing to a pin, the data read by the RAM needs to be converted from parallel to serial into a bit stream each time. , sent to one pin of the chip in turn; when the pin is to be read, the data on the pin is converted from serial to parallel data, and then written into RAM. When serial-to-parallel conversion is required, as shown in Figure 3, if the direction control of the sequence is provided by RAM, then the data read out from the direction control RAM must also be converted from parallel to serial. If it is provided by the control register of this sequence, it is not needed.

3、序列启动条件控制。1个控制器可以有几组序列控制寄存器组,以支持多个序列发生。每个序列的启动条件包括:3. Sequence start condition control. A controller can have several sets of sequence control register sets to support multiple sequence occurrences. The starting conditions for each sequence include:

(1)、当指定的芯片引脚出现上升沿时;(1) When the designated chip pin has a rising edge;

(2)、当指定的芯片引脚出现下降沿时;(2) When the specified chip pin has a falling edge;

(3)、当指定的芯片引脚出现上升沿或者下降沿时;(3) When the designated chip pin has a rising edge or falling edge;

(4)、当指定的芯片引脚等于0时;(4) When the specified chip pin is equal to 0;

(5)、当指定的芯片引脚等于1时;(5) When the specified chip pin is equal to 1;

(6)、当输入输出时序处理器收到其它CPU命令要求启动时;(6) When the input and output timing processor receives other CPU commands to start;

(7)、当指定的其它输入输出时序处理器(1个芯片内可以有多个输入输出时序处理器)的某个序列开始,与之同时开始;(7) When a sequence of other specified input and output timing processors (one chip can have multiple input and output timing processors) starts, it starts at the same time;

(8)、当指定的某个序列结束时开始;(8) Start when a specified sequence ends;

4、大小端控制。指明在串行传输时先发送字节中的高位还是低位。4. Big and small endian control. Indicates whether to send the high-order bit or low-order bit of the byte first during serial transmission.

以上所述实施例仅表示本发明的实施方式,其描述较为具体和详细,但并不能理解为对本发明范围的限制。应当指出的是,对于本领域的技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明保护范围。The above-described embodiments only represent implementations of the present invention, and their descriptions are relatively specific and detailed, but should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.

Claims (3)

1. A general purpose input output sequential processor, characterized by: the system consists of a bus interface bridge, a processor register file, a time sequence control state machine, a time sequence generation counter, a time sequence RAM memory and a serial-parallel conversion controller, wherein the processor register file comprises a plurality of sequence control register groups, and the system comprises the following components:
the bus interface bridge is respectively connected with the processor register file and the time sequence RAM memory, receives various commands of the CPU from the bus and transmits the commands to each register, thereby playing a role in converting a command format;
the processor register file is connected with the time sequence control state machine and is used for temporarily storing processing data of the processor;
the time sequence control state machine is connected with the time sequence generation counter and consists of an instruction fetching controller, a decoder and an executor, wherein the instruction fetching controller is used for reading control codes, the decoder is used for analyzing the codes and translating the codes into codes which are convenient for the executor to execute control, and the executor is used for executing control in cooperation with the counter;
the time sequence generation counter is connected with a time sequence RAM;
the sequential RAM memory is connected with the serial-parallel conversion controller group, the sequential RAM memory stores control codes of each sequence, and is convenient for reading of the sequential state machine and the serial-parallel conversion controller, and the serial-parallel conversion controller is used for completing bit width conversion, reading data from the sequential RAM memory and then sequentially transmitting the data to a designated pin.
2. The universal input output sequential processor of claim 1, wherein: and each sequence control register group corresponds to 1 sequence control in the sequence control register group.
3. The universal input output sequential processor of claim 1, wherein: the serial-parallel controller is bi-directional and can read data from the pins currently set as inputs and write to designated locations of the memory.
CN201710335729.8A 2017-05-12 2017-05-12 General input/output time sequence processor and time sequence input/output control method Active CN106980587B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710335729.8A CN106980587B (en) 2017-05-12 2017-05-12 General input/output time sequence processor and time sequence input/output control method
CN202310732544.6A CN117033279A (en) 2017-05-12 2017-05-12 Time sequence input and output control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710335729.8A CN106980587B (en) 2017-05-12 2017-05-12 General input/output time sequence processor and time sequence input/output control method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310732544.6A Division CN117033279A (en) 2017-05-12 2017-05-12 Time sequence input and output control method

Publications (2)

Publication Number Publication Date
CN106980587A CN106980587A (en) 2017-07-25
CN106980587B true CN106980587B (en) 2023-10-10

Family

ID=59341941

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310732544.6A Pending CN117033279A (en) 2017-05-12 2017-05-12 Time sequence input and output control method
CN201710335729.8A Active CN106980587B (en) 2017-05-12 2017-05-12 General input/output time sequence processor and time sequence input/output control method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202310732544.6A Pending CN117033279A (en) 2017-05-12 2017-05-12 Time sequence input and output control method

Country Status (1)

Country Link
CN (2) CN117033279A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062857B (en) * 2018-08-14 2021-07-13 苏州硅岛信息科技有限公司 Novel message controller capable of realizing communication among multiple processors at high speed and communication method thereof
CN109669894A (en) * 2018-12-21 2019-04-23 天津国芯科技有限公司 A kind of universal asynchronous receiving-transmitting device reducing chip package pin
CN110245096B (en) * 2019-06-24 2023-07-25 苏州暴雪电子科技有限公司 Method for realizing direct connection of processor with expansion calculation module
CN112255944A (en) * 2020-10-16 2021-01-22 同济大学 Driving structure of multi-path parallel ultrasonic sensor
CN113946480B (en) * 2021-11-23 2025-09-05 浙江芯劢微电子股份有限公司 I2C bus detection device and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201418086Y (en) * 2007-12-05 2010-03-03 中国科学院空间科学与应用研究中心 Data communication protocol controller for spaceborne equipment
CN206975631U (en) * 2017-05-12 2018-02-06 葛松芬 A kind of universal input output timing processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201418086Y (en) * 2007-12-05 2010-03-03 中国科学院空间科学与应用研究中心 Data communication protocol controller for spaceborne equipment
CN206975631U (en) * 2017-05-12 2018-02-06 葛松芬 A kind of universal input output timing processor

Also Published As

Publication number Publication date
CN117033279A (en) 2023-11-10
CN106980587A (en) 2017-07-25

Similar Documents

Publication Publication Date Title
CN106980587B (en) General input/output time sequence processor and time sequence input/output control method
CN108052750B (en) SPI FLASH controller based on FPGA and design method thereof
CN110297797B (en) Heterogeneous protocol conversion device and method
CN103914424A (en) Method and device for expanding LPC (linear predictive coding) peripheral on basis of GPIO (general purpose input/output) interface
CN103605625B (en) Based on the control method of the Nor Flash chip of AXI bus
CN113961505B (en) High-performance hardware acceleration and algorithm verification system and method
CN104731746A (en) Equipment controller device
CN108153686B (en) Multi-interface CPU module
CN102567280A (en) A Design Method of Computer Hardware Platform Based on DSP and FPGA
CN103838700A (en) level multiplexing control serial communication device and communication method thereof
CN104834620A (en) SPI (serial peripheral interface) bus circuit, realization method and electronic equipment
CN118349286B (en) Processor, instruction processing device, electronic equipment and instruction processing method
CN106776458B (en) Communication device and communication method between DSPs (digital Signal processors) based on FPGA (field programmable Gate array) and HPI (high Performance Integrated interface)
CN115840592A (en) Flash access method, controller, system and readable storage medium
CN103077142A (en) Simple communication method of bus transmission protocols
CN107436851A (en) Serial peripheral interface four-wire isolation system and its control method
CN106547716A (en) A kind of expansion bus configuration system and method towards low pin number
CN113824741A (en) IIC device communication method, apparatus, device, system and medium
TWI727581B (en) Data transmission system
CN102262595A (en) Extended addressing method for microprocessor
CN103226531A (en) Dual-port peripheral configuration interface circuit
CN206975631U (en) A kind of universal input output timing processor
CN115202257B (en) An LPC bus protocol conversion and device parallel control device and method
CN106375284A (en) A Mitsubishi FX PLC communication converter and conversion method based on STM32F103
CN110765065A (en) System on chip

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230805

Address after: 215000 2-210, building 10, software park, No. 78, Keling Road, high tech Zone, Suzhou, Jiangsu Province

Applicant after: Suzhou Yangyi Information Technology Co.,Ltd.

Address before: 215000 49-505, Zone 1, Longjing Garden, Dongzhu Town, High tech Zone, Suzhou City, Jiangsu Province

Applicant before: Ge Songfen

GR01 Patent grant
GR01 Patent grant