CN104915206A - Method for managing attributes and data on DSP based on text analysis - Google Patents

Method for managing attributes and data on DSP based on text analysis Download PDF

Info

Publication number
CN104915206A
CN104915206A CN201510328575.0A CN201510328575A CN104915206A CN 104915206 A CN104915206 A CN 104915206A CN 201510328575 A CN201510328575 A CN 201510328575A CN 104915206 A CN104915206 A CN 104915206A
Authority
CN
China
Prior art keywords
data
file
attribute
dsp
attributes
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
CN201510328575.0A
Other languages
Chinese (zh)
Other versions
CN104915206B (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.)
Nanjing Science And Technology Ltd Of A Fanda Robot
Original Assignee
Nanjing Science And Technology Ltd Of A Fanda Robot
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 Nanjing Science And Technology Ltd Of A Fanda Robot filed Critical Nanjing Science And Technology Ltd Of A Fanda Robot
Priority to CN201510328575.0A priority Critical patent/CN104915206B/en
Publication of CN104915206A publication Critical patent/CN104915206A/en
Application granted granted Critical
Publication of CN104915206B publication Critical patent/CN104915206B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for managing attributes and data on a DSP based on text analysis. The attributes and the data that need extending are placed in files; and the attributes and the data are managed in a mode of configuration files. When the DSP runs, the files are queried according to the needed attribute type, and type values and data are obtained dynamically. According to the set communication protocol, new attributes and data are received, and attributes and data corresponding to the configuration files are updated. According to the method for managing the attributes and the data on the DSP based on text analysis, a file system is introduced in a C2000 series DSP system, the dynamic extension and configuration of system operation attributes are achieved in the mode of the configuration files; particularly through the adding of attributes with the same type as attributes already planned in the system, the updating and synchronization of plenty of attributes and data are achieved, and the configuration files are efficiently stored and analyzed through an applied text analysis technology. The managing method is simple and rapid, and the limitation of a small C2000 series DSP memory is avoided.

Description

A kind of management method based on the attribute on the DSP of text resolution and data
Technical field
The present invention relates to digital signal processor techniques field, specifically a kind of management method based on the attribute on the DSP of text resolution and data.
Background technology
DSP (digital signal processor, digital signal processor) a kind of microprocessor designing, have special construction for various digital signal processing algorithm, it is not only programmable, and its real time execution speed can reach every number of seconds with ten million bar complicated order program, considerably beyond general purpose microprocessor, be widely used in fields such as motion control, sound processing, image procossing, digital communication, Medical Devices, sonar radars.
In recent years, be that the embedded system function that core builds strengthens day by day with DSP, increasing application scenario needs system and can require configure different operation attributes rapidly or upgrade service data according to different environment, and to realize, system cloud gray model ground is more stable, more efficient, easy care.This just requires dynamically arranging and dynamic extending of system cloud gray model attribute and data, and it is non-volatile to have power down.
The current operation attribute configuration for the system of C2000 series DSP and data syn-chronization major way are: when Design of System Software, according to existing demand, define specific object and data in a program, run according to specific object when system is normally run, when being necessary, by a series of instruction, specific object or data are modified, also need attribute or data to be kept at (as Flash, outer Flash and the SD card of sheet in sheet) in particular memory space in some cases.There are the following problems like this: one is can not add attribute easily, and inconvenience expansion, many times must revise code could realize.Two be for need upgrade data and property parameters many time, can not process well.Three, can not manage well for the data be kept in storage space, be easy to during operation make mistakes, data ground increase, delete, upgrade, read all very inconvenient.
In present software development, the mode of file that adopts effectively manages for the carrying out of attribute and data more, realizes dynamic expansion and data syn-chronization with using text resolution technique to high-efficiency.But, for built-in field, the especially DSP of C2000 series, due to its internal memory less (tens KB), storage space less (hundreds of KB), and be not suitable for complex operations system and comparatively large files system, also do not realize this technology at present.
Summary of the invention
The problem to be solved in the present invention is to provide a kind of management method based on the attribute on the DSP of text resolution and data, the method can in the dsp system of C2000 series, realize dynamic expansion and the configuration of attribute, a large amount of attribute data renewal is with synchronous, and data file ground effectively manages and efficiently resolves and use.
A kind of management method based on the attribute on the DSP of text resolution and data disclosed by the invention, in order in the dsp system of C2000 series, realize dynamic expansion and the configuration of attribute, a large amount of attribute data upgrades with synchronous, and data file ground effectively manages and efficiently resolves and use, there is provided following technical scheme: the attribute and data that need expansion are put into file, manages these attributes and data by the mode of configuration file.When dsp operation, attribute type as required removes inquiry file, Dynamic Acquisition types value and data.When attribute and data need to change, according to the communication protocol of setting, receive new attribute and data, the attribute that Reconfigurations file is corresponding and data.If the attribute added or revise and data are often, directly configuration file can be replaced.
Concrete steps are as follows:
1) file system is transplanted; Because be the management and the storage that are realized attribute and data by the mode of file, so need a file system.Because its internal memory of the DSP of C2000 series less (only having tens KB), storage space less (only having hundreds of KB), this requires that the file system selected will be tried one's best little and stable.
2) text resolution storehouse is transplanted; In order to realize resolving efficiently to file, need the support in ripe text resolution storehouse, realize coding to attribute and data and parsing by text resolution storehouse.Because its internal memory of the DSP of C2000 series less (only having tens KB), storage space less (only having hundreds of KB), this requires that the text resolution storehouse selected is little and stable, reduces taking internal memory as far as possible.
3) software frame is built: write configuration file, configuration file comprises the attribute needing dynamic expansion; Software architecture reasonable in design, attribute and data in dynamic file reading, ensure the normal operation of software.
4) when needing to obtain attribute, attribute corresponding in file reading or the data of attribute type; When needing Update attribute and data, according to the communication protocol of setting, receive new attribute and data, the attribute that Reconfigurations file is corresponding and data or directly replace configuration file.
As the further improvement of technique scheme, in described step 1), transplant file system is that FatFs is transplanted to TMS320F28335 platform, comprises the following steps:
11) FatFs code is added in CCS engineering, according to the data type used in TMS320F28335 platform modifying file, the minimum data width of the DSP of C2000 series is 16Bits, char is 16Bits, int is 16Bits, long int be 32Bits, double is 64Bits;
12) bottom layer realization in disk_initialize () in the file of diskio.c, disk_status (), disk_read (), disk_write (), disk_ioctl () interface function is completed;
13) header file path in FatFs file is added in the Include config option of engineering, header file in compiling FatFs file, inserts after being formatted as the storage space of Fat32 form, carries out file read-write test.
Another kind as technique scheme improves, in described step 2) in transplant text resolution storehouse be transplant XML or JSON, transplanting JSON to TMS320F28335 platform step is:
21) cJSON.c and cJSON.h of cJSON code two files are added in CCS engineering, according to the data type used in TMS320F28335 platform identity amendment file, the minimum data width of the DSP of C2000 series is 16Bits, char is 16Bits, int is 16Bits, long int is 32Bits, double is 64Bits;
22) revise the realization of malloc () in cJSON.c, make its adaptive 28335 platforms; The size of heap is set as required;
23) cJSON.h header file path is added in the Include config option of engineering, compiling cJSON.h header file; The test.c in CJSON storehouse is used to test.
Another kind as technique scheme improves, and before carrying out described step 1), first writes the driving of file storage.
Management method based on the attribute on the DSP of text resolution and data of the present invention, by introducing file system in C2000 series DSP system, dynamic expansion for system cloud gray model attribute and configuration is achieved in the mode of configuration file, especially the identical type for the attribute planned in system is attributively added, upgrade with synchronously with achieving a large amount of attribute and data, the text resolution technology of utilization achieves configuration file ground efficient storage and parsing.Management method simple and fast, avoids the restriction that the DSP internal memory of C2000 series is less, is applicable to DSP and MCU of most of low and middle-end of built-in field.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of management method of the present invention;
Fig. 2 is the implementing procedure figure of management method of the present invention;
Fig. 3 is the process flow diagram of Dynamic Acquisition attribute and data in management method of the present invention.
Embodiment
Below in conjunction with accompanying drawing, to a kind of management method based on the attribute on the DSP of text resolution and data that the present invention proposes.
As shown in Figure 1, the DSP1 of C2000 series is as platform, and hardware drive program 2 has the ability of read-write external memory space 6.Run application 5, read the file 7 of storage space 6 by the ability of file system 3, resolve content of text by text resolution storehouse 4, obtain attribute and data.Platform receives the communication instruction of Update attribute and data, writes in file after receiving data by text resolution mode organising data, and run into mass data more news, the mode also by direct alternate file upgrades.
As shown in Figures 2 and 3, a kind of management method based on the attribute on the DSP of text resolution and data disclosed by the invention, in order in the dsp system of C2000 series, realize dynamic expansion and the configuration of attribute, a large amount of attribute data upgrades with synchronous, and data file ground effectively manages and efficiently resolves and use, and provides following technical scheme: the attribute needing to expand and data are put into file, manages these attributes and data by the mode of configuration file.When dsp operation, attribute type as required removes inquiry file, Dynamic Acquisition types value and data.When attribute and data need to change, according to the communication protocol of setting, receive new attribute and data, the attribute that Reconfigurations file is corresponding and data.If the attribute added or revise and data are often, directly configuration file can be replaced.
Concrete steps are as follows:
First write the driving 21 of file storage.Because Flash is less in DSP sheet, so want external storage space (also can be described as " storage chip ") 6, as Nand Flash, SD card etc.Consider the difficulty of implant system and the convenience of file storage, here preferred SD card, but be not limited to SD card.DSP adds peripheral hardware SD card for this reason, is connected between DSP and SD card by SPI interface.Write the hardware drive program 2 of the SD card based on SPI, first complete the reading and writing functional interface of SPI, then realize the initialization of SD card, the reading based on block (Block), write, erase feature.
Then ensuing management method step is carried out:
1) suitable file system 22 is transplanted.The file system of transplanting can be the file system such as SDCard, Yaffs.Fatfs is applicable to SDcard, Nand Flash. and Yaffs is applicable to Nand Flash.Due to its internal memory of DSP of C2000 series and storage space, less (TMS320F28335 only has 256K x 16 Flash, 34K x 16 SARAM), so and be not suitable for comparatively large files system, here FatFs file system 3 is selected, FatFs is a general file system module, write and follow ANSI C, do not rely on hardware platform, for realizing FAT file system in small embedded systems.FatFs is transplanted to TMS320F28335 platform, and concrete steps comprise:
11) the FatFs code of latest edition is downloaded, FatFs code is added in CCS engineering, according to the data type used in TMS320F28335 platform modifying file, the minimum data width of the DSP of C2000 series is 16Bits, char is 16Bits, int is 16Bits, long int be 32Bits, double is 64Bits;
12) bottom layer realization in disk_initialize () in the file of diskio.c, disk_status (), disk_read (), disk_write (), disk_ioctl () interface function is completed;
13) header file path in FatFs file is added in the Include config option of engineering, header file in compiling FatFs file, inserts after being formatted as the external memory space of Fat32 form, carries out file read-write test.
2) transplant text resolution storehouse 23, text resolution storehouse can use XML or JSON etc.Here JSON is used.JSON adopts the text formatting being totally independent of language, but also using the custom being similar to C language family.The data interchange language that these characteristics make JSON become desirable.Be easy to people read and write, be also easy to machine simultaneously and resolve and generate.Selection is increased income, and to resolve storehouse cJSON, cJSON be a kind of data interchange format of lightweight to JSON.CJSON be ultralight skilful, easy to carry a, monofile, simply can as the JSON resolver of ANSI-C standard.JSON is transplanted to TMS320F28335 platform step:
21) the cJSON code of latest edition is downloaded, only comprise cJSON.c and cJSON.h two files, these two files are added in CCS engineering, according to the data type used in TMS320F28335 platform identity amendment file, the minimum data width of the DSP of C2000 series is 16Bits, char be 16Bits, int is 16Bits, long int is 32Bits, double is 64Bits;
22) revise the realization of malloc () in cJSON.c, make its adaptive 28335 platforms; The size of suitable heap is set as required;
23) cJSON.h header file path is added in the Include config option of engineering, compiling cJSON.h header file; The test.c in CJSON storehouse is used to test.So far, FatFs file system is to the success of C2000 series DSP platform transplantation.
3) need to build software frame 24 according to exploitation: write configuration file, configuration file comprises the attribute needing dynamic expansion.
4), as shown in Figure 3, when needing to obtain attribute 31, read attribute corresponding in text or the data 32,33 of attribute type, ensure the normal operation of software.When needing Update attribute and data, according to the communication protocol of setting, receive new attribute and data, the attribute that Reconfigurations file is corresponding and data.If the attribute added or revise and data are often, then can select the mode of directly replacing configuration file.
Above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., it all should be encompassed in the middle of right of the present invention.

Claims (4)

1., based on a management method for the attribute on the DSP of text resolution and data, it is characterized in that, comprise the following steps:
1) file system is transplanted;
2) text resolution storehouse is transplanted;
3) software frame is built: write configuration file, configuration file comprises the attribute needing dynamic expansion;
4) when needing to obtain attribute, attribute corresponding in file reading or the data of attribute type; When needing Update attribute and data, according to the communication protocol of setting, receive new attribute and data, the attribute that Reconfigurations file is corresponding and data or directly replace configuration file.
2. the management method based on the attribute on the DSP of text resolution and data according to claim 1, it is characterized in that, in described step 1), transplant file system is that FatFs is transplanted to TMS320F28335 platform, comprises the following steps:
11) FatFs code is added in CCS engineering, according to the data type used in TMS320F28335 platform modifying file, the minimum data width of the DSP of C2000 series is 16Bits, char is 16Bits, int is 16Bits, long int be 32Bits, double is 64Bits;
12) bottom layer realization in disk_initialize () in the file of diskio.c, disk_status (), disk_read (), disk_write (), disk_ioctl () interface function is completed;
13) header file path in FatFs file is added in the Include config option of engineering, header file in compiling FatFs file, inserts after being formatted as the storage space of Fat32 form, carries out file read-write test.
3. the management method based on the attribute on the DSP of text resolution and data according to claim 1, is characterized in that, in described step 2) in transplant text resolution storehouse be transplant XML or JSON, transplanting JSON to TMS320F28335 platform step is:
21) cJSON.c and cJSON.h of cJSON code two files are added in CCS engineering, according to the data type used in TMS320F28335 platform identity amendment file, the minimum data width of the DSP of C2000 series is 16Bits, char is 16Bits, int is 16Bits, long int is 32Bits, double is 64Bits;
22) revise the realization of malloc () in cJSON.c, make its adaptive 28335 platforms; The size of heap is set as required;
23) cJSON.h header file path is added in the Include config option of engineering, compiling cJSON.h header file; The test.c in CJSON storehouse is used to test.
4. the management method based on the attribute on the DSP of text resolution and data according to claim 1, is characterized in that, before carrying out described step 1), first write the driving of file storage.
CN201510328575.0A 2015-06-15 2015-06-15 A kind of management method of attribute and data on DSP based on text resolution Active CN104915206B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510328575.0A CN104915206B (en) 2015-06-15 2015-06-15 A kind of management method of attribute and data on DSP based on text resolution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510328575.0A CN104915206B (en) 2015-06-15 2015-06-15 A kind of management method of attribute and data on DSP based on text resolution

Publications (2)

Publication Number Publication Date
CN104915206A true CN104915206A (en) 2015-09-16
CN104915206B CN104915206B (en) 2019-03-19

Family

ID=54084290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510328575.0A Active CN104915206B (en) 2015-06-15 2015-06-15 A kind of management method of attribute and data on DSP based on text resolution

Country Status (1)

Country Link
CN (1) CN104915206B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427848A (en) * 2020-04-14 2020-07-17 上海航天计算机技术研究所 Method for realizing high-speed satellite-borne file system based on JSON
CN114281429A (en) * 2021-12-31 2022-04-05 上海匠岩智能科技有限公司 JSON data analysis method based on array variables
WO2022267304A1 (en) * 2021-06-25 2022-12-29 统信软件技术有限公司 Network communication method, computing device, and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202362777U (en) * 2011-11-11 2012-08-01 华南理工大学 SD (secure digital) card file management controller based on FPGA (field programmable gate array)
CN103258044A (en) * 2013-05-24 2013-08-21 北京航天自动控制研究所 Two-tuple NANDFLASH data file management method oriented to DSP

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202362777U (en) * 2011-11-11 2012-08-01 华南理工大学 SD (secure digital) card file management controller based on FPGA (field programmable gate array)
CN103258044A (en) * 2013-05-24 2013-08-21 北京航天自动控制研究所 Two-tuple NANDFLASH data file management method oriented to DSP

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何桂俊: "基于文件解析的飞行器模拟系统软件设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427848A (en) * 2020-04-14 2020-07-17 上海航天计算机技术研究所 Method for realizing high-speed satellite-borne file system based on JSON
CN111427848B (en) * 2020-04-14 2023-09-05 上海航天计算机技术研究所 Method for realizing high-speed spaceborne file system based on JSON
WO2022267304A1 (en) * 2021-06-25 2022-12-29 统信软件技术有限公司 Network communication method, computing device, and readable storage medium
CN114281429A (en) * 2021-12-31 2022-04-05 上海匠岩智能科技有限公司 JSON data analysis method based on array variables

Also Published As

Publication number Publication date
CN104915206B (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109597814B (en) Online rapid delivery system of background management information system
US10462261B2 (en) System and method for configuring a data access system
JP2005182809A (en) Creating file system within file in storage technology-abstracted manner
CN109376866B (en) Method and device for recording metadata and method and device for running quantum program
CN104160397A (en) Location independent files
CN103677869A (en) Wireless sensor network node remote code updating system and method
CN104731569A (en) Data processing method and relevant equipment
CN104657164B (en) Software upgrading treating method and apparatus
CN104915206A (en) Method for managing attributes and data on DSP based on text analysis
CN104881311A (en) Method and apparatus for judging version compatibility
CN104166705A (en) Access method and device of database
EP2600256A1 (en) Synchronized linking method and system between engineering analysis programs by using a shared memory of a database
US20080196009A1 (en) Apparatus and method for componentizing legacy system
CN108958813A (en) file system construction method, device and storage medium
CN115080515A (en) Block chain based system file sharing method and system
US10656926B2 (en) Compact type layouts
CN102789370A (en) Method and device for synchronizing redundant array of independent disks (RAID)
CN104636327A (en) Distributed type stream data system based on incremental computation
CN110489167B (en) Double-kernel code stream downloading method and device, computer equipment and storage medium
CN109426511A (en) Soft core update method and system
CN207586900U (en) Remote update system based on ZYNQ
CN108958838A (en) A kind of method and device of improved replacement attribute information
JP2018195046A (en) Program updating device, program updating method, program updating program and program updating system
CN110543434B (en) NAND flash device, memory table management method, device and storage medium
CN114189745A (en) Set top box software switching management method and system and computer device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: No. 3 Gu Tan Road in Gaochun Economic Development Zone of Nanjing city in Jiangsu province 211316

Applicant after: Nanjing Science and Technology Ltd. of A Fanda robot

Address before: 210012, 1-A2 building, Nanhai biological garden, No. 180, software Avenue, Yuhuatai District, Jiangsu, Nanjing

Applicant before: Nanjing Science and Technology Ltd. of A Fanda robot

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant