首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 0 毫秒
1.
随着安全关键系统对计算性能要求的日趋提高,能够提供更强计算能力而又减少电子设备的体积、重量和功耗的多核处理器将在安全关键领域得到广泛应用.同步语言能够表达确定性并发行为且具有精确时间语义等特性,适用于安全关键软件的建模和验证.目前,同步语言SIGNAL编译器主要支持串行代码生成,较少关注多线程代码生成.提出一种同步语言SIGNAL多线程代码生成工具.首先将SIGNAL程序转换为经过时钟演算的S-CGA中间程序;之后将S-CGA中间程序转换为时钟数据依赖图以分析依赖关系;然后对时钟数据依赖图进行拓扑排序划分,并针对划分结果提出优化算法和基于流水线方式的任务划分方法;最后将划分结果转换为虚拟多线程结构并进一步生成可执行多线程C/Java代码.通过在多核处理器上的实验,验证了所提方法的有效性.  相似文献   

2.
随着对安全攸关实时系统功能与非功能要求的日益增加,使用多核技术将成为发展趋势.如何在多核平台条件下保证系统运行的可信任性及可靠性是学术上和应用上的关键问题.目前基于形式化方法的系统设计、验证以及自动代码生成已经在单核平台上形成很多研究成果,但在多核平台上的研究仍面临许多科学问题.同步语言SIGNAL是一种被广泛应用于安全攸关实时系统功能设计的形式化方法,适用于对系统确定性并发行为的描述.SIGNAL编译器也支持将同步规范SynchronousSpecification)生成仿真代码,以对其进行验证与分析.然而现有研究较少关注从SIGNAL同步规范到支持跨平台并行代码的生成方法.本文研究面向SIGNAL同步规范的并行自动代码生成方法.提出了方程依赖图EDG的概念,将SIGNAL规范转换为EDG以分析其全局数据依赖关系;研究了对EDG进行任务划分获取规范中可以并行执行部分的算法;最后,以跨平台并行编程API-OpenMP作为对象,结合程序中信号的时钟关系,将并行任务映射到OpenMP并行代码,并进行了实例验证.  相似文献   

3.
Mediator是一种基于组件的建模语言,该语言主要通过自动机和系统对模型进行描述。将Mediator语言描述的模型自动生成为可执行代码,可以避免编码过程中由于人为疏忽而造成的错误,从而提高编码的可靠性,同时缩短模型开发周期。介绍一种从Mediator模型到SystemC代码的自动生成工具,该工具旨在将基于特定平台的模型转换为能直接仿真运行的代码。首先对Mediator语言的语法语义进行分析,选择合适的SystemC代码组织形式,然后针对Mediator模型的每一个组成部分 设计生成规则,其中重点对类型生成、状态转移语句生成、同步语句的生成进行分析。最后,通过一个机器掉电检测系统说明该工具运行结果的正确性。  相似文献   

4.
ContextCode generators can automatically perform some tedious and error-prone implementation tasks, increasing productivity and quality in the software development process. Most code generators are based on templates, which are fundamentally composed of text expansion statements. To build templates, the code of an existing, tested and validated implementation may serve as reference, in a process known as templatization. With the dynamics of software evolution/maintenance and the need for performing changes in the code generation templates, there is a loss of synchronism between the templates and this reference code. Additional effort is required to keep them synchronized.ObjectiveThis paper proposes automation as a way to reduce the extra effort needed to keep templates and reference code synchronized.MethodA mechanism was developed to semi-automatically detect and propagate changes from reference code to templates, keeping them synchronized with less effort. The mechanism was also submitted to an empirical evaluation to analyze its effects in terms of effort reduction during maintenance/evolution templatization.ResultsIt was observed that the developed mechanism can lead to a 50% reduction in the effort needed to perform maintenance/evolution templatization, when compared to a manual approach. It was also observed that this effect depends on the nature of the evolution/maintenance task, since for one of the tasks there was no observable advantage in using the mechanism. However, further studies are needed to better characterize these tasks.ConclusionAlthough there is still room for improvement, the results indicate that automation can be used to reduce effort and cost in the maintenance and evolution of a template-based code generation infrastructure.  相似文献   

5.
针对大多数并行Delaunay网格生成算法无法充分利用多核共享内存结构的问题,在原有面向共享内存的二维并行算法基础上,根据三维问题的特点提出基于OpenMP的三维并行Delaunay网格生成算法。算法采用划分求解区域为方格的方法实现候选点集的划分和并行插点。使用OpenMP对算法进行实现,并利用多种实现技术避免线程间的同步等待,提升算法效率。实验结果表明,本文算法及所采用的实现技术可以在三维条件下快速生成大量网格单元,具有较高的并行效率,同时能够保证良好的网格质量。  相似文献   

6.
代码注释作为软件中的重要组成部分,在软件维护、复用等领域中发挥着重要作用。代码注释自动生成技术旨在减轻人工编写注释的工作量,从而提高软件开发效率。现有的注释自动生成方法分为基于规则、文本摘要、数据驱动、主题模型、深度学习等层次。综述了代码注释自动生成的相关概念,对比总结各类代码注释自动生成方法,对近年来代码注释自动生成相关应用进行了梳理和总结,最后对注释自动生成所面临的挑战进行了分析,展望了该领域未来的研究。  相似文献   

7.
无人驾驶汽车的高层决策系统是其实现自主驾驶功能的核心,在决策系统的开发过程中,由于信号变量与状态数量庞大等原因,系统面临着可维护性与可拓展性差的难题。UNMANNED_RULE_EDIT是面向无人车高层决策系统的规则编辑与代码自动生成辅助工具,具有图形化编辑和代码自动生成的功能,有利于开发人员清晰直观地设计规则,并摆脱繁琐的编码工作。主要讨论了UNMANNED_RULE_EDIT的中间语言(规则语言)设计和代码自动生成算法。目前,该工具已初步应用在国内某单位研制的无人车上,为其决策系统的开发提供便利。  相似文献   

8.
1cc is a retargetable, production compiler for ANSI C; it has been ported to the VAX, Motorola 68020, SPARC, and MIPS R3000, and some versions have been in use for over a year and a half. It is smaller and faster than generally available alternatives, and its local code is comparable. This paper describes the interface between the target-independent front end and the target-dependent back ends. The interface consists of shared data structures, a few functions, and a dag language. While this approach couples the front and back ends tightly, it results in efficient, compact compilers. The interface is illustrated by detailing a code generator that emits naive VAX code.  相似文献   

9.
Embedded real-time systems employ a variety of operating system platforms. Consequently, for automatic code generation, considerable redevelopment is needed when the platform changes. This results in major challenges with respect to the automatic code generation process of the architecture analysis and design language (AADL). In this paper, we propose a method of template-based automatic code generation to address this issue. Templates are used as carriers of automatic code generation rules from AADL to the object platform. These templates can be easily modified for different platforms. Automatic code generation for different platforms can be accomplished by formulating the corresponding generation rules and transformation templates. We design a set of code generation templates from AADL to the object platform and develop an automatic code generation tool. Finally, we take a typical data processing unit (DPU) system as a case study to test the tool. It is demonstrated that the autogenerated codes can be compiled and executed successfully on the object platform.  相似文献   

10.
AADL构件到RTLinux平台C代码的转换方法研究*   总被引:1,自引:1,他引:0  
朱江  张茂林 《计算机应用研究》2011,28(12):4613-4615
为了提高嵌入式软件开发的自动化程度,代码自动生成是一种值得采用的有效方法.在研究体系结构分析与设计语言(AADL)和RTLinux(real-time Linux)平台C代码的特性的基础上,提出了AADL构件到RTLinux平台C代码的转换规则;然后用一个实例实现了代码自动生成,从而验证了转换规则的有效性.  相似文献   

11.
12.
图形处理器(GPU)作为一种高度并行化的处理器架构,已得到越来越多的重视,目前已诞生了以NVIDIA CUDA为代表的各种GPU通用计算技术,同时多GPU并行计算也已有了实际的应用.多GPU并行计算涉及GPU与CPU两者之间的协调和交互,对程序员有着更高的要求.为此,提出一种基于模板的源代码生成技术,通过模板转化来支持单GPU程序的并行化移植.最后通过一个实例表明使用提出的CUDA源代码移植框架能够自动生成与手写程序等价的代码,可以显著降低多GPU下CUDA程序的开发代价,提高CUDA应用程序员的生产效率.  相似文献   

13.
随着社会的快速发展,人们对嵌入式智能设备的依赖程度越来越高。嵌入式系统工作在体积受限的封闭环境中,运算部件、存储单元等相关元器件体积小集成度高,不同工作环境、不同使用频度对电子元器件的可靠性将产生重要影响。针对嵌入式系统工作过程中的动态可靠性,提出了面向系统动态可靠性的自适应目标代码生成方法。该方法借助于决策树学习算法,构建了系统可靠性评估模型;并以此为指导,设计了多路径目标代码生成方法。使得系统能够根据实际工作状态信息,自适应的最佳的执行路径,以避免系统资源使用的不均衡,提高各运算部件的可靠性。实验表明,该方法将程序对单个处理器最高使用率由80%以上降到了30%以内,将内存单元最大最小访问比例由157.3降到了15.4,有效均衡了各处理器核和内存单元的使用。  相似文献   

14.
对于高性能并行计算机而言,如何由给出的计算、数据划分信息及精确数组数据流分析信息自动生成并行化代码是实现串行程序并行化的一个重要问题。根据Saman P.Amarasinghe和Lam的定理,实现了一种并行化识别工具中MPI(Message Passing Interface)并行化代码自动生成技术的算法,并对该算法的性能进行分析。  相似文献   

15.
Development of distributed software systems is complex due to the distribution of resources, which complicates validation of system-wide functionality. Such systems include various facets like functionality and distribution, each of which must be validated and integrated in the final software solution. Model-based techniques advocate various abstraction approaches to cope with such challenges. To enhance model-based development, this paper proposes (1) guidelines for development of distributed systems, where the different facets are introduced gradually through systematic modeling extensions, (2) code generation capabilities supporting technology specific realizations, and (3) demonstration of the applicability of our approach using an industrial case study involving the development of a harvest planning system, where the communication infrastructure paradigm changed late in the project. When developing this system, we spent most time validating system-wide functionality. The model extensions allowed an easier change of the underlying communication paradigm and code generation supported realization of the different system representations.  相似文献   

16.
This paper illustrates the usefulness of an attributed prefix linear intermediate representation for compiler code generation. In separating the machine-independent and machine-dependent aspects of a compiler, we discuss the advantages and disadvantages of an attributed linear intermediate representation with respect to tree-structured intermediate representations. Some of these issues are relevant to fundamental questions of compiler structure with particular emphasis on retargetability. We discuss our implementation experience using this linear intermediate representation with a table-driven code generation scheme for a variety of target architectures.  相似文献   

17.
针对汽车控制器中驱动代码生成存在对硬件依赖性强、代码格式不规范、可重用性不强等问题,提出利用仿真建模工具Simulink/RTW、结合AutoSAR规范、基于代码生成技术的汽车控制器驱动工具箱的设计方法。通过对驱动配置模块的不同芯片配置及对相关参数的设置满足多处理器需求,依据AutoSAR规范对驱动函数接口的封装实现代码的可重用性。最后将设计的驱动工具箱结合代码生成模板应用于BCM车窗控制系统,实验证明了该方法的高效性和可行性。  相似文献   

18.
基于码重分布的系统循环码识别方法   总被引:1,自引:0,他引:1  
介绍系统循环码的定义及矩阵描述,分析其码重分布特性,根据向量间距离的概率定义码重分布距离,推导随机序列的理论码重分布概率,提出实际序列码重分布概率的估计方法和利用实际序列的码重分布概率和随机序列的理论码重分布概率之间的距离估计码组长度和起始点的方法,在此基础上利用高斯消元法估计生成矩阵和校验矩阵,并提出了在误码情况下的识别方法。最后并对不同长度的码进行仿真实验,结果表明文中方法能够在误码为10-3的情况下有效地识别中短码。  相似文献   

19.
The flourish of deep learning frameworks and hardware platforms has been demanding an efficient compiler that can shield the diversity in both software and hardware in order to provide application portability. Among the existing deep learning compilers, TVM is well known for its efficiency in code generation and optimization across diverse hardware devices. In the meanwhile, the Sunway many-core processor renders itself as a competitive candidate for its attractive computational power in both scientific computing and deep learning workloads. This paper combines the trends in these two directions. Specifically, we propose swTVM that extends the original TVM to support ahead-of-time compilation for architecture requiring cross-compilation such as Sunway. In addition, we leverage the architecture features during the compilation such as core group for massive parallelism, DMA for high bandwidth memory transfer and local device memory for data locality, in order to generate efficient codes for deep learning workloads on Sunway. The experiment results show that the codes generated by swTVM achieve 1.79× improvement of inference latency on average compared to the state-of-the-art deep learning framework on Sunway, across eight representative benchmarks. This work is the first attempt from the compiler perspective to bridge the gap of deep learning and Sunway processor particularly with productivity and efficiency in mind. We believe this work will encourage more people to embrace the power of deep learning and Sunway many-core processor.  相似文献   

20.
Model-driven code generation has been investigated in traditional and object-oriented design paradigms; significant progress has been made. It offers many advantages including the rapid development of high quality code. Errors are reduced and the consistency between the design and the code is retained, in comparison with a purely manual approach. Here, a model-driven code generation approach based on graph transformations for aspect-oriented development is proposed. The approach has two main transformation activities. The first activity transforms a visual (graphical) model of the design into a formal, text-based notation that can be readily processed. The graphical model is created by the software designer and uses a UML profile for aspect-oriented software (i.e., FDAF) to represent aspects and their components. XML is the target notation for this step; the transformation uses the XML meta-model to ensure that the output complies with the language. The second activity transforms the XML model into AspectJ source code. The transformation uses the AspectJ meta-model to ensure the output complies with the language. The transformations from the extended UML model to XML and from XML to AspectJ code are fully automated. The transformation algorithms are based on graph transformations; tool support has been developed. Key technical issues in the approach are discussed, including performance, the amount of code generated, correctness, and adaptability, in addition to a comparison of the proposal with existing alternative approaches. The approach has been validated on three example systems: a banking system, classroom scheduling system, and an insurance system. The banking system example is presented in the paper.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号