# Patent

## Title
Innovative verification methodology for deeply embedded computational element

## Abstract

A circuit verification method for a logic circuit is presented. The method includes developing a first hardware description language (HDL) code representative of the logic circuit and, for an embedded portion of the logic circuit, developing a second HDL code representative of the embedded portion. The second HDL code includes a process of forcing inputs of the embedded portion to one or more known values. The method further includes operating a processing device in conjunction with the first and second HDL codes and verifying operation of the embedded portion in response to forcing the inputs to the logic circuit.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
This application claims the benefit of U.S. Provisional Application No. 60/808,936, filed May 26, 2006, which is hereby incorporated by reference.


BACKGROUND
The present invention relates generally to verification of data processing devices. More specifically, the present invention relates to an innovative verification methodology for a deeply embedded computational element.
Various methods and devices have been developed to test logic circuitry which is embedded in an electronic device. Such logic circuitry may include logic elements such as gates and inverters and multiplexers, storage elements such as latches and flip-flops, and more complex elements such as adders and multipliers. All of these devices have inputs for receiving input signals, outputs for providing output signals. The output signal is a function of the input signals and in some cases the previous state of the device.
Testing logic circuitry generally involves verifying the correct operation of the circuitry under a variety of conditions. These conditions include combinations of input signals as well as time-dependent conditions. Under a particular combination of input signals, a certain output signal should result. All possible input and output combinations should be verified for correctness. For circuits for which the output signal is a function of the previous state of the device, all possible input combinations and previous state combinations should be verified.
Some logic circuitry can be prohibitively difficult to test. One example is a deeply embedded computational element within a pipeline circuit. FIG. 1 illustrates a pipeline circuit 100. The pipeline circuit 100 is a functional block implementing a chain of operations. The pipeline circuit 100 includes a plurality of data processing elements 102, 104, 106, 108 connected in series so that the output of one element is the input of the next element. The pipeline circuit 100 has a pipeline input 112 and a pipeline output 114. The data processing elements 102, 104, 106, 108 may be executed in parallel to speed processing. In that case, buffers or other storage may be included between the elements 102, 104, 106, 108 to store intermittent data for the next element. The data processing elements 102, 104, 106, 108 of the pipeline may contain computational elements, such as computational elements 116, 118 of data processing element 104. The location of the computational element 116, 118 within a data processing element 104 that itself is within a pipeline 100 means that the computational element is deeply embedded.
While the exemplary deeply embedded computational element 116, 118 is within a data processing stage of a pipeline circuit 100, the devices and techniques disclosed herein are not limited to this configuration. The devices and techniques also apply to verification of other deeply embedded computation elements, such as a floating point math unit in a central processing unit (CPU).
In a pipeline structure, the outputs of the respective data processing element 102, the inputs and outputs of the respective data processing elements 104, 106, and the inputs of the respective data processing element 108 are generally not available for testing. Neither are the inputs and outputs of the computational element 116, 118 that is located within a data processing element 104 generally available for testing. Conventionally, only inputs to the pipeline and outputs from the pipeline are available. The intermediate signals are not present. Therefore, the operation of each respective data processing element or deeply embedded computational element cannot be readily verified.
One prior solution to the problem of verifying a pipeline structure is to manipulate the input signals to the pipeline block so as to create the desired inputs to the computational block. However, this is difficult and time consuming since the inputs do not directly control the elements. Instead, inputs to the pipeline block pass through many transformations first. Further, if an error condition is detected, it may be difficult to isolate and correct the problem since the erroneous output of the block under test will have passed through data transformations in the pipeline stages that follow it.
A second solution to the problem of verifying a pipeline structure is to multiplex the inputs to the computational elements of the pipeline with an external input. Likewise, an internal output signal of the pipeline can be made available for testing through a multiplexer or other circuit. However, while it may be effective for testing the circuit, this test method adds substantial additional circuitry, which itself can be a source of error and also slows down operation of the pipeline. Since processing speed and throughput are often key features of a pipeline, added circuitry may not be a suitable solution.
SUMMARY
The present invention is defined by the following claims, and nothing in this section should be taken as a limitation on those claims.
A circuit verification method for a logic circuit is presented. In one embodiment, the method includes developing a first hardware description language (HDL) code representative of the logic circuit and, for an embedded portion of the logic circuit, developing a second HDL code for verifying the embedded portion. The second HDL code includes a process of forcing inputs of the embedded portion to one or more known values. The method further includes operating a processing device in conjunction with the first and second HDL codes and verifying operation of the embedded portion in response to forcing the inputs to the logic circuit.
The preferred embodiments will now be described with reference to the attached drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 illustrates a pipeline circuit.
FIG. 2 is a block diagram of a conventional data pipeline circuit with deeply embedded computational elements.
FIG. 3 is a block diagram of a circuit to be tested.
FIG. 4 is a flow diagram illustrating a verification method for a circuit including a deeply embedded computational element or block.
FIG. 5 is a block diagram of a data processing system.



DETAILED DESCRIPTION OF THE PRESENTLY
Preferred Embodiments
Referring now to FIG. 2, it shows a block diagram of a pipeline circuit 200 with deeply embedded computational elements 214, 216 to be tested. The pipeline circuit 200 in the illustration includes a data pipeline with multiple data processing stages 202, 204, 206, 208, a verification input process 210 and a verification output process 212. The pipeline circuit 200 is intended to be completely general for illustration purposes. The principles described herein may be extended to the widest range of methods and apparatus for simulation, including digital and analog circuits, as well as mixed signal circuits, at any suitable level of abstraction.
The data pipeline circuit 200 implements a chain of operations. The pipeline includes a plurality of data processing elements 202, 204, 206, 208 connected in series so that the output of one element is the input of the next element. The elements 202, 204, 206, 208 of the data pipeline circuit 200 may themselves be other logic blocks, memory, processors or analog functions. The constituent elements 202, 204, 206, 208 of the data pipeline 200 are chosen to provide the desired functionality for the data pipeline 200.
The data pipeline 200 is coupled with a verification input process 210. The verification input process 210 provides input signals directly to the deeply embedded computational element 214. These input signals are outputs of the verification input process 210 and are produced in response to input signals provided to the verification input process 210. Again, the illustration is intended to be completely general. Any number of input processes may be associated with testing the deeply embedded computational element 204. The input processes may be relatively simple, such as a circuit input node provided directly to the data pipeline 200, or may be very complicated with substantial logic and timing circuitry.
The data pipeline 200 is further coupled with the output process 212. The output process 212 receives as input signals the output signals produced by the deeply embedded computational element 214 being verified. Each respective output process produces an output signal or function in response to the input signal received from the computational element 214 under test.
An embedded block such as the computational element 214 is buried deep within the data processing element 204 of the pipeline circuit 200. It is relatively difficult to verify operation of the deeply embedded computational element 214 using the primary inputs to the pipeline circuit 200. The input signals to the data pipeline 200 may be manipulated so as to create the desired input signals to the deeply embedded computational element 214. With the desired inputs in place the primary output 220 of the data pipeline circuit 200 could be monitored. If the output signal is correct or as-expected, then the deeply embedded computational element 214 may be considered verified for the particular input condition being tested. However, because inputs to the data pipeline 200 may not directly control the input signals to the deeply embedded computational element 214, obtaining the desired inputs may, be time consuming, difficult or even impossible. The outputs of the deeply embedded computational element 214 also must pass through several additional data processing stages before being visible outside of the pipeline circuit 200. If there is an error in the deeply embedded computational element 214, these additional processing stages can easily obscure the exact nature of the failure. The following discussion discloses method and apparatus for testing and verifying an embedded block such as the deeply embedded computational element 214 shown in FIG. 2.
FIG. 3 is a block diagram of a circuit 300 to be tested. The circuit 300 includes a state machine 302, a multiplexer 304, a memory 306, multiplexers 308, 310, 312, a less-than 512 selectable inversion logic 314, a register 316, a multiplier 318, a divider 320, a multiplexer 322, a saturating adder 324, a register 326, multiplexers 328, 330, 332 and a first-in, first-out circuit (FIFO) 334. Verification of the circuit 300 is intended to be exemplary of the techniques described herein.
The circuit 300 of FIG. 3 may be considered a color plane adjust (CPA) circuit for use in a color scanner. The CPA circuit is part of an image correction and enhancement module which improves certain features of a graphical or textual image on a page scanned by a scanner which incorporates the module. When scanning color documents, a scanner produces a signal encoded with RGB color model information. An image correction device makes necessary corrections to the image data and stores the corrected data in memory. The stored data is subsequently passed to an image enhancement device. The image enhancement device is a pipeline and includes a color space conversion data processing stage which converts the image data from RGB color model information to YCbCr color space information. YCbCr image data is then passed to the color plane adjustment data processing stage illustrated in FIG. 3.
The CPA circuit provides correction for data produced when a black and white document is scanned by the color scanner. In such a case, the scanner detects some color erroneously. As a result, the data arriving at the CPA circuit has some color elements which are objectionable. The CPA circuit accordingly removes color information from the data. The YCbCr data is well-adapted to this process. The CPA circuit is followed by several other data processing stages that complete the image enhancement pipeline.
The color plane adjustment circuit of FIG. 3 includes two deeply embedded logic circuits, the less-than 512 selectable inversion circuit 314 and the saturating adder 324. Thus, the input to the less-than 512 circuit 314 must flow through pipeline stages prior to the CPA circuit, and finally through memory 306 and multiplexers 308 and 310 before reaching the less-than 512 selectable inversion circuit 314. The variability of this approach makes reliable verification of the less-than 512 selectable inversion circuit 314 difficult. The inputs to the less-than 512 circuit 314 are not directly available. To set the inputs to a value, the circuitry from the prior pipeline stages as well as the CPA circuitry that precedes the less-than 512 circuit 314 must be considered and its effect on input data analyzed.
The saturating adder 324 faces similar challenges in having its inputs set to desired values to verify its proper function. The saturating adder 324 has a first input provided from multiplexer 322 which may be selected from the pipeline circuit including the less-than 512 circuit 314, the register 316, the multiplier 318 and the divider 320. The saturating adder 324 has a second input coupled to the multiplexer 312 and selected from two of the data inputs to the CPA data processing stage. Again, the inputs to the saturating adder 324 are not directly available for manipulation by a circuit simulator or other test device. The saturating adder 324 has two inputs labeled aim and aip respectively in FIG. 3. Input signal aim is an 8-bit value and input signal aip is an 11-bit value in this example. The input value aim is selected by multiplexer 322 between the output signal from multiplexer 308 and the output of the divider 320. The output signal from the multiplexer 308, in turn, is selected from two signals produced by the memory 306.
The circuit 300 may be modeled using a software code. Various modeling techniques are available, but one effective modeling technique uses hardware description language (HDL). HDL permits formal description of electronic circuits. It can describe the operation and design of the circuit. HDL can also control tests to verify the circuit's operation by means of simulation. HDL provides a standard text-based expression of the temporal behavior and/or spatial circuit structure of an electronic system. HDL syntax and semantics include explicit notations for expressing time and concurrency which are the primary attributes of hardware. One example of a suitable HDL is Verilog.
Essential to HDL design is the ability to simulate HDL programs. An HDL program may be tested using a program called simulator. The simulator maintains a resettable “clock”, similar to the real clock of a digital device, and allows the designer to print out the values of various registers over time in order to debug the code. The simulator may be run in conjunction with a data processing system such as a personal computer.
An example of Verilog computer program code that may be used to test the circuit 300 of FIG. 3 is shown below.












//////////////////////////////////////////////////////////////


‘include “cpa_reg_defines.h”


//////////////////////////////////////////////////////////////


‘define CBI_I tb_top.CBI_I0


‘define CBI_T tb_top.CBI_T0


‘define CPA_PATH tb_top.CPA


 task cycle_adder (input reg signed [7:0] A,


         input reg signed [10:0] B,


         input reg[9:0] C);


 begin


  force tb_top.CPA.aim = A;


  force tb_top.CPA.aip = B;


  @ (posedge Clk);


   if (tb_top.CPA.sadd != C)


   $display(“ERROR: exp:%d act:%d at time %t\n”, C,


tb_top.CPA.sadd,$time);


  @ (posedge Clk);


  release tb_top.CPA.aim;


  release tb_top.CPA.aip;


 end


 endtask


 initial


 begin


  @ (posedge nReset);


  waitCycles(10);


  //------------------------


  // test the saturating adder


  //  adder A input: max:127 min:−128


  //  adder B input: max: 1023 min:−1024


  //  adder output: max:1023 min:0


  //------------------------


  $display(“Testing Saturating Adder\n”);









  cycle_adder( 8′sd022,
11′d033, 10′d055);
// simple


  cycle_adder( 8′sd123,
11′d321, 10′d444);
// simple


  cycle_adder( 8′sd1,
11′d1021, 10′d1022);
// one less than max


  cycle_adder( 8′sd2,
11′d1021, 10′d1023);
// max


  cycle_adder( 8′sd3,
11′d1021, 10′d1023);
// saturated, max




value now


  cycle_adder( 84′sd127,
11′d1023, 10′d1023);
// super-saturated,




max value now


  cycle_adder(−8′sd3,
11′d1023, 10′d1020);
// try a negative




number


  cycle_adder(−8′sd128,
11′d129, 10′d1);
// one more than 




min


  cycle_adder(−8′sd128,
11′d128, 10′d0);
// min


  cycle_adder(−8′sd128,
11′d127, 10′d0);
// saturated, min




value now


  cycle_adder( 8′sd0,
11′d0, 10′d0);
// saturated, min




value now


  cycle_adder(−8′sd1,
11′d0, 10′d0);
// saturated, min




value now







   $display(“Ending Simulation @%0t\n”, $time);


   $finish;


 end









In particular, the portion of the computer program code beginning at “task cycle_adder” defines a Verilog task or subroutine for verifying operation of the saturating adder 324 of FIG. 3. Variable values may be passed to the subroutine. This task has three inputs: an 8 bit signed variable A, an 11 bit signed variable B and a 10 bit unsigned variable C. For simulating the operation of the saturating adder 324, the variable A corresponds to the first input, labeled aim in FIG. 3, the variable B corresponds to the second input, labeled aip in FIG. 3, and the variable C corresponds to an expected value C, labeled sadd in FIG. 3. The saturating adder 324 adds the values at the inputs aim and aip. However, if the sum exceeds the maximum value of the adder (1023 in the illustrated case), the output value is limited to the maximum value. If the sum is less than zero, the output value is limited to zero. Using the methodology for verification of deeply embedded computation elements, described herein, provides a convenient means to verify that the saturation feature of the adder is working correctly.
The computer program code illustrated above makes use of a feature provided by some hardware design languages to set an internal node to a predetermined value. The Verilog code above includes the command:

    
    
        force tb_top.CPA.aim=A;
    
    


Verilog includes a command called “force” which temporarily fixes the specified circuit node to the specified value during a circuit simulation. In this example, the input aim is forced to the input value A passed to the subroutine. Forcing the inputs of a portion of circuit such as the saturating adder causes the inputs to be assigned to the forced values. This forcing occurs independently of other operation of the simulation. Thus, if the simulation is operating on a processing system and the operation of the total circuit drives the node aim to a value of 12, for example, when the force command is used as shown above and the variable A has the logical value of 23, the input to the adder aim will have the value 23. The simulated value aim driven by multiplexer 322 is ignored in favor of the forced value.
Similarly, the Verilog code above includes the command

    
    
        force tb_top.CPA.aip=B;
    
    


This command operates to force the second input, aip, of the saturating adder to the value of the input variable B. Regardless of the simulated value of the input aip produced by the Verilog simulation, the force command sets the input to the same value as passed to the subroutine in the variable B.
In the exemplary software code above, the two “force” commands are followed by a synchronizing command:

    
    
        @ (posedge Clk);
    
    


This allows time to pass in the simulation and for the forced inputs A and B to propagate through saturating adder 324.
The output signal of the saturating adder is then tested by comparing the result produced by the adder with an expected output value. The expected value is passed to the subroutine “task cycle_adder” as variable C. When the subroutine is called, each of variables A, B and C are specified in the subroutine call. In the circuit diagram of FIG. 3, it can be seen that the output of the saturating adder is labeled sadd. Thus, the subroutine makes a comparison set by the command

    
    
        if (tb_top.CPA.sadd !=C)
        
            $display(“ERROR: exp:% d act:% d at time % t\n”, C, tb_top.CPA.sadd,$time);
        
        
    
    


That is, if the value of output sadd is not equal to the value of C, the software code calls for the display of an error message along with identifying information such as the clock time at which the error occurred. If an error occurs, the error message may be used to debug the design of the saturating adder. If no error occurs, the design of the saturating adder may be considered verified.
After testing the output value of the adder against the expected value, the software code above releases the nodes which had previously been forced to the test values.

    
    
        release tb_top.CPA.aim;
        release tb_top.CPA.aip;
    
    


In Verilog, the release command is a counterpart to the force command and generally follows use of the force command. Whereas the force command caused a signal on a node to have the specified value without regard to the operation of the remainder of the circuit, the release command takes away the “forcing” function and allows the signal value to go to its value as set by the remainder of the circuit.
Following definition of the subroutine which verifies the operation of the saturating adder above are several exemplary calls to that subroutine. The subroutine calls are in the form cycle_adder(A, B, C), where A and B are the addends to the saturating adder, corresponding to inputs labeled aim and aip in FIG. 3. C is the expected output value to be compared with the output value produced by the modeled saturating adder.
As indicated in the software code above, the maximum permitted value for outputs from this adder is 1023; the minimum permitted value is 0. Any value outside this range is an error. Any value that does not match the expected value is an error.
Thus in the first test example, a subroutine call is specified:

    
    
        cycle_adder(8′sd022, 11′d033, 10′d055);
    
    


Input aim is provided with the value 22; input aip is provided with the value 33. The expected output value is 55. In a second example, the following subroutine call is specified:

    
    
        cycle_adder(8′sd123, 11′d321, 10′d444);
    
    


In this example, input aim is set to 123 and input aip is set to 321, with the expected result specified as 444. The next several examples verify values around the critical function of saturation. The first test example is

    
    
        cycle_adder(8′sd1, 11′d1021, 10′d1022);
    
    


In this test example, adding 1 and 1021 should produce a value one less than the maximum permitted value. The second test example is

    
    
        cycle_adder(8′sd2, 11′d1021, 10′d1023);
    
    


In this test example, adding 1 to 1021 produces 1023, which is the maximum permitted value. The third test example is

    
    
        cycle_adder(8′sd3, 11′d1021, 10′d1023);
    
    


In this test example, adding 3 to 1021 produces 1024. However, the saturating adder should saturate at the maximum permitted value, 1023, which is the value passed to the subroutine in the variable C. The next test example is

    
    
        cycle_adder(8′sd127, 11′d1023, 10′d1023);
    
    


In this example, the saturating adder is “super saturated,” meaning the input values are set to their maximum value. Again, the maximum permitted value of 1023 is passed in the variable C to be compared with the value produced by the saturating adder.
The next several test examples verify operation of the saturating adder when passed negative values as inputs. The next test example is

    
    
        cycle_adder(−8′sd3, 11′d1023, 10′d1020);
    
    


Here, the input aim is set to the value −3 and the input aip is set to the value 1023. The expected result is set to the value 1020. The next test example is

    
    
        cycle_adder(−8′sd128, 11′d129, 10′d1);
    
    


In this test example, the input aim is set to −128 and the input aip is set to 129. The expected output value is 1, or one more than the minimum permitted value to be output from the saturating adder. In the next test example,

    
    
        cycle_adder(−8′sd128, 11′d128, 10′d0);
    
    


input aim is set to the value −128 and input aip is set to the value 128. The expected result is 0. This tests the accuracy of the saturating adder to produce the minimum permitted value. In the next test example,

    
    
        cycle_adder(−8′sd128, 11′d127, 10′d0);
    
    


the input aim is set to −128 and the input aip is set to 127. The correct value is −1 but that exceeds the minimum permitted value of 0, so the expected output value is set to 0, the saturated value. In the next example,

    
    
        cycle_adder(8′sd0, 11′d0, 10′d0);
    
    


0 and 0 are added at inputs aim and aip and an expected value of 0 is tested. In the final example above,

    
    
        cycle_adder(−8′sd1, 11′d0, 10′d0);
    
    


−1 and 0 are added at inputs aim and aip and an expected saturated value of 0 is tested.
The saturating adder of FIG. 3 and the software test code above are intended to be exemplary only. Other deeply embedded circuits, such as the less-than 512 circuit 314 of FIG. 3, may be tested in accordance with this method. The test examples for other such circuits will be tailored to match the performance or design requirements of such circuits. For example, the saturating adder of the above example had a design requirement of accurate addition of two input values plus saturation of the output at the maximum permitted value or the minimum permitted value. The test examples were chosen to test operation of the saturation adder around these design requirements.
FIG. 4 is a flow diagram illustrating a verification method for a circuit including a deeply embedded computational element or block. The method begins at block 400. At block 402, the hardware description language for the circuit is tested. The circuit is simulated using HDL such as Verilog.
Following verification of the overall circuit operation, individual blocks may be verified. In particular, deeply embedded blocks having inputs and/or outputs which are not directly accessible in the circuit simulation need to be verified for correct operation. Thus in FIG. 4, a looping operation begins at block 404 in which each such embedded block is selected for analysis. At block 406, one or more inputs to the selected embedded block are set to test values. In an example using Verilog hardware design language, the “force” function may be used to establish input nodes at selected values independent of other processing in the circuit. The simulation is then processed, block 408.
At block 410, the output value from the simulation is compared with an expected value. If the expected value and the simulated value do not match, at block 412, an error indication is produced. Otherwise, at block 414, it is determined if there are more test values. The number of test values may be determined in any suitable manner. In some examples, the test values may be chosen to verify particular design features or goals of the embedded circuit block. In other examples, all possible test values may be processed to confirm operation.
If there are more test values, control returns to block 406 where the inputs are set to the new test values. The loop including blocks 406, 408, 410, 412 and 414 continues until all test values have been processed. At block 416, it is determined if there are more embedded blocks to test. If so, control returns to block 404 and the process of testing the embedded block using predetermined test values begins for the new block. Otherwise, the method ends at block 418.
Referring to FIG. 5, an illustrative embodiment of a general computer system is shown and is designated 500. This computer system 500 is suitable for performing the simulations described herein to verify operation of a logic circuit including one or more deeply embedded computational elements. To that end, the computer system 500 may operate in conjunction with software program codes such as hardware description language. Verilog HDL is an example of one such hardware description language.
The computer system 500 can include a set of instructions that can be executed to cause the computer system 500 to perform any one or more of the methods or computer based functions disclosed herein. The computer system 500 may operate as a standalone device or may be connected, e.g., using a network, to other computer systems or peripheral devices.
In a networked deployment, the computer system may operate in the capacity of a server or as a client user computer in a server-client user network environment, or as a peer computer system in a peer-to-peer (or distributed) network environment. The computer system 500 can also be implemented as or incorporated into various devices, such as a personal computer (PC), a tablet PC, a set-top box (STB), a personal digital assistant (PDA), a mobile device, a palmtop computer, a laptop computer, a desktop computer, or any other machine capable of executing a set of instructions (sequential or otherwise) that specify actions to be taken by that machine. In a particular embodiment, the computer system 500 can be implemented using electronic devices that provide voice, video or data communication. Further, while a single computer system 500 is illustrated, the term “system” shall also be taken to include any collection of systems or sub-systems that individually or jointly execute a set, or multiple sets, of instructions to perform one or more computer functions.
As illustrated in FIG. 5, the computer system 500 may include a processor 502, e.g., a central processing unit (CPU), a graphics processing unit (GPU), or both. Moreover, the computer system 500 can include a main memory 504 and a static memory 506 that can communicate with each other via a bus 508. As shown, the computer system 500 may further include a video display unit 510, such as a liquid crystal display (LCD), an organic light emitting diode (OLED), a flat panel display, a solid state display, or a cathode ray tube (CRT). Additionally, the computer system 500 may include an input device 512, such as a keyboard, and a cursor control device 514, such as a mouse. The computer system 500 can also include a disk drive unit 516, and a network interface device 520.
In a particular embodiment, as depicted in FIG. 5, the disk drive unit 516 may include a computer-readable medium 522 in which one or more sets of instructions 524, e.g. software, can be embedded. Further, the instructions 524 may embody one or more of the methods or logic as described herein. In a particular embodiment, the instructions 524 may reside completely, or at least partially, within the main memory 504, the static memory 506, and/or within the processor 502 during execution by the computer system 500. The main memory 504 and the processor 502 also may include computer-readable media.
In an alternative embodiment, dedicated hardware implementations, such as application specific integrated circuits, programmable logic arrays and other hardware devices, can be constructed to implement an HDL simulator accelerator that perform one or more of the methods described herein. Applications that may include the apparatus and systems of various embodiments can broadly include a variety of electronic and computer systems. One or more embodiments described herein may implement functions using two or more specific interconnected hardware modules or devices with related control and data signals that can be communicated between and through the modules, or as portions of an application-specific integrated circuit. Accordingly, the present system encompasses software, firmware, and hardware implementations.
In accordance with various embodiments of the present disclosure, the methods described herein may be implemented by software programs executable by a computer system. Further, in an exemplary, non-limited embodiment, implementations can include distributed processing, component/object distributed processing, and parallel processing. Alternatively, virtual computer system processing can be constructed to implement one or more of the methods or functionality as described herein.
The present disclosure contemplates a computer-readable medium that includes instructions 524 or receives and executes instructions 524 responsive to a propagated signal, so that a device connected to a network 526 can communicate voice, video or data over the network 526. Further, the instructions 524 may be transmitted or received over the network 526 via the network interface deviCe 520.
While the computer-readable medium is shown to be a single medium, the term “computer-readable medium” includes a single medium or multiple media, such as a centralized or distributed database, and/or associated caches and servers that store one or more sets of instructions. The term “computer-readable medium” shall also include any medium that is capable of storing, encoding or carrying a set of instructions for execution by a processor or that cause a computer system to perform any one or more of the methods or operations disclosed herein.
In a particular non-limiting, exemplary embodiment, the computer-readable medium can include a solid-state memory such as a memory card or other package that houses one or more non-volatile read-only memories. Further, the computer-readable medium can be a random access memory or other volatile re-writable memory. Additionally, the computer-readable medium can include a magneto-optical or optical medium, such as a disk or tapes or other storage device. A digital file attachment to an e-mail or other self-contained information archive or set of archives may be considered a distribution medium that is equivalent to a tangible storage medium. Accordingly, the disclosure is considered to include any one or more of a computer-readable medium or a distribution medium and other equivalents and successor media, in which data or instructions may be stored.
The illustrations of the embodiments described herein are intended to provide a general understanding of the structure of the various embodiments. The illustrations are not intended to serve as a complete description of all of the elements and features of apparatus and systems that utilize the structures or methods described herein. Many other embodiments may be apparent to those of skill in the art upon reviewing the disclosure. Other embodiments may be utilized and derived from the disclosure, such that structural and logical substitutions and changes may be made without departing from the scope of the disclosure. Additionally, the illustrations are merely representational and may not be drawn to scale. Certain proportions within the illustrations may be exaggerated, while other proportions may be minimized. Accordingly, the disclosure and the figures are to be regarded as illustrative rather than restrictive.
It is intended that the foregoing detailed description be understood as an illustration of selected forms that the invention can take and not as a definition of the invention. It is only the following claims, including all equivalents, that are intended to define the scope of this invention.

## Claims

1. A circuit verification method for a deeply embedded portion of a logic pipeline circuit, the method comprising:
accessing a first hardware description language (HDL) code representative of the logic pipeline circuit, wherein one or more inputs of the deeply embedded portion are directly inaccessible to the first HDL code;
executing the first HDL code to simulate operation of the logic pipeline circuit;
for the deeply embedded portion of the logic pipeline circuit, accessing a second HDL code representative of the embedded portion, the second HDL code having direct access to the one or more inputs of the deeply embedded portion;
forcing, with a processing device, the one or more inputs of the deeply embedded portion to one or more known values using the second HDL code;
receiving, by the processing device, an output signal from the deeply embedded portion of the logic pipeline circuit, the output signal being based on the forced inputs;
comparing, with the processing device, the received output signal with an expected value; and
verifying, based on the comparison of the received output signal and the expected value, operation of the deeply embedded portion,
wherein the verification of the operation of the deeply embedded portion is independent of an operation of another portion of the logic circuit.

2. The circuit verification method of claim 1 wherein verifying operation of the deeply embedded portion comprises:
testing outputs of the deeply embedded portion produced by the second HDL code against expected values of the deeply embedded portion.

3. The circuit verification method of claim 1 further comprising:
after verifying the operation of the embedded portion, releasing the inputs of the deeply embedded portion.

4. The circuit verification method of claim 3 wherein forcing the inputs of the deeply embedded portion to the one or more known values causes the inputs to be logically assigned to the one or more known values independent of other operation of the processing device and the first and second HDL codes to verify the logic pipeline circuit, and
wherein releasing the inputs of the deeply embedded portion allows values of the inputs to be controlled by operation of the processing device and the first and second HDL codes to verify the logic pipeline circuit.

5. The circuit verification method of claim 1 wherein verifying the operation of the deeply embedded portion comprises: operating the processing device to compare an output signal produced by operating in conjunction with the second HDL code with an expected output for a known value.

6. The circuit verification method of claim 1 wherein verifying the operation of the deeply embedded portion comprises:
operating the processing device in conjunction with the second HDL code;
setting a first input of the deeply embedded portion to a first critical value;
setting a second input of the deeply embedded portion to a second critical value;
comparing a result generated by the deeply embedded portion based on the first critical value and the second critical value with an expected output value; and
producing an error indication if the result does not match an expected output value.

7. The circuit verification method of claim 1, further comprising:
executing the first HDL code to simulate operation of the logic pipeline circuit to indirectly generate a simulated input to the deeply embedded portion when executing the first HDL code,
wherein forcing, with the processing device, the one or more inputs of the deeply embedded portion to one or more known values comprises forcing the one or more inputs of the deeply embedded portion to the one or more known values while executing the first HDL code, and
wherein the deeply embedded portion ignores the indirectly generated simulated input in favor of the forced one or more known values.

8. A circuit verification method for a deeply embedded portion of a logic pipeline circuit, the method comprising:
(a) operating a first simulator representative of operation of the logic pipeline circuit, wherein one or more inputs to the deeply embedded portion are directly inaccessible to the simulator;
(b) for a deeply embedded portion of the logic pipeline circuit, operating a second simulator, the second simulator having direct access to the one or more inputs, wherein operating the second simulator comprises:
(b1) forcing the one or more inputs of the certain block deeply embedded portion to a test value;
(b2) comparing an output value of the deeply embedded portion to an expected value, the output value being based on the inputs forced to the test value;
(b3) when the output value does not match an expected value, producing an error indication;
(b4) repeating (b1) through (b3) while there are additional test values for the inputs of certain blocks,

wherein (b1) through (b3) are performed independent of an operation of another portion of the logic pipeline circuit.

9. The circuit verification method of claim 8 wherein operating the simulator comprises operating a processing system in conjunction with a hardware description language code which models the logic pipeline circuit.

10. The circuit verification method of claim 9 wherein the hardware description language code is arranged to simulate performance of the logic pipeline circuit in response to specified input values to the logic pipeline circuit that produce output values indicative of the output of the logic pipeline circuit.

11. The circuit verification method of claim 10 wherein forcing an input of the certain block to the test value comprises:
when operating the simulator, establishing the one or more inputs of the deeply embedded portion at the test value without regard to a value produced for the input of the deeply embedded portion by operation of the simulator in response to other conditions of the logic pipeline circuit.

12. The circuit verification method of claim 8 wherein operating the simulator comprises:
calling one or more subroutines which model the deeply embedded portion of the logic pipeline circuit; and passing the test value to the one or more subroutines for use in modeling the deeply embedded portion.

13. The circuit verification method of claim 12 wherein operating the simulator further comprises: passing the expected value to the one or more subroutines, the expected value corresponding to a resulting value expected to be produced by the deeply embedded portion of the logic pipeline circuit when the test value is provided to the one or more subroutines.

14. A circuit simulator comprising:
a processor responsive to instructions and data;
a memory operatively coupled with the processor to store the instructions and the data used by the processor; and
first simulation code stored in the memory and configured to control the processor to model a logic pipeline circuit provided with first input values to the pipeline circuit, the first simulation code not having direct access to one or more inputs of a deeply embedded portion of the logic pipeline circuit, the first simulation code causing the processor to:
compare output values produced by the modeled logic circuit based on the input values with expected simulation values of the modeled logic circuit,
produce an error indication when the output values do not match the expected simulation values,

second simulation code stored in the memory and configured to control the processor to model the deeply embedded portion of the logic pipeline circuit with second input values to the deeply embedded portion, the second simulation code having direct access to the one or more inputs of the deeply embedded portion, the second simulation code causing the processor to:
for the deeply embedded block portion of the modeled logic pipeline circuit, force the one or more inputs of the embedded block to a test value,
compare a test output value of the deeply embedded portion to an expected test value of the deeply embedded portion, the test output value being based on the one or more inputs forced to the test value, and produce an error indication when the test output value does not match the expected test value,

wherein forcing the one or more inputs of the embedded deeply embedded portion to the test value, comparing the test output value of the embedded block to the expected test value of the deeply embedded portion, and producing the error indication when the test output value does not match the expected test value are simulated independent of a simulated operation for another portion of the modeled logic pipeline circuit.

15. The circuit simulator of claim 14 wherein the second simulation code comprises code to establish the input of the deeply embedded portion at the test value without regard to a value produced for the input of the deeply embedded portion by operation of the circuit simulator in response to other conditions of the logic pipeline circuit.

16. The circuit simulator of claim 14 wherein the second simulation code comprises:
code defining one or more subroutines which model the deeply embedded portion of the logic pipeline circuit;
code to pass the test value to the one or more subroutines for use in modeling the deeply embedded portion; and
code to pass the expected test value to the one or more subroutines, the expected test value corresponding to a resulting value expected to be produced by the deeply embedded portion of the logic pipeline circuit when the test value is provided to the one or more subroutines.

17. The circuit simulator of claim 14, wherein the second simulation code comprises a portion of the first simulation code.

18. A circuit simulator comprising:
a memory to store instructions and data;
first simulation code stored in the memory and configured to control a processor to model a logic pipeline circuit provided with first input values to the logic pipeline circuit, the first input values being directly inaccessible to one or more inputs of a deeply embedded portion of logic pipeline circuit, the first simulation code causing the processor to:
compare output values produced by the modeled logic pipeline circuit based on the first input values to the logic pipeline circuit with expected simulation values of the modeled logic pipeline circuit,
produce an error indication when the output values do not match the expected simulation values,

second simulation code stored in the memory and configured to control the process to model the deeply embedded portion of the modeled logic pipeline circuit with second input values being directly provided to the one or more inputs to the deeply embedded portion, the second simulation code causing the processor to:
force the one or more inputs of the deeply embedded portion to a test value,
compare a test output value of the modeled deeply embedded portion to an expected test value of the modeled deeply embedded portion, the test output value being based on the one or more inputs forced to the test value, and

produce an error indication when the test output value does not match the expected test value; and
processing means responsive to the instructions and the data including the simulation code for simulating operation of the logic pipeline circuit,
wherein forcing the one or more inputs of the modeled deeply embedded portion to the test value, comparing the test output value of the modeled deeply embedded block portion to the expected test value of the modeled deeply embedded portion, and producing the error indication when the test output value does not match the expected test value are simulated independent of a simulated operation for another portion of the modeled logic pipeline circuit.

19. A circuit simulator comprising:
a processor responsive to instructions and data; and memory means operatively coupled with the processor for storing the instructions and the data used by the processor and for storing first simulation code and second simulation code, the first simulation code configured to control the processor to model a logic pipeline circuit provided with first input values to the logic pipeline circuit, the first input values being directly inaccessible to one or more inputs of a deeply embedded block of logic pipeline circuit, the first simulation code causing the processor to:
compare output values produced by the modeled logic pipeline circuit based on the first input values with expected simulation values of the modeled logic pipeline circuit,
produce an error indication when the output values do not match the expected simulation values,

the second simulation code configured to control the processor to model the deeply embedded block of the logic pipeline circuit with second input values to the modeled deeply embedded block, the second input values being directly accessible to the one or more inputs of the modeled deeply embedded block, the second simulation code causing the processor to:
force the one or more inputs of the modeled deeply embedded block to a test value,

compare a test output value of the modeled deeply embedded block to an expected test value of the modeled deeply embedded block, the test output value being based on the input forced to the test value, and
produce an error indication when the test output value does not match the expected test value,
wherein forcing the input of the modeled deeply embedded block to the test value, comparing the test output value of the embedded block to the expected test value of the modeled deeply embedded block, and producing an error indication when the test output value does not match the expected test value are simulated independent of a simulated operation for another portion of the modeled logic pipeline circuit.

20. A computer readable storage medium storing simulation code, the simulation code comprising:
first instructions for modeling a logic pipeline circuit provided with first input values, the first input values being directly inaccessible to one or more inputs of a deeply embedded block of the logic pipeline circuit, the first instructions causing a processor to:
compare output values produced by the modeled logic pipeline circuit based on the first input values with expected simulation values of the modeled logic circuit;
produce an error indication when the output values do not match the expected simulation values;

second instructions for modeling the deeply embedded block of the logic pipeline with second input values to the deeply embedded block, the second input values being directly accessible to the one or more inputs of the deeply embedded block of the logic pipeline circuit, the second instructions causing the processor to:
force the one or more inputs of the modeled deeply embedded block of the modeled logic pipeline circuit to a test value;

compare a test output value of the modeled deeply embedded block to an expected test value of the deeply embedded block, the test output value being based on input forced to the test value; and
produce an error indication when the test output value does not match the expected test value,
wherein forcing the input of the modeled deeply embedded block to the test value, comparing the test output value of the modeled deeply embedded block to the expected test value of the modeled deeply embedded block, and producing an error indication when the test output value does not match the expected test value are simulated independent of a simulated operation for another portion of the modeled logic pipeline circuit.