The invention discloses a
macro-based multi-mode
circuit design method and device and a medium, and belongs to the technical field of
electronic design automation (EDA) design, and the method comprises the steps: setting a working mode, and configuring a relation between the mode and a
macro; performing grammar and
lexical analysis on the RTL code, abstracting and converting modules, signals, parameters and
macro in the code into class and data structures, constructing a relationship between the modules, forming a new data relationship model, and marking macro on each object;
copying, dispersing and merging the
modes; a new data relation model is generated after operation, and new RTL codes are constructed according to the sequence; checking circuit
connectivity; and outputting the RTL code containing
multiple modes according to the latest
data model. According to the design method, the macro-based multi-mode
circuit design is supported, the mode comprises the combination of a plurality of macros,
copying, dispersing and merging operation can be carried out among the
modes,
connectivity can be checked based on circuits among the
modes, and the efficiency and quality of
chip design are improved.