MARTE-Based Formal Modeling with Reinforcement Learning for Architecture-Agnostic Assembler Design in Configurable Processors
- 1 Shanghai Key Laboratory of Trustworthy Computing, East China Normal University, Shanghai, China
- 2 Information Network Center, School of Information Network Security, Xinjiang University of Political Science and Law, Tumushuke, China
- 3 School of Computer Science and Engineering, Guangzhou Institute of Technology, Guangzhou, China
- 4 School of Integrated Circuit (School of Information Science and Electronic Engineering), Shanghai Jiao Tong University, Shanghai, China
- 5 School of Remote Sensing and Information Engineering, Wuhan University, Wuhan, China
- 6 Department of Computer, City University of Hong Kong, Hong Kong SAR, China
Abstract
This paper presents a configurable assembler framework enhanced with reinforcement learning (RL) and MARTE (Modeling and Analysis of Real-Time and Embedded Systems) constraints to address the challenges of rapidly evolving processor architectures. Our methodology integrates formal hardware/software modeling with self-optimizing configuration strategies, enabling automatic adaptation to instruction set architecture (ISA) modifications while ensuring correctness guarantees. The framework features a Common ISA Description Language (CIDL) interface that reduces code modification efforts by 85% compared to traditional assemblers, as demonstrated through four representative configuration scenarios. By formulating the adaptation process as a constrained Markov Decision Process, our RL-MARTE hybrid approach achieves 58% fewer configuration steps and 26.5% higher code density, i.e., the ratio of useful instruction bytes to total code size, than rule-based methods, while maintaining zero constraint violations. Experimental results on the TOP-32A processor extension demonstrate the solution’s effectiveness in handling complex ISA modifications like MIMD instructions, reducing average configuration time from 45.6 to 9.8 minutes per task. This work bridges the gap between formal verification and practical adaptability in compiler construction, offering a systematic approach for next-generation processor toolchain development.
- Tensilica. Tensilica Products Overview. https://www.cadence.com/zh_CN/home/tools/silicon-solutions/ai-ip-platform/tensilica-ai-base.html
- ARC. Arc Website. http://www.arc.com/
- Hu, W., Zhang, F. and Li, Z. (2005) Microarchitecture of the Godson-2 Processor. Journal of Computer Science and Technology , 20, 243-249. https://doi.org/10.1007/s11390-005-0243-6
- Leibson, S. and Kim, J. (2005) Configurable Processors: A New Era in Chip Design. Computer , 38, 51-59. https://doi.org/10.1109/mc.2005.226
- Xilinx. Xilinx virtex4. http://www.xilinx.com/products/siliconsolu-tions/fpgas/virtex/virtex4/overview/index.htm
- ARM. Arm. http://www.arm.com/products/dataengines/index.html
- Binutils. Binutils Homepage. http://www.gnu.org/software/binutils/
- Hadjiyiannis, G., Hanono, S. and Devadas, S. (1997) ISDL: An Instruction Set Description Language for Retargetability. Proceedings of the 34 th Annual Conference on Design Automation Conference - DAC ‘97, Anaheim, 9-13 June 1997, 299-302. https://doi.org/10.1145/266021.266108
- Xiao, X. and Liu, Z. (2023) ISADL: An Instruction Set Architecture Description Language for VLIW. 2023 IEEE 29 th International Conference on Parallel and Distributed Systems ( ICPADS ), Ocean Flower Island, 17-21 December 2023, 92-99. https://doi.org/10.1109/icpads60453.2023.00022
- Xiao, X. and Liu, Z. (2024) An Adaptive Instruction Set Encoding Automatic Generation Method for VLIW. In: Tari, Z., Li, K.Q. and Wu, H.Y., Eds., Algorithms and Architectures for Parallel Processing , Springer, 283-300. https://doi.org/10.1007/978-981-97-0834-5_17
- Himmelbauer, S., Hochrainer, C., Huber, B., Mischkulnig, N., et al . (2024) The Vienna Architecture Description Language.
- Chen, W., Ray, S., Bhadra, J., Abadir, M. and Wang, L. (2017) Challenges and Trends in Modern Soc Design Verification. IEEE Design & Test , 34, 7-22. https://doi.org/10.1109/mdat.2017.2735383
- Arbone, C., Ditu, B., Craciun, S. and Badea, D. (2013) Model-Driven Inline Assembler Generator for Retargetable Compilers. 2013 19 th International Conference on Control Systems and Computer Science , Bucharest, 29-31 May 2013, 71-76. https://doi.org/10.1109/cscs.2013.37
- Povazan, I., Popovic, M., Djukic, M. and Cetic, N. (2013) A Retargetable C Compiler for Embedded Systems. 2013 3 rd Eastern European Regional Conference on the Engineering of Computer Based Systems , Budapest, 29-30 August 2013, 48-54. https://doi.org/10.1109/ecbs-eerc.2013.15