Скачать презентацию Specman Presented By Yair Miranda Presentation Topics Скачать презентацию Specman Presented By Yair Miranda Presentation Topics

973da33971604fffa7ec83f24b17c8c6.ppt

  • Количество слайдов: 34

Specman. Presented By: Yair Miranda Specman. Presented By: Yair Miranda

Presentation Topics. n n Testing micro controllers. The specman tool. n n n Overview. Presentation Topics. n n Testing micro controllers. The specman tool. n n n Overview. The e Language. XOR example. Application issues. Conclusions.

Testing Micro Controllers. n n n Silicon hardware devices. Micro processors, DSP etc. Composed Testing Micro Controllers. n n n Silicon hardware devices. Micro processors, DSP etc. Composed of various internal units like: n n ALU. I/O. On chip cache. Each unit has a well defined interface.

Testing Micro Controllers n n n (cont’d) . Developed using an EDA tool. Functionality Testing Micro Controllers n n n (cont’d) . Developed using an EDA tool. Functionality should match the spec. Production cycle is long and expensive. Pre production verification is crucial. How can we verify a non existing controller?

Testing Micro Controllers n n n (cont’d) Use a simulator for verifying the chip Testing Micro Controllers n n n (cont’d) Use a simulator for verifying the chip before production. EDA tools provide such a simulator. Verification by series of tests. How to generate the tests? What tests should be generated? How to verify the results? .

Specman Overview. n n Specman is an object oriented programming language (e), integrated with Specman Overview. n n Specman is an object oriented programming language (e), integrated with a constraints solver. Generates tests in a deterministic/random manner fulfilling the constraints. Interfaces with the simulator for running the tests and verifying the results. Functional coverage analysis to find verification holes.

Specman Overview (cont’d). n n Handles a wide range of design environments: n Small Specman Overview (cont’d). n n Handles a wide range of design environments: n Small blocks to ASICs to complete systems. n Cycle based to event driven simulation environment. An open environment: n n Integration with third party EDA tools (Verilog, VHDL). Links with existing code (C, C++ etc).

Specman Overview (cont’d). n What is needed in order to test a design? n Specman Overview (cont’d). n What is needed in order to test a design? n Describe the signals to applied to DUT. n n n Generate values for input signals. Determine values for output checks. Interface to simulator. Check for correctness. Monitor progress. Measure functional coverage.

The e Language. n n An object oriented language. Supports programming (C, C++. . The e Language. n n An object oriented language. Supports programming (C, C++. . ) and simulation (Verilog, VHDL. . )types: n Struct, methods, inheritance, execution control, operators etc. n Simulation time, delays, buses, events, triggers etc. n Test generation, verification, coverage etc.

The e Language n n n (cont’d). Strongly typed language. User defined and predefined The e Language n n n (cont’d). Strongly typed language. User defined and predefined types. Predefined: Integers, bytes, bits, Boolean, strings. User defined: Enumeration types. type color: [red=2, green=7, blue=100]; n Complex types: Lists, structs.

The e Language n n n (cont’d). Lists: dynamic arrays of a given type. The e Language n n n (cont’d). Lists: dynamic arrays of a given type. Structs: a basic building block. An object (like a C++ class). Object contain fields (member variables) and methods (member functions). Objects can be inherited (extended). Structs are the base for constraints, events, triggers, results checking, coverage.

The e Language struct number_bag{ //data fields len: int; numbers: list of int; //methods The e Language struct number_bag{ //data fields len: int; numbers: list of int; //methods fill_numbers() is { for i from 0 to len-1 do { numbers. add (i*3); }; }; }; (cont’d).

The e Language n (cont’d). Macro and defines. define offset 2; define multiply_I_J i*j; The e Language n (cont’d). Macro and defines. define offset 2; define multiply_I_J i*j; n Methods: n n Methods are struct member. Used to perform operations. Predefined or user defined. Nesting is valid.

The e Language n (cont’d). Actions: used to manipulate data and control program flow The e Language n (cont’d). Actions: used to manipulate data and control program flow within a method: n Variable definitions and assignments. n Flow control (loops, calls etc). n Printing n Generation and checks. n Error handling. n Synchronization (wait etc).

The e Language n n (cont’d). Numbers, identifiers, operators. Syntax: n Basic blocks {} The e Language n n (cont’d). Numbers, identifiers, operators. Syntax: n Basic blocks {} n Statements ; n Method parameters () n Etc.

The e Language n (cont’d). Constraints: n n Struct member used to define relations The e Language n (cont’d). Constraints: n n Struct member used to define relations between data fields for test generation. Restrict the range of possible values of struct fields when generating random test. Struct house { X: int; Y: int; Z: [small, large, xlarge]; Keep x == y ; Keep z != large ; Keep x > 5 ; };

The e Language n n (cont’d). Packing: used for conversion of complex data structures The e Language n n (cont’d). Packing: used for conversion of complex data structures to/from bit streams to be sent to/from the DUT. Pack() and Unpack() are an integral part of any struct. The user defines what will and will not be packed. Referenced structs will be packed as well. Bit stream can be manipulated.

Specman. XOR example. n n n Specman has a built in test generator. Input Specman. XOR example. n n n Specman has a built in test generator. Input is a description of the architecture elements. Output are instances of those elements assigned with “good” values. No need to develop a generator. Constraints are the way data relations are described in e.

Specman. XOR example. n Describe signals to be applied: n n a, b. Two Specman. XOR example. n Describe signals to be applied: n n a, b. Two bits wide. Any combination of 0, 1 is legal. Clock. Constant periodic waveform from DUT. a, b Specman Output, Clock XOR DUT Simulator

Specman. XOR Example (cont’d). n Defining an e structure for XOR module: Struct operation Specman. XOR Example (cont’d). n Defining an e structure for XOR module: Struct operation { a: int (bits: 2); b: int (bits: 2); results_from_dut: int (bits: 2); }; n Describes inputs/outputs/other meaningful values together for clarity and reusability.

Specman. XOR Example (cont’d). n Define list of structs to contain values that will Specman. XOR Example (cont’d). n Define list of structs to contain values that will later be applied to the XOR design. extend sys { ops: list of operation; keep ops. size() <20; }; n n Specman automatically generates values for items in sys struct (Sys is a pre-defined top level struct) Values can be random with probability.

Specman. XOR Example (cont’d). n Defining a reference model. check that op. result_from_dut == Specman. XOR Example (cont’d). n Defining a reference model. check that op. result_from_dut == (op. a ^ op. b); n Creating a Specman event to synchronize to the simulator clock. event fall_clk is fall (‘xor_top. clk’)@sim;

Specman. XOR Example (cont’d). n Interfacing to the simulator. Verilog task ‘xor_top. mon’ (); Specman. XOR Example (cont’d). n Interfacing to the simulator. Verilog task ‘xor_top. mon’ (); //referencing a Verilog task Struct verify { event fall_clk is fall (‘xor_top. clk’; )@sim; verify_xor() @fall_clk is{ ‘xor_top. mon’(); //calling a verilog task for each operation (op) in sys. ops{ ‘xor_top. a’=op. a; ‘xor_top. b’=op. b; wait [1] * cycle; op. result_from_dut=‘xor_top. out’; // sampling print op;

Specman. XOR Example (cont’d). check that op. result_from_dut == (op. a^op. b); }; stop_run(); Specman. XOR Example (cont’d). check that op. result_from_dut == (op. a^op. b); }; stop_run(); }; }; Extend sys{ verify 1: verify; };

Specman. XOR Example (cont’d). n n Functional coverage shows how well the DUT was Specman. XOR Example (cont’d). n n Functional coverage shows how well the DUT was tested. Coverage of all variations of inputs a and b. Extend operation{ //extending the operation struct for coverage event done; cover done is{ item a; item b; cross a, b; }; };

Specman. XOR Example (cont’d). Extend global { //turning on collecting of coverage setup_test() is Specman. XOR Example (cont’d). Extend global { //turning on collecting of coverage setup_test() is also { set_config(cover, mode, normal); };

Application issues. n n Most of DUT are more complicated then a XOR function. Application issues. n n Most of DUT are more complicated then a XOR function. . There is no way to test it using a high level functions. The test must be in a resolution of few controller commands. There must be a way to write/read a snapshot of the DUT and get indication of progress. Structures can be packed/unpacked.

Application issues n n n (cont’d). There is a need to set the line Application issues n n n (cont’d). There is a need to set the line between the chip designer and specman programmer responsibilities. There are few models: The chip designer provides interfaces to its design and all of it’s internal timing and events. The specman programmer interfaces to it in order to test the DUT.

Application issues n n (cont’d). Advantage: The chip designer doesn’t have to put more Application issues n n (cont’d). Advantage: The chip designer doesn’t have to put more energy for the verification. Disadvantage. The timing is a specman responsibility and hence can create problems that doesn’t really exist. The chip designer provides interface modules which are more high level. The specman controls the test logic but doesn’t affect the timing.

Application issues n n (cont’d). Advantage: The change of finding bugs that are due Application issues n n (cont’d). Advantage: The change of finding bugs that are due to specman wrong timing is smaller. Each one is responsible to its bugs. Disadvantage. The chip designer has to design additional modules. The specman programmer has less control over the DUT. It is more difficult to perform tasks that requires full control like indirect access.

Conclusions. n n n Specman is a useful and powerful tool for chips verification. Conclusions. n n n Specman is a useful and powerful tool for chips verification. Uses e which is an intuitive programming language. Not clear why is there a need to reinvent the wheel though (use C++ concept with new syntax). e constraints programming is intuitive. Some say it could be copied almost directly from the specifications.

Conclusions n n n (cont’d). Shorten testing and hence development time. Reusability. There is Conclusions n n n (cont’d). Shorten testing and hence development time. Reusability. There is a way to use debugged specman objects that were used in previous projects. Since it is a common practice to reuse internal modules when designing chips, each module can be reused with its specman ready module.

Conclusions n n (cont’d). Provides coverage statistics. A graphical viewer is available. Operatable in Conclusions n n (cont’d). Provides coverage statistics. A graphical viewer is available. Operatable in various testing methodologies (I. e. compare to self generated results, compare to other verified silicon, link with an EDA module etc).

Conclusions n (cont’d). Provided answers to: n n n How to generate the tests? Conclusions n (cont’d). Provided answers to: n n n How to generate the tests? What tests should be generated? How to verify the results?