CN104615808B - A kind of test method and reference model device of hardware computation component to be tested - Google Patents

A kind of test method and reference model device of hardware computation component to be tested Download PDF

Info

Publication number
CN104615808B
CN104615808B CN201510025518.5A CN201510025518A CN104615808B CN 104615808 B CN104615808 B CN 104615808B CN 201510025518 A CN201510025518 A CN 201510025518A CN 104615808 B CN104615808 B CN 104615808B
Authority
CN
China
Prior art keywords
data processing
module
result
processing module
normal data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510025518.5A
Other languages
Chinese (zh)
Other versions
CN104615808A (en
Inventor
肖偌舟
王惠娟
林玻
刘檬
张志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Silang Technology Co ltd
Original Assignee
Beijing Si Lang Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Lang Science And Technology Co Ltd filed Critical Beijing Si Lang Science And Technology Co Ltd
Priority to CN201510025518.5A priority Critical patent/CN104615808B/en
Publication of CN104615808A publication Critical patent/CN104615808A/en
Application granted granted Critical
Publication of CN104615808B publication Critical patent/CN104615808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of test methods and reference model device of hardware computation component to be tested.The reference model device includes:Instruction decoding module is used to instruct into row decoding input;Special data processing module is handled special data operation according to decoding result;Normal data processing module, according to decoding as a result, by the way that computing module is called to handle normal data operation;Operation result by the way that hardware platform resource is called to perform correspondingly operation, and is returned to normal data processing module by computing module;Flowing water control module is used to implement pipelining-stage control;Output module, for the result for exporting special data processing module, normal data processing module obtains.The characteristics of present invention further investigation arithmetic unit, the advantages of dexterously System Verilog and C language are combined, make full use of both language, the reference model needed for foundation rapidly and efficiently.

Description

A kind of test method and reference model device of hardware computation component to be tested
Technical field
The invention belongs to the verification technique fields in integrated circuit, exactly, are related to setting for arithmetic unit reference model Meter.
Background technology
With being constantly progressive for chip manufacturing process, chip feature sizes have been enter into the sub-micro epoch.At present, foundry The representative value of most advanced technique that factory can provide is in 28nm or so.The scale of digital integrated electronic circuit is increasing, and integrated level is more next Higher, inner space state is more and more and becomes increasingly complex, and the result that such present situation is brought is exactly chip functions and logic The probability of error greatly increases.To ensure the correctness of chip design and the reusability of IP, verification just plays critical Effect.From International Business Machines Corporation, technical data disclosed in the international advanced chip companies such as Intel and Advanced Micro Devices Inc. It sees, at present in a chip design, the heavy workload of verification accounts for about the 60%~70% of amount of work, certain based on IP reuse ASIC design in, this numerical value is even as high as more than 80%.In general, the means of verification include formal verification and analog simulation is tested Card.Formal verification utilizes mathematical theorem and representation method, and design is derived and final certification design meets design specification.Simulation The means of generally use, easily pinpoint the problems at the beginning of design at the beginning of simulating, verifying is design, and are verified suitable for black box. In analog simulation verification method, emphasis is the behavior for how efficiently finding not meeting design specification, and artificial debugging is only applicable to Very small data volume, inefficient, designer may use when initially completing hardware computation part codes to be tested;From The verification platform of dynamicization is the guarantee of big data quantity verification.
Arithmetic unit mainly does data logic and arithmetical operation, and common arithmetic unit has:Pinpoint adder-subtractor, fixed point Multiplier, fixed-point divider, floating-point adder-subtractor, floating-point multiplier etc.;Some projects may also need to more efficient operation Component, if fixed point multiplies accumulating, floating-point multiply-accumulator etc..System Verilog have the ability of advanced modeling, and syntax rule is The superset of Verilog.Compared to SystemC, System Verilog are easier to describe the relevant logic of certain hardware bottom layers, such as The logic of step-by-step;And it is very convenient to communicate with RTL, can directly in a System Verilog/Verilog module, Directly by System Verilog reference models and Verilog hardware computation device instantiations to be tested, this point is put down to testing Building for platform is very good.
In ieee standard, System Verilog can in several ways, as DPI, PLI etc. communicate with C/C++. System Verilog are because have the ability of bottom hardware description, and can facilitate and data are done with some high level conversions (such as Realtobits), the control logic of reference model can be realized, special data is handled, the functions such as pipelining-stage control, and C/C++ It can realize the operation of normal data in reference model, it is only necessary to write corresponding function or call existing software.
Verification platform is as shown in Figure 1, basic principle is under input stimulus, to hardware computation component to be tested and with reference to mould The output of type is compared and does interpretation of result, and whole flow process can be full-automatic or have a small amount of artificial participation.101 are The input of test vector can be that constraint is random or hand-written, and constraint can generate excitation fast automaticly at random, it is hand-written can To be random supplement, situation about not being tested specifically for some.102 be reference model, is that designer advises according to design The System-Level Model that model demand is write, it is consistent with 103 hardware computation unit interfaces to be tested and function.104 are referred to by comparing The output of model and the output of hardware computation component to be tested, when the two output is inconsistent, with the side such as figure or text Formula reports all tune such as the data and command code that mistake occurs, hardware computation member interior space state to be tested to designer Try the information needed.
Invention content
(1) technical problems to be solved
In view of this, it is a primary object of the present invention to provide a kind of design side of efficient arithmetic unit reference model Method shortens proving period.
(2) technical solution
For this purpose, the present invention provides a kind of reference model device of hardware computation unit test to be tested, including:
Instruction decoding module is used to instruct into row decoding input;
Special data processing module is handled special data operation according to decoding result;
Normal data processing module, according to decoding as a result, by call computing module to normal data operation at Reason;
Computing module by the way that hardware platform resource is called to perform correspondingly operation, and operation result is returned to normally Data processing module;
Flowing water control module is used to implement pipelining-stage control;
Output module, for the result for exporting special data processing module, normal data processing module obtains.
The present invention also provides a kind of test method of hardware computation component to be tested, including:
Step 1 receives test vector, and the test vector includes carrying out the instruction of predetermined operation and corresponding operating number;
Step 2, using System Verilog to the test vector into row decoding;
Step 3 determines that special data processing or normal data are handled according to decoding result;
Step 4, if special data handle, then it is handled using System Verilog;It is if normal Data processing then handles it using C function, and obtains test result;
Test result and the operation result of the hardware computation component to be tested are compared by step 5, obtain test knot Fruit.
(3) advantageous effect
It can be seen from the above technical proposal that the invention has the advantages that:
The characteristics of maximum feature of the present invention is further investigation arithmetic unit, on existing hardware and software platform, efficiently Establish the reference model that design to be measured is wanted.In the concrete realization, successfully different designs institute is established using this method The arithmetic unit reference model needed, Reference Model Design have combined third party's commercialization hardware and software platform and have realized according to actual needs. Before, in a certain case, the Reference Model Design of an arithmetic unit needs several weeks or longer time, using the present invention Method realizes that the time can foreshorten to half a day to one day, greatly improve the efficiency, and save the unnecessary duplication of labour.
As shown in figure 3, single double precision multiplexing floating-point multiplication reference model size of code that method using the present invention is established is only It is 10% or so of hardware computation part design to be tested, the verification amount compared to hardware computation component to be tested greatly reduces, and And reference model only needs to realize Instruction decoding, special data processing, control and flowing water, arithmetic section can be combined using C language Existing multi-party hardware and software platform, the correctness and reliability of reference model can ensure very well, it be verified relatively easy.Ginseng The processing of general data in model is examined due to calling C function, C function is realized by external software and hardware, it is only necessary to which every instruction is done A small amount of general data and special data test, you can ensure the correctness of reference model.
Description of the drawings
The flow diagram that analog simulation is verified when Fig. 1 is test chip;
Fig. 2 is the circuit theory schematic diagram of reference model device in the present invention;
Fig. 3 is reference model device size of code and hardware computation part codes amount comparison schematic diagram to be tested in the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference Attached drawing, the present invention is described in further detail.
In the floating-point multiplier of the single double precision multiplexing of design, provide, use according to 754 standard rounding procedures of IEEE System Verilog language directly writes floating-point multiplication, and rounding mode control can not be carried out directly in high level description, Assume A, B, C is three double-precision floating points, when C=A*B sentences are write in System Verilog, is unable to control rounding-off Mode.If with more bottom, such as the mode of step-by-step description, then the complexity of reference model greatly increases, and verifies that it is correct Property workload no less than the workload for verifying hardware computation part design correctness to be tested.
As shown in Fig. 2, the present invention is combined by System Verilog and C language, existing software and hardware item is made full use of Part realizes arithmetic unit Reference Model Design.The present invention provides a kind of references for hardware computation unit test to be tested Model equipment, including:
Instruction decoding module 201 is used to instruct into row decoding input;Specifically, described instruction decoding module 201 is right Input is instructed into row decoding, obtains action type, and action type is operated including fixed and floating, operation bit wide, integer/decimal type, Whether there is the contents such as symbol, rounding procedure.Wherein, fixed and floating operation can be fixed and floating ALU operations, and fixed and floating multiplying is fixed The types such as floating multiplication accumulating operation;Operation bit wide can be fixed point 8,16, either single double precision or the expansion of the bit wides such as 32 Open up accuracy floating-point bit wide;Integer/decimal type is indicated as being integer operation or decimal operation;Whether there is symbol and be indicated as being signed number Or unsigned number operation;Rounding procedure indicates fixed point results as saturated process or truncation, floating point result rounding treatment Mode for rounding-off nearby, to modes such as zero rounding-off, just infinite rounding-off or negative infinite rounding-offs.
Special data processing module 202, is used to carrying out special data processing, for example the operand in floating-point operation includes It is by part progress operation when inputs for infinite, non-number, 0, for the operation result of special data, according to its use environment Defined instruction specification carries out.
Normal data processing module 203 by calling respective function, handles normal data, passes through communication interface 207 Data interaction and communication are carried out with computing module 204, the modes such as DPI, PLI or other communications may be used in communication interface 207 Mode is realized;
Computing module 204 its by the way that hardware platform resource is called to perform correspondingly operation, and operation result is returned to just Regular data processing module;It calls existing hardware platform resource by C function, and the communication interface 207 passes to C function institute The instructions such as the parameter needed, two operands and rounding procedure as needed for floating-point multiplication, the C function of computing module 204 Respective handling is carried out to input data according to instruction, result of calculation, such as multiplication result is obtained, can pass through when implementing The instruction that compilation directly invokes existing hardware platform realizes that existing hardware platform can be diversified forms, for example X 86 processor puts down Platform, CUDA platforms or other disclosure satisfy that the various commercial hardware and software platforms such as the simulator platform of increasing income of demand, as a result accurately Specification, it is small compared to hardware computation part design size of code to be tested, such as carried out under various rounding procedures on X 86 processor platform Single double-precision floating point multiplying, C function complete operation by forms such as C inline assemblies, obtain correct operation result.Communication Operation result is returned to normal data processing module 203 by interface 207.
Flowing water control module 205, is used to implement the logic controls such as pipelining-stage control, pipeline register, in reference model Portion's pipelining-stage is consistent with hardware computation part design pipelining-stage to be tested, to ensure that cycle stage accurate reference model designs.
Output module 206, for special data processing module 202, normal data processing module 203 acquisition through flowing water The result of control module 205 is selected and is exported after doing necessary processing according to design specification.
In above device, described instruction decoding module 201, special data processing module 202, normal data processing module 203rd, flowing water control module 205 and output module 206 are realized using System Verilog.System Verilog have The ability of bottom hardware description, and can facilitate and data are done with some high level conversions (such as realtobits), it can realize ginseng Examine the functions such as the control logic of model, special data processing, pipelining-stage control.
In addition, the computing module 204 is realized by C function, since C function can directly invoke the finger of existing hardware platform It enables and realizes concrete operation, result of calculation 100% is accurate, realizes that size of code is small compared to System Verilog, function accuracy is easy Ensure, speed is fast, and it is few to expend resource.Method using the present invention, the side being combined using System Verilog and C language Formula carries out reference model realization.As shown in figure 3, the final size of code of the reference model is only hardware computation part design to be tested 8.8%, in System Verilog models realize Instruction decoding, Pipeline control and special data processing etc. particular designs Defined function, this partial code are mainly some control logics, and correctness is easier to verify.And the calculating part of normal floating-point Point, existing C function is called to realize by way of DPI, it only need to be into line function sound in System Verilog models Bright and calling.C function can facilitate the control realized and be rounded to floating-point multiplication, for example, in X86 architecture platforms, C When function is realized, the rounding-off flag bit of X86 floating-point operations is controlled to can obtain the operation result of different rounding procedures by setting, This function only needs a few row X86 inline assembly codes can be realized.
It was verified that this method is simple, efficient, designer needs to spend 1 month or more time completion is to be measured Examination hardware computation part design is write, and the foundation of reference model only needs 0.5 day time can be completed, and reference model has Very high correctness and reliability provides a strong guarantee the verification of hardware computation part design correctness to be tested.
The present invention also provides a kind of test method of hardware computation component to be tested, including:
Step 1 receives test vector, and the test vector includes carrying out the instruction of predetermined operation and corresponding operating number;
Step 2, using System Verilog to the test vector into row decoding;
Step 3 determines that special data processing or normal data are handled according to decoding result;
Step 4, if special data handle, then it is handled using System Verilog;It is if normal Data processing then calls C function to handle it, and obtains test result;
Test result and the operation result of the hardware computation component to be tested are compared by step 5, obtain test knot Fruit.
Specific implementation details in the above method is consistent with the above-mentioned description to test model device, and details are not described herein.
Particular embodiments described above has carried out the purpose of the present invention, technical solution and advantageous effect further in detail Describe in detail bright, it should be understood that the above is only a specific embodiment of the present invention, is not intended to restrict the invention, it is all Within the spirit and principles in the present invention, any modification, equivalent substitution, improvement and etc. done should be included in the protection of the present invention Within the scope of.

Claims (7)

1. a kind of reference model device of hardware computation unit test to be tested, including:
Instruction decoding module is used to instruct into row decoding input;
Special data processing module is handled special data operation according to decoding result;
Normal data processing module, according to decoding as a result, by the way that computing module is called to handle normal data operation;
Operation result by the way that hardware platform resource is called to perform correspondingly operation, and is returned to normal data by computing module Processing module;
Flowing water control module is used to implement pipelining-stage control;
Output module, for the result for exporting special data processing module, normal data processing module obtains;
Wherein, described instruction decoding module, special data processing module, normal data processing module, flowing water control module and defeated Go out module to realize using SystemVerilog;The computing module calls the execution of hardware platform resource correspondingly to transport by C function It calculates.
2. reference model device as described in claim 1, wherein, the special data processing includes the operation in floating-point operation Operation when number is infinite, non-number or 0.
3. reference model device as described in claim 1, further includes:
Communication interface, for the data interaction and communication between normal data processing module and computing module.
4. reference model device as claimed in claim 3, wherein, the communication interface is realized using DPI or PLI modes.
5. a kind of test method of hardware computation component to be tested, including:
Step 1 receives test vector, and the test vector includes carrying out the instruction of predetermined operation and corresponding operating number;
Step 2, using SystemVerilog to the test vector into row decoding;
Step 3 determines that special data processing or normal data are handled according to decoding result;
Step 4, if special data handle, then it is handled using SystemVerilog;If at normal data Reason, then handled it using C function, and obtain test result;
Test result and the operation result of the hardware computation component to be tested are compared by step 5, obtain test result.
6. method as claimed in claim 5, wherein, in step 4, the special data processing includes the operation in floating-point operation Operation when number is infinite, non-number or 0.
7. method as claimed in claim 5, wherein, if normal data is handled in step 4, then pass through tune using C function Correspondingly operation is performed with hardware platform resource.
CN201510025518.5A 2015-01-19 2015-01-19 A kind of test method and reference model device of hardware computation component to be tested Active CN104615808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510025518.5A CN104615808B (en) 2015-01-19 2015-01-19 A kind of test method and reference model device of hardware computation component to be tested

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510025518.5A CN104615808B (en) 2015-01-19 2015-01-19 A kind of test method and reference model device of hardware computation component to be tested

Publications (2)

Publication Number Publication Date
CN104615808A CN104615808A (en) 2015-05-13
CN104615808B true CN104615808B (en) 2018-07-03

Family

ID=53150249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510025518.5A Active CN104615808B (en) 2015-01-19 2015-01-19 A kind of test method and reference model device of hardware computation component to be tested

Country Status (1)

Country Link
CN (1) CN104615808B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708687B (en) * 2015-11-12 2020-03-17 青岛海信电器股份有限公司 Chip verification method and device based on executable file
CN109829192B (en) * 2018-12-26 2023-10-17 合芯科技(苏州)有限公司 Reference model construction method and device for processor computing unit
CN109933948B (en) * 2019-04-01 2024-02-02 合芯科技(苏州)有限公司 Form verification method, device, form verification platform and readable storage medium
CN112241347B (en) * 2020-10-20 2021-08-27 海光信息技术股份有限公司 Method for realizing SystemC verification and verification platform assembly architecture
CN112464498B (en) * 2020-12-24 2021-11-09 芯天下技术股份有限公司 True modeling verification method and device for memory, storage medium and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008962A (en) * 2006-12-29 2007-08-01 深圳市明微电子有限公司 Verification method for configurable and replaceable reference model used by network chip
CN101840367A (en) * 2009-12-23 2010-09-22 上海高性能集成电路设计中心 Device for verifying floating point unit of microprocessor
CN102929686A (en) * 2012-09-28 2013-02-13 杭州中天微系统有限公司 Functional verification method of on-chip multi-core processor

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030212538A1 (en) * 2002-05-13 2003-11-13 Shen Lin Method for full-chip vectorless dynamic IR and timing impact analysis in IC designs
CN100399341C (en) * 2006-03-31 2008-07-02 电子科技大学 Software and hardware synergistic simulation/ validation system and vector mode simulation/ validation method
US8806387B2 (en) * 2008-06-03 2014-08-12 Asml Netherlands B.V. Model-based process simulation systems and methods
CN102495719B (en) * 2011-12-15 2014-09-24 中国科学院自动化研究所 Vector floating point operation device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008962A (en) * 2006-12-29 2007-08-01 深圳市明微电子有限公司 Verification method for configurable and replaceable reference model used by network chip
CN101840367A (en) * 2009-12-23 2010-09-22 上海高性能集成电路设计中心 Device for verifying floating point unit of microprocessor
CN102929686A (en) * 2012-09-28 2013-02-13 杭州中天微系统有限公司 Functional verification method of on-chip multi-core processor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于E语言和C参考模型的IP功能验证方案;吴向宇等;《微计算机信息》;20070618;第202-203页 *
基于SystemVerilog和MATLAB参考模型的WLAN基带功能验证;王凯等;《微电子学与计算机》;20100918;第181-184页 *

Also Published As

Publication number Publication date
CN104615808A (en) 2015-05-13

Similar Documents

Publication Publication Date Title
CN104615808B (en) A kind of test method and reference model device of hardware computation component to be tested
US8640112B2 (en) Vectorizing combinations of program operations
CN109933529B (en) Verification method and verification platform based on computing unit
US7302656B2 (en) Method and system for performing functional verification of logic circuits
US8560988B2 (en) Apparatus and method thereof for hybrid timing exception verification of an integrated circuit design
CN102542149A (en) Hardware realization method of fissile bootstrap particle filtering algorithm based on FPGA (Field Programmable Gate Array)
CN106775905A (en) Higher synthesis based on FPGA realizes the method that Quasi-Newton algorithm accelerates
CN102567165A (en) System and method for verifying register transfer level (RTL) hardware
Jones et al. Practical formal verification in microprocessor design
CN107533473A (en) Efficient wave for emulation generates
Giammarini et al. System-level energy estimation with Powersim
CN107506509B (en) Application logic, verification method and composition method thereof
CN106777529A (en) Integrated circuit fault-resistant injection attacks capability assessment method based on FPGA
US8881075B2 (en) Method for measuring assertion density in a system of verifying integrated circuit design
CN113343629B (en) Integrated circuit verification method, code generation method, system, device, and medium
Ray et al. Multilevel design understanding: from specification to logic
CN112433904A (en) Floating point verification data generation method based on intermediate result constraint
Zhang et al. Automatic generation of high-coverage tests for RTL designs using software techniques and tools
CN109933948B (en) Form verification method, device, form verification platform and readable storage medium
Boland et al. Word-length optimization beyond straight line code
Venkataramani et al. Model-based hardware design
Pointner et al. Did we test enough? functional coverage for post-silicon validation
Ingole et al. Instruction set design for elementary set in tensilica xtensa
Yu et al. Verification of arithmetic datapath designs using word-level approach—A case study
Ray et al. Hardcaml: An OCaml Hardware Domain-Specific Language for Efficient and Robust Design

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20171207

Address after: 102412 Beijing City, Fangshan District Yan Village Yan Fu Road No. 1 No. 11 building 4 layer 402

Applicant after: Beijing Si Lang science and Technology Co.,Ltd.

Address before: 100190 Zhongguancun East Road, Beijing, No. 95, No.

Applicant before: Institute of Automation, Chinese Academy of Sciences

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 201306 building C, No. 888, Huanhu West 2nd Road, Lingang New District, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai

Patentee after: Shanghai Silang Technology Co.,Ltd.

Address before: 102412 room 402, 4th floor, building 11, No. 1, Yanfu Road, Yancun Town, Fangshan District, Beijing

Patentee before: Beijing Si Lang science and Technology Co.,Ltd.

CP03 Change of name, title or address