1. A method of translating a high-level language code into a HDL code, comprising the steps of: (1) marking a translation-targeted section of a high-level language code using a programming directive; (2) partitioning the marked translation-targeted section of the high-level language code into a hardware code part and remaining sections of the high-level language code as a software code part; (3) compiling the software code part and the hardware code part together by means of a main compiler and translating the hardware code part into a HDL code by means of a HLL-to-HDL (high-level language to hardware description language) translator; and (4) executing the software code part in a main core and executing the HDL code in a dedicated hardware.