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, wherein the translation of the hardware code part into the HDL code by means of the HLL-to-HDL comprises the steps of: translating the hardware code part into a low-level intermediate representation (IR) code immediately before generation of a target assembly code, and translating the low-level IR code into the HDL code, while preserving a standard call linkage convention of a main core; and (4) executing the software code part in the main core and executing the HDL code in a dedicated hardware.