CN104915206B - A kind of management method of attribute and data on DSP based on text resolution - Google Patents

A kind of management method of attribute and data on DSP based on text resolution Download PDF

Info

Publication number
CN104915206B
CN104915206B CN201510328575.0A CN201510328575A CN104915206B CN 104915206 B CN104915206 B CN 104915206B CN 201510328575 A CN201510328575 A CN 201510328575A CN 104915206 B CN104915206 B CN 104915206B
Authority
CN
China
Prior art keywords
attribute
file
data
dsp
cjson
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
CN201510328575.0A
Other languages
Chinese (zh)
Other versions
CN104915206A (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 attribute and data that needs extend are put into file, these attributes and data are managed with the mode of configuration file by the management method of attribute and data on a kind of DSP based on text resolution disclosed by the invention.When dsp operation, attribute type as needed goes inquiry file, dynamic acquisition types value and data.According to the communication protocol of setting, new attribute and data, the corresponding attribute of more new configuration file and data are received.The management method of attribute and data on DSP based on text resolution of the invention, by introducing file system in C2000 series DSP system, the dynamic expansion and configuration for system operation attribute are realized in a manner of configuration file, it is attributively added especially for the same type for the attribute planned in system, realize a large amount of attributes with data update with it is synchronous, with text resolution technology realize to configuration file efficient storage and parsing.Management method is simple and fast, avoids the lesser limitation of DSP memory of C2000 series.

Description

A kind of management method of attribute and data on DSP based on text resolution
Technical field
Attribute the present invention relates to digital signal processor techniques field, on specifically a kind of DSP based on text resolution With the management method of data.
Background technique
DSP (digital signal processor, digital signal processor) is a kind of at various digital signals Adjustment method and design, the microprocessor with special construction, it is not only programmable, but also its real time execution speed can Up to every number of seconds with ten million complicated order program, considerably beyond general purpose microprocessor, at motion control, sound processing, image The fields such as reason, digital communication, Medical Devices, sonar radar are widely used.
In recent years, it is increasingly enhanced using the embedded system function that DSP is constructed as core, more and more applications need System can rapidly configure different operation attributes according to different environment and requirement or update operation data, to realize system It is operably more stable, more efficient, easy to maintain.This requires systems to run dynamic setting and the dynamic extending of attribute and data, And have power down non-volatile.
Major way synchronous with data for the operation attribute configuration of the system of C2000 series DSP at present are as follows: soft in system When part designs, according to existing demand, specific object and data are defined in a program, is belonged to when system operates normally according to specific Property operation, when necessary, modified by series of instructions to specific object or data, also need handle in some cases Attribute or data are stored in particular memory space (the outer Flash of Flash, piece and SD card in such as piece).Exist in this way and asks as follows Topic: first is that attribute cannot be added easily, inconvenience extension must many times modify code and just be able to achieve.Second is that for needing When the data and more property parameters of update, it cannot handle well.It three, cannot for the data being stored in memory space Manage well, error-prone when operation, increase to data, delete, updating, read it is all very inconvenient.
In present software development, the mode of file is mostly used effectively to manage the progress of attribute and data, used Realize that dynamic expansion is synchronous with data to text resolution technique to high-efficiency.But for built-in field, especially C2000 series DSP, since its memory is smaller (tens KB), memory space is smaller (several hundred KB), is not appropriate for complex operations system and larger File system, there is presently no realize this technology.
Summary of the invention
The problem to be solved in the present invention is to provide the managers of attribute and data on a kind of DSP based on text resolution Method, this method can realize the dynamic expansion and configuration of attribute in the dsp system of C2000 series, and a large amount of attribute datas update With synchronous and data file effectively management and efficient parsing and use.
The management method of attribute and data on a kind of DSP based on text resolution disclosed by the invention, be in order to In the dsp system of C2000 series, the dynamic expansion and configuration of attribute are realized, a large amount of attribute datas update and synchronous and data Effectively management and efficient parsing and the use of file ground, provides the following technical solution: the attribute and data that needs extend is put Enter file, these attributes and data are managed with the mode of configuration file.When dsp operation, attribute type as needed is gone Inquire 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 corresponding attribute of more new configuration file and data.If the attribute and data of addition or modification are relatively more, Configuration file can directly be replaced.
Specific step is as follows:
1) file system is transplanted;Because being the management and storage for realizing attribute and data by way of file, need Want a file system.Because its memory of the DSP of C2000 series is smaller (only tens KB), memory space is smaller (only several hundred KB), this requires the file system of selection will be small as far as possible and stablizes.
2) text resolution library is transplanted;It is efficiently parsed to be realized to file, needs the support in mature text resolution library, Coding and the parsing to attribute and data are realized by text resolution library.Because its memory of the DSP of C2000 series is smaller (only several Ten KB), memory space is smaller (only several hundred KB), this requires the text resolution library of selection small and stablize, reduces to the greatest extent to memory Occupancy.
3) it constructs software frame: writing configuration file, include the attribute for needing dynamic expansion in configuration file;Design is reasonable Software architecture, dynamic read file in attribute and data, guarantee the normal operation of software.
4) when needing to obtain attribute, the data of corresponding attribute or attribute type in file are read;Need Update attribute When with data, according to the communication protocol of setting, receive new attribute and data, the corresponding attribute of more new configuration file and data or Directly replace configuration file.
As a further improvement of the above technical scheme, file system is transplanted in the step 1) is to transplant FatFs To TMS320F28335 platform, comprising the following steps:
11) FatFs code is added in CCS engineering, according to data used in TMS320F28335 platform modifying file The minimum data width of type, the DSP of C2000 series is 16Bits, and char 16Bits, int 16Bits, long int are 32Bits, double 64Bits;
12) complete diskio.c file in disk_initialize (), disk_status (), disk_read (), Bottom layer realization in disk_write (), disk_ioctl () interface function;
13) header file path in FatFs file is added in the Include config option of engineering, is compiled in FatFs file Header file after insertion is formatted as the memory space of Fat32 format, carries out file read-write test.
As an alternative to the above-described technical solution, in the step 2 transplant text resolution library be transplanting XML or Person JSON transplants JSON to TMS320F28335 platform step are as follows:
21) two files of the cJSON.c and cJSON.h of cJSON code are added in CCS engineering, according to TMS320F28335 platform identity modifies data type used in file, and the minimum data width of the DSP of C2000 series is 16Bits, char 16Bits, int 16Bits, long int are 32Bits, double 64Bits;
22) realization for modifying malloc () in cJSON.c, makes it be adapted to 28335 platforms;The big of heap is set as needed It is small;
23) cJSON.h header file path is added in the Include config option of engineering, compiles cJSON.h header file; It is tested using the test.c in the library CJSON.
As an alternative to the above-described technical solution, first writing file storage before carrying out the step 1) Driving.
The management method of attribute and data on DSP based on text resolution of the invention, by C2000 series DSP File system is introduced in system, dynamic expansion and configuration for system operation attribute is realized in a manner of configuration file, especially It is that the same type for the attribute planned in system is attributively added, and is updated with realizing a large amount of attributes and data and together Step, with text resolution technology realize to configuration file efficient storage and parsing.Management method is simple and fast, avoids The lesser limitation of DSP memory of C2000 series, is applicable to the DSP and MCU of most of low and middle-end of built-in field.
Detailed description of the invention
Fig. 1 is the structural block diagram of management method of the invention;
Fig. 2 is the implementation flow chart of management method of the invention;
Fig. 3 is the flow chart of dynamic acquisition attribute and data in management method of the invention.
Specific embodiment
With reference to the accompanying drawing, to the management of attribute and data on a kind of DSP based on text resolution proposed by the present invention Method.
As shown in Figure 1, the DSP1 of C2000 series, as platform, hardware drive program 2 has read-write external memory space 6 Ability.Application program 5 is run, the file 7 of memory space 6 is read by the ability of file system 3, passes through text resolution library 4 Content of text is parsed, attribute and data are obtained.Platform receives the communication instruction of Update attribute and data, passes through after receiving data Text resolution mode group organization data is write into file, and mass data more news is encountered, and can also pass through direct alternate file Mode updates.
As shown in Figures 2 and 3, the manager of the attribute on a kind of DSP based on text resolution disclosed by the invention and data Method, is dynamic expansion and configuration in order in the dsp system of C2000 series, realize attribute, and a large amount of attribute datas update and same Effectively management and efficient parsing and the use of step and data file ground, provides the following technical solution: the category that needs are extended Property and data are put into file, these attributes and data are managed with the mode of configuration file.When dsp operation, as needed Attribute type goes inquiry file, dynamic acquisition types value and data.When attribute and data need to change, according to the communication of setting Agreement receives new attribute and data, the corresponding attribute of more new configuration file and data.If the attribute sum number of addition or modification It is more according to comparing, it can directly replace configuration file.
Specific step is as follows:
First write the driving 21 of file storage.Because Flash is smaller in DSP piece, external memory space ( Can be described as " storage chip ") 6, such as Nand Flash, SD card.Consider the difficulty of implant system and the convenience of file storage, this In preferred SD card, but be not limited to that SD card.DSP adds peripheral hardware SD card thus, is connected between DSP and SD card by SPI interface It connects.The hardware drive program 2 of the SD card based on SPI is write, completes the reading and writing functional interface of SPI first, then realizes SD card Initialization, the reading based on block (Block), write-in, erasing function.
Then next management method step is carried out:
1) suitable file system 22 is transplanted.The file system of transplanting can be SDCard, the file system such as Yaffs. Fatfs is suitable for SDcard, Nand Flash. and Yaffs is suitable for Nand Flash.Due to its memory of the DSP of C2000 series It is smaller (TMS320F28335 only has 16 Flash of 256K x, 16 SARAM of 34K x) with memory space, so being not appropriate for Larger file system selects FatFs file system 3 here, and FatFs is a general file system module, writes and follows ANSI C, independent of hardware platform, for realizing FAT file system in small embedded systems.FatFs is transplanted to TMS320F28335 platform, specific steps include:
11) the FatFs code for downloading latest edition, FatFs code is added in CCS engineering, according to TMS320F28335 The minimum data width of data type used in platform modifying file, the DSP of C2000 series is 16Bits, and char is 16Bits, int 16Bits, long int are 32Bits, double 64Bits;
12) complete diskio.c file in disk_initialize (), disk_status (), disk_read (), Bottom layer realization in disk_write (), disk_ioctl () interface function;
13) header file path in FatFs file is added in the Include config option of engineering, is compiled in FatFs file Header file after insertion is formatted as the external memory space of Fat32 format, carries out file read-write test.
2) text resolution library 23 is transplanted, XML or JSON etc. can be used in text resolution library.Used here as JSON.JSON Using being totally independent of the text formatting of language, but also use the habit similar to C language family.These characteristics make JSON As ideal data interchange language.It is easy to people to read and write, while is also easy to machine parsing and generating.Selection open source JSON Library cJSON is parsed, cJSON is a kind of data interchange format of lightweight.CJSON is a ultralight skilful, easy to carry, Dan Wen Part, the JSON resolver that simply can be used as ANSI-C standard.JSON is transplanted to TMS320F28335 platform step are as follows:
21) the cJSON code for downloading latest edition only includes two files of cJSON.c and cJSON.h, the two texts Part be added CCS engineering in, according to TMS320F28335 platform identity modify file used in data type, C2000 series The minimum data width of DSP is 16Bits, and char 16Bits, int 16Bits, long int are 32Bits, and double is 64Bits;
22) realization for modifying malloc () in cJSON.c, makes it be adapted to 28335 platforms;It is suitable to be set as needed The size of heap;
23) cJSON.h header file path is added in the Include config option of engineering, compiles cJSON.h header file; It is tested using the test.c in the library CJSON.So far, FatFs file system is successful to C2000 series DSP platform transplantation.
3) it needs to construct software frame 24 according to exploitation: writing configuration file, include needing dynamic expansion in configuration file Attribute.
4) as shown in figure 3, when needing to obtain attribute 31, the data of corresponding attribute or attribute type in text are read 32,33, guarantee the normal operation of software.When needing Update attribute and data, according to the communication protocol of setting, new attribute is received And data, the corresponding attribute of more new configuration file and data.If the attribute and data of addition or modification are relatively more, may be selected Directly replace the mode of configuration file.
The above embodiments are merely illustrative of the technical solutions of the present invention, is not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution, improvement and etc. done should all cover of the invention In scope of the claims.

Claims (2)

1. the management method of attribute and data on a kind of DSP based on text resolution, which comprises the following steps:
1) file system is transplanted;
2) text resolution library is transplanted;
3) it constructs software frame: writing configuration file, include the attribute for needing dynamic expansion in configuration file;
4) when needing to obtain attribute, the data of corresponding attribute or attribute type in file are read;Need Update attribute sum number According to when, according to the communication protocol of setting, receive new attribute and data, the corresponding attribute of more new configuration file and data or directly Replace configuration file;
It is that FatFs is transplanted to TMS320F28335 platform that file system is transplanted in the step 1), comprising the following steps:
11) FatFs code is added in CCS engineering, according to data type used in TMS320F28335 platform modifying file, The minimum data width of the DSP of C2000 series is 16Bits, and char 16Bits, int 16Bits, long int are 32Bits, double 64Bits;
12) disk_initialize (), disk_status (), disk_read (), disk_ in the file of diskio.c are completed Bottom layer realization in write (), disk_ioctl () interface function;
13) header file path in FatFs file is added in the Include config option of engineering, compiles head text in FatFs file Part after insertion is formatted as the memory space of Fat32 format, carries out file read-write test;
It is transplanting XML or JSON that text resolution library is transplanted in the step 2, transplants JSON to TMS320F28335 platform Step are as follows:
21) two files of the cJSON.c and cJSON.h of cJSON code are added in CCS engineering, it is flat according to TMS320F28335 Platform characteristic modifies data type used in file, and the minimum data width of the DSP of C2000 series is 16Bits, and char is 16Bits, int 16Bits, long int are 32Bits, double 64Bits;
22) realization for modifying malloc () in cJSON.c, makes it be adapted to TMS320F28335 platform;Heap is set as needed Size;
23) cJSON.h header file path is added in the Include config option of engineering, compiles cJSON.h header file;It uses Test.c in the library CJSON is tested.
2. the management method of attribute and data on the DSP according to claim 1 based on text resolution, feature exist In first writing the driving of file storage before carrying out the step 1).
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 CN104915206A (en) 2015-09-16
CN104915206B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427848B (en) * 2020-04-14 2023-09-05 上海航天计算机技术研究所 Method for realizing high-speed spaceborne file system based on JSON
CN115242563B (en) * 2021-06-25 2023-11-14 统信软件技术有限公司 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

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
基于文件解析的飞行器模拟系统软件设计;何桂俊;《中国优秀硕士学位论文全文数据库 信息科技辑》;中国学术期刊(光盘版)电子杂志社;20130615(第06期);正文第6,29-40,48,53-57页

Also Published As

Publication number Publication date
CN104915206A (en) 2015-09-16

Similar Documents

Publication Publication Date Title
US10936292B2 (en) Offline capabilities for live applications in a cloud collaboration platform
JP2005182809A (en) Creating file system within file in storage technology-abstracted manner
CN109375901A (en) Interface message management method, device, computer equipment and storage medium
CN104915206B (en) A kind of management method of attribute and data on DSP based on text resolution
CN107992291A (en) Ruff OS Internet of Things operating systems applied to built-in application program
EP3304286A1 (en) Data binding dependency analysis
US20060265639A1 (en) Memory optimizing fo re-ordering user edits
CN104160397A (en) Location independent files
US20080127056A1 (en) Generation of managed assemblies for networks
US20100082954A1 (en) Configuration rule prototyping tool
US20070143745A1 (en) System and method for obtaining a markup language template through reversing engineering
CN109491708A (en) Document structure tree method, system, equipment and medium
CN114036425A (en) Page access method, client, server and system
US20220021578A1 (en) Method for configuring modeling parameters, electronic device and computer storage medium thereof
CN103257987A (en) Rule-based distributed log service implementation method
CN111111201B (en) Skill creation method, device, server and medium based on game
CN104166705A (en) Access method and device of database
US20080196009A1 (en) Apparatus and method for componentizing legacy system
CN104133706B (en) Firmware modification method and firmware modification device
CN108958813A (en) file system construction method, device and storage medium
US20170131980A1 (en) Model driven architecture for network management and configuration
CN108416035B (en) Disconf-based unified management method for database mapping files
EP3306823B1 (en) Encoding program, encoding apparatus and encoding method
CN109101229A (en) A kind of code automatic generation method of object-oriented, device and equipment
US10331781B2 (en) Template compilation using view transforms

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