CN105005522A - Online simulation method of LCD nixie tube - Google Patents

Online simulation method of LCD nixie tube Download PDF

Info

Publication number
CN105005522A
CN105005522A CN201510385970.2A CN201510385970A CN105005522A CN 105005522 A CN105005522 A CN 105005522A CN 201510385970 A CN201510385970 A CN 201510385970A CN 105005522 A CN105005522 A CN 105005522A
Authority
CN
China
Prior art keywords
lcd
data
charactron
emulator
file
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.)
Granted
Application number
CN201510385970.2A
Other languages
Chinese (zh)
Other versions
CN105005522B (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.)
Chipsea Technologies Shenzhen Co Ltd
Original Assignee
Chipsea Technologies Shenzhen 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 Chipsea Technologies Shenzhen Co Ltd filed Critical Chipsea Technologies Shenzhen Co Ltd
Priority to CN201510385970.2A priority Critical patent/CN105005522B/en
Publication of CN105005522A publication Critical patent/CN105005522A/en
Application granted granted Critical
Publication of CN105005522B publication Critical patent/CN105005522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The present invention discloses an online simulation method of an LCD nixie tube. Emulation data generated by an LCD nixie tube simulator is obtained through interaction between an emulation drive layer and an emulator, a USB interface is used for communication between the emulation drive layer and the emulator, and emulation data uploaded by the emulator is stored by using a specific data transmission format file, wherein the data transmission format is: a synchronization code + a command + packet length + an LCD register + a checking code, and a distribution command code of the data transmission format is FSPLCD. According to the present invention, on the basis of a data format, an emulation protocol and a simulation algorithm, optimization design is performed on each module of a conventional emulator, and finally an online emulation function of the LCD simulator is implemented. Thus, while developing an LCD nixie tube drive of MCU, equivalent emulation authentication effects can be easily implemented without performing complex physical interface connection, thereby greatly shortening the cycle of product development, and improving development efficiency.

Description

A kind of LCD charactron online simulation method
Technical field
The invention belongs to the technical field of emulator, be particularly integrated with the artificial debugging of the MCU that LCD charactron drives.
Background technology
The embedded IDE of MCU (Integrated Drive Electronics ide) is along with the diversity of MCU integrated functionality, and self also develops from strength to strength.Early stage Keil company just supports universal 51 Series MCU related peripherals functional simulations.As by supporting emulator, realize the real-time simulation as serial port function.Nowadays, increasing company starts the MCU of the tailored version designing RISC instruction architecture, and these MCU are corresponding products application direction usually, is integrated with more functional module.As digital cast LCD numeral method driver module.This kind of LCD digitron display screen is complicated various again, does not compare the standard of specification.Therefore user is in the actual development debugging of LCD numeral method, needs to carry out loaded down with trivial details physical interface pairing, simulating, verifying inefficiency.
Summary of the invention
For solving the problem, the object of the present invention is to provide a kind of LCD charactron online simulation method, the method obtains emulated data alternately by Simulation drive layer and emulator, the mapped file of LCD charactron and data interchange format are processed, final real-time on-line simulation, when the LCD charactron developing MCU drives, do not need the loaded down with trivial details physical interface carried out to connect, just can realize the simulating, verifying effect of equivalence easily.
Another object of the present invention is to provide a kind of LCD charactron online simulation method, and the method can highly shortened the cycle of product development, improves development efficiency.
For achieving the above object, technical scheme of the present invention is as follows.
A kind of LCD charactron online simulation method, it is characterized in that emulated data that LCD charactron simulator produces obtains alternately by Simulation drive layer and emulator that (communication between Simulation drive layer and emulator adopts USB interface, and complete in-circuit emulation function by a set of self-defining Simulation drive agreement, Simulation drive protocol suite expands the related protocol package definition of LCD in-circuit emulation), and preserve by specific data interchange format file the emulated data that emulator uploads, described data interchange format is: synchronous code+order+packet length+LCD register+check code, the assignment commands code of this data interchange format is FSPLCD.
Specifically, Simulation drive layer and emulator carry out exchange method and are:
101, after IDE brings into operation, host process can open up separately a thread for Dynamic simulation function.
102, first Simulation drive layer sends " initiation command " and wraps PSFSTART, informs that emulator brings into operation program; Now the protocol process module of emulator can receive PSFSTART order, and then open emulator work clock, emulator brings into operation.
103, protocol process module jumps to uploading data state and returns the corresponding command bag, and gets back to idle condition; Then emulator every at regular intervals in, automatically can jump to uploading data state and return LCD emulated data; Meanwhile, the execution querying command bag that Simulation drive layer is circulating, inquiry FSPLCD order bag.
104, after inquiring FSPLCD order bag, just packet is resolved and content is written in the middle of cache file according to data interchange format; If run into breakpoint, then can return whole emulated data, and write cache file.
Data message needed for LCD charactron simulator comprises configuration information and emulated data.Further, the method also preserves configuration information by the file of the mapping format defining a kind of LCD charactron.LCD charactron simulator, by reading this configuration file or configuration control, carries out correlation parameter configuration to LCD charactron modeling algorithm.
Described mapping format is:
A, define 5 basic characters and represent 5 kinds of each objects, wherein L: four the red points representing the capable left side of LCD; R: represent LCD capable on the right of four red points; T: represent LCD the first row; D: represent LCD second row; S: represent charactron; B, these characters are utilized to combine.
As, four red points on the LT:LCD the first row left side.
Four red points on the LD:LCD second row left side.
Four on the right of RT:LCD the first row red points.
Four on the right of RD:LCD second row red points.
The charactron of ST:LCD the first row.
The charactron of SD:LCD second row.
Further, definition mapping syntax format is: register value=mapping character.
As, certain MCU pin SEG1 and the section corresponding to SEG2 pin select register to be seg1 [3:0], seg2 [3:0].The section [7:4] of the 1st charactron corresponding to actual LCD data pipe SEG1 pin, the section [3:0] of what SEG2 pin was corresponding is the 1st charactron.Then can define the as follows of the 1st charactron mapping:
seg1[3:0]=ST[7:4];
seg2[7:4]=ST[3:0]。
Further, described LCD charactron simulator carries out timing by the mode of allocation index to this file and reads, to obtain LCD charactron related data, specifically, LCD emulated data of being correlated with obtains from index inside emulated data cache file, and the form defining this file is as follows:
PC=[value] stack=[value] cycle=[value]
@[address 1]: [data 1]@[address 2]: [data 2]
Wherein, PC representation program pointer, stack represents stack pointer, and cycle represents current performed instruction cycles; Following address closely after "@" character, is then data; Between address and data with ": " separate, LCD simulator obtains address by searching character, when belonging to LCD register address, then data is loaded in LCD register array.
As, when emulator performs PC=5, stack pointer is 2, and the instruction cycle is the value of 6, WORK register is AAH.And the register address of WORK register is 05H.Then can comprise following information in data buffer storage file:
PC=5stack=2cycle=6;
@005:AA。
Realized the function of display in real time by LCD charactron simulation process after obtaining LCD charactron related data.Concrete treatment scheme comprises:
201, LCD idsplay order is received;
202, the value of register is obtained;
203, section and the position of LCD is obtained by configuration file;
If 204 com and seg scan LCD list and obtain corresponding character string;
205, judge whether temp equals LT0, LT1 ... LTn, and judge whether the jth position of RAM equals 1, is, light corresponding charactron, the no scanning continuing other registers.
The present invention, on the basis of this data layout, simulation protocol and modeling algorithm, is optimized design to the modules of traditional emulator, finally achieves LCD simulator in-circuit emulation function.Thus, when the LCD charactron developing MCU drives, do not need the loaded down with trivial details physical interface carried out to connect, just can realize the simulating, verifying effect of equivalence easily.This highly shortened the cycle of product development, improves development efficiency.
Accompanying drawing explanation
Fig. 1 is the charactron simulation process process flow diagram that the present invention implements.
Fig. 2 is the data upload sequential chart that the present invention implements.
Fig. 3 is the data path figure of LCD emulation in the emulator implemented of the present invention.
Fig. 4 is the Simulation drive layer implemented of the present invention and emulator interaction diagrams.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
A kind of LCD charactron online simulation method that the present invention realizes, its principal feature is: the emulated data that LCD charactron simulator produces is obtained alternately by Simulation drive layer and emulator.
As shown in fig. 4 and fig. 2, concrete step is:
101, IDE click and bring into operation after, host process off-duty simulated function can open up separately a thread.
102, first Simulation drive layer sends " initiation command " and wraps PSFSTART, informs that emulator brings into operation program.Now the protocol process module of emulator can receive PSFSTART order, and then open emulator work clock, emulator brings into operation.
103, protocol process module jumps to uploading data state and returns the corresponding command bag, and gets back to idle condition.Then emulator is within the time every 10ms (time can specify in advance, also can adjust according to actual needs), automatically can jump to uploading data state and return LCD emulated data.Now, the execution querying command bag as shown in Figure 4 that circulating of Simulation drive layer.
104, after inquiring FSPLCD order bag, just packet is resolved and content is written in the middle of cache file according to data interchange format.If run into breakpoint, then can return whole emulated data, and write cache file.
The present invention also preserves by specific data interchange format file the emulated data that emulator uploads, described data interchange format is: synchronous code+order+packet length+LCD register+check code, the assignment commands code of this data interchange format is FSPLCD, as shown in table 1.
Table 1
Synchronous code Order Packet length LCD register Check code
1Bytes 1Byte 2Bytes Variable-length 1Byte
The method also preserves configuration information by the file of the mapping format defining a kind of LCD charactron.LCD charactron simulator, by reading this configuration file or configuration control, carries out correlation parameter configuration to LCD charactron modeling algorithm.Described mapping format is:
A, define 5 basic characters and represent 5 kinds of each objects, wherein L: four the red points representing the capable left side of LCD; R: represent LCD capable on the right of four red points; T: represent LCD the first row; D: represent LCD second row; S: represent charactron.
B, then these characters are utilized to combine.
As, four red points on the LT:LCD the first row left side.
Four red points on the LD:LCD second row left side.
Four on the right of RT:LCD the first row red points.
Four on the right of RD:LCD second row red points.
The charactron of ST:LCD the first row.
The charactron of SD:LCD second row.
C, definition map syntax format and are: register value=mapping character.
As, certain MCU pin SEG1 and the section corresponding to SEG2 pin select register to be seg1 [3:0], seg2 [3:0].The section [7:4] of the 1st charactron corresponding to actual LCD data pipe SEG1 pin, the section [3:0] of what SEG2 pin was corresponding is the 1st charactron.Then can define the as follows of the 1st charactron mapping:
seg1[3:0]=ST[7:4];
seg2[7:4]=ST[3:0]。
Simultaneously, carry out timing by the mode of allocation index to this file to LCD charactron simulator to read, to obtain LCD charactron related data, specifically, LCD emulated data of being correlated with obtains from index inside emulated data cache file, and the form defining this file is as follows:
PC=[value] stack=[value] cycle=[value]
@[address 1]: [data 1]@[address 2]: [data 2]
Wherein, PC representation program pointer, stack represents stack pointer, and cycle represents current performed instruction cycles; Following address closely after "@" character, is then data; Between address and data with ": " separate, LCD simulator obtains address by searching character, when belonging to LCD register address, then data is loaded in LCD register array.
As, when emulator performs PC=5, stack pointer is 2, and the instruction cycle is the value of 6, WORK register is AAH.And the register address of WORK register is 05H.Then can comprise following information in data buffer storage file:
PC=5stack=2cycle=6;
@005:AA。
Then the function of display is in real time realized after obtaining LCD charactron related data by LCD charactron simulation process.Concrete treatment scheme as shown in Figure 1, comprising:
201, LCD idsplay order is received;
202, the value of register is obtained;
203, section and the position of LCD is obtained by configuration file;
If 204 com and seg scan LCD list and obtain corresponding character string;
205, judge whether temp equals LT0, LT1 ... LTn, and judge whether the jth position of RAM equals 1, is, light corresponding charactron, the no scanning continuing other registers.
Function, can to dialog box initialization before entering interface display, first enters to empty function and (each section of charactron during enable for the section of charactron putting can not be shown.Read the value of fsprb.dat file acquisition register by register value control LCD pattern, obtained section comn (j) and position segn (i) of LCD simultaneously by configuration file; The list being scanned LCD by comn and segn obtains respective symbols string temp; Whether temp [1] equals T; Whether temp [0] equals L; Whether temp equals LT0; If temp is not equal to LT0, then judge whether temp equals other digital pipeline section, if whether the jth position of RAM [i] is 1; Light this hop count order pipe; Scanned, then proceed other registers and scan.
The acquisition of emulated data needs to be that USB interface communication is uploaded by PC periphery, and adopts FT245RL chip as USB converter.
In the moment point that commissioning test stops, all need to upload emulated data and refresh LCD data pipe.As shown in Figure 2, after receiving all these orders, finally all can jump in identical uploading data state machine.
In the engineering of normal operation, LCD data pipe also needs real-time refreshing.The communication protocol of this part can adopt the master slave mode of PC timed sending reading order to emulator and the dual-mode of emulator self-timing uploading data.In a first mode, because PC software timer exists error, and communication delay itself can not be determined, and therefore cannot carry out moment average cutting accurately.With under the second pattern, emulator at indoor design timer, can send emulated data bag when timer overflows at every turn.According to resolution of eye, now defining timer interval is 10ms.When each timer overflows, all can produce control signal, state machine jumps to uploading data state from idle condition.Idle condition is turned back to again after uploading.
MCU emulator forms primarily of the functional module that MCU kernel is relevant with emulation.As shown in Figure 3, for emulating the relevant data path of LCD.From above-mentioned emulation form, simulation protocol parsing module needs receiving the corresponding command or periodically LCD emulated data uploaded.LCD emulated data is kept in the middle of LCD module.In program operation process, each execution is modified to the instruction of LCD related register, all can produce data bus activity, amendment LCD module internal register.
By bus-sharing, whenever receiving related commissioning order or timer to spilling, simulation protocol parsing module all can read LCD module internal register, and LCD register data is sent to PC.
In a word, the present invention, on the basis of this data layout, simulation protocol and modeling algorithm, is optimized design to the modules of traditional emulator, finally achieves LCD simulator in-circuit emulation function.Thus, when the LCD charactron developing MCU drives, do not need the loaded down with trivial details physical interface carried out to connect, just can realize the simulating, verifying effect of equivalence easily.This highly shortened the cycle of product development, improves development efficiency.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a LCD charactron online simulation method, it is characterized in that the emulated data that LCD charactron simulator produces is obtained alternately by Simulation drive layer and emulator, communication between Simulation drive layer and emulator adopts USB interface, and preserve by specific data interchange format file the emulated data that emulator uploads, described data interchange format is: synchronous code+order+packet length+LCD register+check code, and the assignment commands code of this data interchange format is FSPLCD.
2. LCD charactron online simulation method as claimed in claim 1, is characterized in that Simulation drive layer and emulator carry out exchange method and be:
101, after IDE brings into operation, for Dynamic simulation function opens up separately a thread;
102, first Simulation drive layer sends " initiation command " and wraps PSFSTART, informs that emulator brings into operation program; Now the protocol process module of emulator can receive PSFSTART order, and then open emulator work clock, emulator brings into operation;
103, protocol process module jumps to uploading data state and returns the corresponding command bag, and gets back to idle condition; Then emulator is at regular intervals, automatically can jump to uploading data state and return LCD emulated data; Meanwhile, the execution querying command bag that Simulation drive layer is circulating, inquiry FSPLCD order bag;
104, after inquiring FSPLCD order bag, just packet is resolved and content is written in the middle of cache file according to data interchange format; If run into breakpoint, then can return whole emulated data, and write cache file.
3. LCD charactron online simulation method as claimed in claim 1, it is characterized in that the data message needed for LCD charactron simulator comprises configuration information and emulated data, the method also preserves configuration information by the file of the mapping format defining a kind of LCD charactron, LCD charactron simulator, by reading this configuration file or configuration control, carries out correlation parameter configuration to LCD charactron modeling algorithm.
Described mapping format is:
A, define 5 basic characters and represent 5 kinds of each objects, wherein L: four the red points representing the capable left side of LCD; R: represent LCD capable on the right of four red points; T: represent LCD the first row; D: represent LCD second row; S: represent charactron; B, these characters are utilized to combine.
4. LCD charactron online simulation method as claimed in claim 3, is characterized in that further, and definition maps syntax format and is: register value=mapping character.
5. LCD charactron online simulation method as claimed in claim 1, it is characterized in that described LCD charactron simulator carries out timing by the mode of allocation index to this file and reads, to obtain LCD charactron related data, specifically, LCD emulated data of being correlated with obtains from index inside emulated data cache file, and the form defining this file is as follows:
PC=[value] stack=[value] cycle=[value]
@[address 1]: [data 1]@[address 2]: [data 2]
Wherein, PC representation program pointer, stack represents stack pointer, and cycle represents current performed instruction cycles; Following address closely after "@" character, is then data; Between address and data with ": " separate, LCD simulator obtains address by searching character, when belonging to LCD register address, then data is loaded in LCD register array.
6. LCD charactron online simulation method as claimed in claim 5, realized the function of display in real time after it is characterized in that obtaining LCD charactron related data by LCD charactron simulation process, treatment scheme comprises:
101, LCD idsplay order is received;
102, the value of register is obtained;
103, section and the position of LCD is obtained by configuration file;
If 104 conn and segn scan LCD list and obtain corresponding character string;
105, judge whether temp equals LT0, LT1 ... LTn, and judge whether the jth position of RAM equals 1, is, light corresponding charactron, the no scanning continuing other registers.
CN201510385970.2A 2015-06-30 2015-06-30 A kind of LCD charactrons online simulation method Active CN105005522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510385970.2A CN105005522B (en) 2015-06-30 2015-06-30 A kind of LCD charactrons online simulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510385970.2A CN105005522B (en) 2015-06-30 2015-06-30 A kind of LCD charactrons online simulation method

Publications (2)

Publication Number Publication Date
CN105005522A true CN105005522A (en) 2015-10-28
CN105005522B CN105005522B (en) 2017-08-08

Family

ID=54378201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510385970.2A Active CN105005522B (en) 2015-06-30 2015-06-30 A kind of LCD charactrons online simulation method

Country Status (1)

Country Link
CN (1) CN105005522B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679093A (en) * 2017-09-07 2018-02-09 北京神州绿盟信息安全科技股份有限公司 A kind of data query method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968770A (en) * 2010-11-01 2011-02-09 北京航空航天大学 Reusable embedded software testing and developing method and system
CN103186356A (en) * 2011-12-27 2013-07-03 无锡华润矽科微电子有限公司 Display information editing system based on single chip microcomputer driving LCD (liquid crystal display) mode

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968770A (en) * 2010-11-01 2011-02-09 北京航空航天大学 Reusable embedded software testing and developing method and system
CN103186356A (en) * 2011-12-27 2013-07-03 无锡华润矽科微电子有限公司 Display information editing system based on single chip microcomputer driving LCD (liquid crystal display) mode

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679093A (en) * 2017-09-07 2018-02-09 北京神州绿盟信息安全科技股份有限公司 A kind of data query method and device
CN107679093B (en) * 2017-09-07 2020-04-07 北京神州绿盟信息安全科技股份有限公司 Data query method and device

Also Published As

Publication number Publication date
CN105005522B (en) 2017-08-08

Similar Documents

Publication Publication Date Title
CN101504692B (en) System and method for validating and testing on-chip system
CN102087606B (en) FPGA configuration file update device
CN100565472C (en) A kind of adjustment method that is applicable to multiprocessor karyonide system chip
CN102521444A (en) Cooperative simulation/verification method and device for software and hardware
CN108038294B (en) UVM environment building method and system
CN113076227A (en) MCU verification method, system and terminal equipment
CN102623069B (en) Random excitation flash model verification method
WO2018018978A1 (en) Universal serial bus controller verification method, system and device
US20190034318A1 (en) Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator
US10255400B1 (en) Debugging system and method
CN102480467B (en) A kind of SOC software and hardware cooperating simulation verification method of communications protocol Network Based
CN103677885A (en) ARM FLASH simple program programming method
CN103207771A (en) IP (Intelligent property) core of PLC (programmable logic controller) program performer
US11409636B2 (en) Processor including debug unit and debug system
CN105653409A (en) Data type conversion-based hardware simulator validation data extraction system
CN113849433A (en) Bus controller execution method and device, bus controller, computer equipment and storage medium
CN101162438A (en) Regulating technology of built-in processor
CN103793263B (en) DMA transaction-level modeling method based on Power PC processor
WO2016184170A1 (en) Smi interface device debugging apparatus and method, and storage medium
TW201730774A (en) Serial device emulator using two memory levels with dynamic and configurable response
CN111176926B (en) IP core simulation system and simulation method based on dual-port SRAM
CN105005522A (en) Online simulation method of LCD nixie tube
CN102193860A (en) Microcontroller online debugging circuit and method as well as microcontroller
CN109243650B (en) Nuclear power station safety level instrument control system and method with configuration function based on FPGA
Feng et al. Design and application of reusable SoC verification platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518000, A building, block 9, garden city digital garden, 1079 Nanhai Road, Guangdong, Shenzhen, Nanshan District

Patentee after: Chipsea Technology (Shenzhen) Co., Ltd.

Address before: 518067 Nanshan District, Shenzhen, Nanhai Avenue, garden city, No. 1079, building A, block, floor 9

Patentee before: Xinhai Science and Technology Co., Ltd., Shenzhen City