Hardware simulation acceleration platform-oriented power consumption waveform capturing device and application method thereof
Patent Information
- Application Number
- CN202410803491.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-03
AI Technical Summary
The fast flip rate calculation FTC process of the existing hardware simulation acceleration platform has flaws. It requires knowing the waveform position information in advance and is time-consuming. It is difficult to apply to complex chips and dynamic peripheral environments, and the simulation efficiency is low.
Design a power consumption waveform capture device for hardware simulation acceleration platform, including toggle rate counter array, dynamic data capture array, waveform data buffer, power consumption data buffer and power consumption data export controller. Peak power can be captured through one simulation The waveform data of power consumption and power consumption slope can be processed online and exported.
It enables rapid evaluation of power consumption in any simulation environment, saves simulation time, and improves simulation efficiency. It is especially suitable for complex chip and dynamic peripheral scenarios.
Smart Images

Figure CN118586333A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuit design verification, and in particular to a power consumption waveform capture device for a hardware simulation acceleration platform and an application method thereof. Background Art
[0002] Power consumption, together with performance and area (PPA: Performance Power and Area), are three important evaluation indicators that are weighed when designing integrated circuits. Power consumption is crucial for integrated circuits, especially embedded chips. Commonly used power consumption information includes peak power consumption, average power consumption, typical power consumption (i.e., average power consumption in typical application scenarios), and power consumption slope. Among them, average power consumption and typical power consumption can be achieved through scientific data sampling and averaging. The choice of scenario has little effect on the power consumption evaluation result; while the evaluation of peak power consumption and power consumption slope is closely related to the choice of scenario. The present invention is mainly used for the evaluation of peak power consumption and power consumption slope. Of course, the present invention can also be applied to the evaluation of average power consumption and typical power consumption.
[0003] At present, the main power consumption analysis methods are divided into forward calculation and reverse deduction. Among them, in the forward deduction method, the flip rate information of the target scenario is obtained by a certain method, and then the specific power consumption value is calculated by special power consumption calculation software such as PowerArtist and Joules; the reverse deduction is based on the actual power consumption value of the existing chip and various design information, and various detailed design information of the design to be verified (DUT: Design Under Test), and the power consumption value of the DUT is deduced by geometric deduction. In the forward deduction method, the flip rate can be obtained by setting an empirical value, or by capturing multiple corresponding waveforms of the target scenario. These methods have their own strengths and are currently used in the industry.
[0004] In the method of calculating the flip rate based on the waveform and then calculating the power consumption value, the accuracy and efficiency of the waveform file capture directly affect the accuracy and efficiency of the power consumption evaluation results. In some scenarios, the full-cycle waveform can be obtained by simplifying the test stimulus, and the power consumption calculation software can calculate the peak power consumption, typical power consumption, average power consumption and other power consumption values. This method depends on the scientificity and efficiency of the test stimulus, and requires a clear understanding of the target scenario of the chip operation and the operation of the target design in each scenario, which places extremely high demands on designers. For complex integrated circuits such as microprocessors, this method is extremely challenging. Therefore, it is necessary to use a hardware simulation accelerator. During the simulation of various target scenarios, the flip rate information of the target design at each moment is calculated through the hardware resources of the hardware simulation accelerator, and then the corresponding waveform data is captured according to different requirements such as peak power consumption, typical power consumption, and average power consumption. The specific power consumption value is calculated through dedicated power consumption calculation software such as PowerArtist and Joules.
[0005] At present, Cadence's Palladium system hardware simulation accelerator provides three power consumption evaluation methods for power consumption evaluation, namely NTC (Normanl Toggle Count), WTC (Weighted Toggle Count), and FTC (Fast Toggle Count). The process of NTC is to first run to the approximate position and export the waveform near the position, then start DPA (Dynamic Power Analysis) to determine the flip rate curve corresponding to the waveform, and then the designer identifies and determines the scene (i.e. time point) corresponding to the target power consumption according to the power consumption target requirements, and gives the corresponding waveform to the power consumption calculation software to calculate the specific power consumption value. When NTC calculates the flip rate, it does not consider the impact of process information on power consumption. In WTC, before compiling, the power consumption information of standard cells, storage models, and macro models in the process library file needs to be extracted through joule. When calculating the flip rate based on the waveform, it will be converted into a weight to simulate the impact of the process on power consumption. Both NTC and WTC have two major defects. On the one hand, it is necessary to know the approximate waveform position information in advance, which is often not available in actual engineering applications. Therefore, it is necessary to capture many waveforms. When the test stimulus is large (non-directional test stimulus), it is like looking for a needle in a haystack to find the peak power consumption. On the other hand, both of them first give the waveform and then calculate the flip rate through software, which takes a huge amount of time. Therefore, Palladium provides a third mode, fast flip rate calculation FTC. The idea of this mode is to use Palladium simulation resources instead of software to calculate toggle. During the simulation process, the simulation resources calculate the toggle in real time according to the state of the DUT, and then export the toggle data to the server through TBA or SDL (Statement Description Language). Therefore, FTC can theoretically obtain toggle information of any length of time. Then add a part of the capture logic in the chip code or DRTL (Dynamic Register Transaction Level), and theoretically obtain the flip rate curve during the entire simulation time, which is convenient for designers to identify and determine the scene (i.e. time point) corresponding to the target power consumption according to the power consumption target requirements. Then, start the historical simulation, obtain the waveform at the corresponding time point, and give the corresponding waveform to your power consumption calculation software to calculate the specific power consumption value. Although FTC can obtain the flip rate curve during the entire simulation time, it needs to be run twice to capture the required waveform. This not only requires that the system simulation is time-determined (that is, the timing of the simulation on both sides is completely consistent), but also requires two simulations.This method is difficult to use when there are dynamic peripherals such as PCIE in the chip, or when there is external serial port input. This method is clumsy when the emulation time is very valuable. It needs further optimization. Summary of the invention
[0006] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a power consumption waveform capture device for a hardware simulation acceleration platform and an application method thereof are provided. The present invention aims to solve the inherent defects of the fast flip rate calculation FTC process, so that the power consumption evaluation process can be applied to any simulation environment, saving simulation timing and improving simulation efficiency.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is: A power consumption waveform capture device for a hardware simulation acceleration platform comprises a flip rate counter array, a dynamic data capture array, a waveform data buffer WDB, a power consumption data buffer PDB, a power consumption data export controller and a power consumption scenario capture component, wherein the flip rate counter array is connected to the input end of the power consumption scenario capture component, the output end of the power consumption scenario capture component is connected to the input end of the power consumption data export controller, the dynamic data capture array and the power consumption data export controller are respectively connected to the waveform data buffer WDB and the power consumption data buffer PDB for outputting captured waveform data w_load and power consumption data p_load.
[0008] Optionally, the flip rate counter array includes multiple flip rate counters TC, which are used to store the information of the number of latch flip-flops with data flipping in the user logic contained in the part or the whole of the tested design DUT specified by the user for power consumption evaluation and the logic components of the gated clock after preset weight fitting under the original clock drive of the hardware simulation acceleration platform into the corresponding flip rate counter TC; the flip rate counter array is the existing hardware logic of the hardware simulation accelerator or the auxiliary logic inserted in the tested design DUT, and when the flip rate counter array is the existing hardware logic of the hardware simulation accelerator, it includes providing compilation guidance during compilation to insert multiple flip rate counters TC for each tested design DUT specified by the user or the whole.
[0009] Optionally, the dynamic data capture array includes a plurality of dynamic data capturers DDC, each of which corresponds to a design under test DUT on a one-to-one basis and is used to record the values of all logic components of the design under test DUT in each clock cycle.
[0010] Optionally, the power consumption scenario capturing component comprises a toggle rate buffer array for caching toggle rates, and the toggle rate buffer array is a first-in-first-out queue FIFO.
[0011] In addition, the present invention also provides an application method of the aforementioned power consumption waveform capture device for hardware simulation acceleration platform, comprising: Step S101: Simulation starts; Step S102: Simulate and advance one clock cycle; Step S103: adopting a first-in-first-out update strategy to update the power consumption data buffer PDB with the data captured by the dynamic data capture device DDC of the dynamic data capture array; Step S104: determining whether the power consumption data buffer PDB overflows, if the power consumption data buffer PDB overflows, updating the waveform data buffer WDB with the overflow data of the power consumption data buffer PDB; Step S105: collecting the toggle rate through the toggle rate counter TC of the toggle rate counter array; Step S106: sending the flip rate collected by the flip rate counter TC of the flip rate counter array to the flip rate buffer array in the power consumption scenario capture component through the power consumption scenario capture component, and performing online processing on the flip rate stored in the flip rate buffer array to realize power consumption scenario capture. If a new power consumption scenario is captured, calling the power consumption data export controller to export the power consumption data in the power consumption data buffer PDB based on a preset processing scheme; Step S107: Determine whether the simulation is finished. If it is not finished, jump to step S102. Otherwise, export the debugging data in the waveform data buffer WDB, finish and exit.
[0012] Optionally, in step S106, online processing of the toggle rates stored in the toggle rate buffer array to achieve power consumption scenario capture includes: Step S201: Set the depth of the first-in first-out queue FIFO, and set the initial value of each item therein to 0; initialize the current average flip rate T_ave and the current power consumption slope T_gap of each detected object to 0; initialize the historical average flip rate T_ave' and the historical power consumption slope T_gap' of each detected object to 0; Step S202: Determine whether the simulation is finished, if so, stop and exit; otherwise, jump to step S203; Step S203: Fill the toggle rate collected by the toggle rate counter TC of the toggle rate counter array into the FIFO head of the first-in-first-out queue FIFO, and move the old data of each item in the first-in-first-out queue FIFO to the tail one by one in turn, and discard the old data of the last item in the first-in-first-out queue FIFO; Step S204: Calculate the current average flip rate T_ave and the current power consumption slope T_gap of each item in the FIFO header respectively. If the current average flip rate T_ave is greater than the historical average flip rate T_ave' and the current power consumption slope T_gap is greater than the historical power consumption slope T_gap', it is determined that a new power consumption scenario is captured; otherwise, assign the current average flip rate T_ave to the historical average flip rate T_ave' and the current power consumption slope T_gap to the historical power consumption slope T_gap', and jump to step S202.
[0013] Optionally, when setting the depth of the first-in first-out queue FIFO in step S201, the depth D_fifo of the first-in first-out queue FIFO is set to be greater than or equal to the maximum average time required for evaluating the functional power consumption and the power consumption slope.
[0014] Optionally, after capturing the new power consumption scenario in step S106, it also includes: recording the record information of the new power consumption scenario, wherein the record information of the new power consumption scenario includes the simulation time Time_peak and the toggle rate Toggle when the new power consumption scenario occurs, and recording the record information of the new power consumption scenario in a text on the server.
[0015] Optionally, when the power consumption data export controller is called in step S106 to export the power consumption data in the power consumption data buffer PDB based on a preset processing scheme, the preset processing scheme includes scheme 1: Step S301: exporting the flip rate data; Step S302: Determine whether the current simulation time value is equal to Time_peak+T_power_post. If not, jump to step S107; otherwise, jump to step S303; wherein Time_peak is the time value corresponding to the peak power consumption, and T_power_post is the time length within the specified time range after the waveform slice length T_power during power consumption calculation. Step S303: Clear the waveform data buffer WDB, and update the data of the power consumption data buffer PDB to the waveform data buffer WDB; Step S304: export the power consumption data in the waveform data buffer WDB, and then jump to step S107.
[0016] Optionally, when the power consumption data export controller is called in step S106 to export the power consumption data in the power consumption data buffer PDB based on a preset processing scheme, the preset processing scheme includes scheme 2: Step S401: exporting the flip rate data; Step S402: Determine whether the current simulation time value is equal to: Time_peak + D_PDB_Logic – T_power_pre – T_power – T_power_post Whether it is established, where Time_peak is the time value corresponding to the peak power consumption, D_PDB_Logic is the number of cycles of the waveform that can be cached by the power consumption data buffer PDB, T_power_pre is the time length in the specified time range before the waveform slice length T_power when calculating the power consumption, T_power is the waveform slice length when calculating the power consumption, and T_power_post is the time length in the specified time range after the waveform slice length T_power when calculating the power consumption; if it is established, the power consumption data in the waveform data buffer WDB is exported and the process jumps to step S107.
[0017] Compared with the prior art, the present invention mainly has the following advantages: the power consumption waveform capture device for the hardware simulation acceleration platform of the present invention can obtain the power consumption evaluation process for calculating the waveform data corresponding to various target power consumption waves such as peak power consumption, average power consumption, typical power consumption, etc. through one simulation, and can realize the power consumption evaluation of capturing waveforms according to power consumption targets to calculate the flip rate, and then calculate the power consumption value, especially the power consumption evaluation of peak power consumption and power consumption slope (that is, the power consumption change speed), which solves the inherent defects of the FTC process, so that the new power consumption evaluation process can be applied to any simulation environment, and can save simulation timing and improve simulation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Schematic diagram of the device structure in an embodiment of the present invention.
[0019] Figure 2 1 is an overall working flow diagram of the device in an embodiment of the present invention.
[0020] Figure 3 4 is a flowchart of the on-line processing module of the flip rate in the embodiment of the present invention.
[0021] Legend: 1. Flip rate counter array; 2. Dynamic data capture array; 3. Waveform data buffer WDB; 4. Power consumption data buffer PDB; 5. Power consumption data export controller; 6. Power consumption scenario capture component. DETAILED DESCRIPTION
[0022] The present invention aims to provide a power consumption evaluation technology that can obtain waveform data corresponding to multiple target power consumption waves such as peak power consumption, average power consumption, typical power consumption, etc. in one simulation, so as to solve the inherent defects of the FTC process, so that the new power consumption evaluation process can be applied to any simulation environment and can save simulation time. Figure 1As shown, the power consumption waveform capture device for the hardware simulation acceleration platform of this embodiment includes a flip rate counter array 1, a dynamic data capture array 2, a waveform data buffer WDB (Waveform Data Buffer) 3, a power consumption data buffer PDB (Power Data Buffer) 4, a power consumption data export controller 5 and a power consumption scenario capture component 6, the flip rate counter array 1 is connected to the input end of the power consumption scenario capture component 6, the output end of the power consumption scenario capture component 6 is connected to the input end of the power consumption data export controller 5, the dynamic data capture array 2 and the power consumption data export controller 5 are respectively connected to the waveform data buffer WDB3 and the power consumption data buffer PDB4 for outputting the captured waveform data w_load and the power consumption data p_load.
[0023] See also Figure 1 , the flip rate counter array 1 of this embodiment includes multiple flip rate counters TC, which are used to store the information of the number of latches with data flip-flops and the logic components of the gated clock contained in the user logic of the part or the whole of the DUT under test specified by the user for power consumption evaluation after preset weight fitting in the corresponding flip rate counter TC; the flip rate counter array 1 is the existing hardware logic of the hardware simulation accelerator or the auxiliary logic inserted in the DUT under test, and when the flip rate counter array 1 is the existing hardware logic of the hardware simulation accelerator, it includes providing compilation guidance during compilation to insert multiple flip rate counters TC for each DUT under test or the whole specified by the user. In this embodiment, other components except the flip rate counter array 1 are implemented in the ASIC hardware simulation accelerator. Under the original clock drive of the hardware simulation accelerator, the flip rate counter array 1 stores the relevant information of the number of latches with data flip-flops and the gated clock and other logic components contained in the part or the whole of the DUT under power consumption evaluation specified by the user after certain weight fitting in the corresponding flip rate counter.
[0024] Dynamic data capture array 2 is used to record the values of all logic components of the DUT at each clock cycle; see Figure 1 The dynamic data capture array 2 of this embodiment includes a plurality of dynamic data capturers DDC (Dynamic Data Capture), each of which corresponds to a design under test DUT one by one and is used to record the values of all logic components of the design under test DUT in each clock cycle.
[0025] The waveform data buffer WDB3 is used to cache the waveform data in the most recent simulation time. The power consumption data buffer PDB4 is used to cache the waveform data corresponding to the target power consumption scenario. There may be debugging requirements during the power consumption evaluation process, so the normal waveform recording function should be retained, so the waveform in the last simulation time must be ensured to be stored in the waveform data buffer WDB3. In this embodiment, the normal debugging waveform first enters the power consumption data buffer PDB4, and then is updated to the waveform data buffer WDB3.
[0026] The power consumption scene capture component 6 is used to temporarily store the flip rate data within a certain time range and process it to screen out the peak power consumption or peak power consumption slope scene. Peak power consumption is mainly used to analyze the maximum power load of the DUT. In fact, it is also the average power consumption (expressed by T_ave) within a smaller time segment (assuming that n is used instead). In the power consumption evaluation process, the maximum power consumption within the simulation time range needs to be captured; the power consumption slope is mainly used for voltage drop analysis and then guides the power supply network design. In the power consumption evaluation process, it is necessary to capture the maximum power consumption difference (expressed by T_gap) within a smaller time segment (assuming that m is used instead) within the simulation time range. Whether it is a time segment represented by n or m, T_power is used uniformly in this embodiment. Whether it is the evaluation of peak power consumption or power consumption slope, the length of the time range is affected to varying degrees by parasitic / package / mainboard capacitance, design scale and other aspects. Therefore, in the power consumption evaluation process, it is often necessary to simultaneously obtain the average power consumption of multiple different time ranges (i.e., n1, n2, n3, ..., m1, m2, m3, ...) to obtain a peak power consumption range. In specific applications, the range of peak power consumption can be further narrowed according to information such as the capacitance situation, so as to obtain a more scientific peak power consumption. To achieve the above functions, the buffer in the flip rate buffer array is implemented using FIFO (First In First Out), and the depth of FIFO D_fifo can be equal to or slightly greater than the maximum average time required for functional power consumption and power consumption slope evaluation, that is, D_fifo﹥﹦Max (n1, n2, n3, ..., m1, m2, m3, ...). The power consumption scenario capture component 6 of this embodiment includes a flip rate buffer array for caching flip rates, and the flip rate buffer array is a first-in-first-out queue FIFO.
[0027] like Figure 2 As shown, this embodiment also provides an application method of the aforementioned power consumption waveform capture device for hardware simulation acceleration platform, including: Step S101: Simulation starts; Step S102: Simulate and advance a clock cycle. As an optional implementation, in this embodiment, the simulation specifically advances a clock cycle corresponding to the fastest clock of the system. Step S103: adopting a first-in-first-out update strategy to update the power consumption data buffer PDB4 with the data captured by the dynamic data capture device DDC of the dynamic data capture array 2; Step S104: determining whether the power consumption data buffer PDB4 overflows, if the power consumption data buffer PDB4 overflows, updating the waveform data buffer WDB3 with the overflow data of the power consumption data buffer PDB4; In this embodiment, the power consumption data buffer PDB4 adopts a first-in-first-out update strategy. The physical space size of the power consumption data buffer PDB4 is uniformly allocated by the simulator management software according to the design scale and simulator resource situation. In practical applications, in order to improve the efficiency of data export, the actual use of the space (defined as PDB logic in the present invention) can be dynamically set by the user. This step determines whether there is data overflow in the logical space of the power consumption data buffer PDB4. If there is data overflow in the logical space of the power consumption data buffer PDB4, if the power consumption data buffer PDB4 overflows, the overflow data of the power consumption data buffer PDB4 is updated to the waveform data buffer WDB3, and then jumps to step S105; otherwise, jumps directly to step S105 to collect and process the flip rate; the overflow data in the power consumption data buffer PDB4 is updated to the waveform data buffer WDB3. The waveform data buffer WDB3 adopts a first-in-first-out update strategy, and the redundant waveform data is directly discarded; Step S105: collecting the toggle rate through the toggle rate counter TC of the toggle rate counter array 1; Step S106: sending the flip rate collected by the flip rate counter TC of the flip rate counter array 1 to the flip rate buffer array in the power consumption scenario capture component 6 through the power consumption scenario capture component 6, and performing online processing on the flip rate stored in the flip rate buffer array to realize power consumption scenario capture. If a new power consumption scenario is captured, the power consumption data export controller 5 is called to export the power consumption data in the power consumption data buffer PDB4 based on a preset processing scheme; Step S107: Determine whether the simulation is finished. If it is not finished, jump to step S102. Otherwise, export the debugging data in the waveform data buffer WDB3, end and exit.
[0028] The power consumption scenario capture component 6 actively reads the flip rate information in all flip rate counter arrays 1, and temporarily stores it in different flip rate buffers. The number of entries in the flip rate buffer is equal to the number of DUTs involved in the power consumption evaluation. The depth of the flip rate buffer depends on the specific implementation of the power consumption scenario capture component 6. The power consumption scenario capture component 6 implements the T_power screening function, and uses a bubble-like algorithm to complete various real-time online processing of each flip rate data in the flip rate buffer to determine whether there is a new target power consumption scenario. Different flip rate processing strategies are selected according to different power consumption evaluation requirements. For example Figure 3As shown, in step S106 of this embodiment, the online processing of the flip rate stored in the flip rate buffer array to realize power consumption scene capture includes: Step S201: Set the depth of the first-in first-out queue FIFO, and set the initial value of each item therein to 0; initialize the current average flip rate T_ave and the current power consumption slope T_gap of each detected object to 0; initialize the historical average flip rate T_ave' and the historical power consumption slope T_gap' of each detected object to 0; Step S202: Determine whether the simulation is finished, if so, stop and exit; otherwise, jump to step S203; Step S203: Fill the toggle rate collected by the toggle rate counter TC of the toggle rate counter array 1 into the FIFO head of the first-in-first-out queue FIFO, and move the old data of each item in the first-in-first-out queue FIFO to the tail one by one in turn, and discard the old data of the last item in the first-in-first-out queue FIFO; Step S204: Calculate the current average flip rate T_ave and the current power consumption slope T_gap of each item in the FIFO header respectively. If the current average flip rate T_ave is greater than the historical average flip rate T_ave' and the current power consumption slope T_gap is greater than the historical power consumption slope T_gap', it is determined that a new power consumption scenario is captured; otherwise, assign the current average flip rate T_ave to the historical average flip rate T_ave' and the current power consumption slope T_gap to the historical power consumption slope T_gap', and jump to step S202.
[0029] In step S201 of this embodiment, when setting the depth of the first-in first-out queue FIFO, the depth D_fifo of the first-in first-out queue FIFO is set to be greater than or equal to the maximum average time required for evaluating the functional power consumption and the power consumption slope.
[0030] After capturing a new power consumption scenario in step S106 of this embodiment, the following further includes: recording the record information of the new power consumption scenario, wherein the record information of the new power consumption scenario includes the simulation time Time_peak and the toggle rate Toggle of the new power consumption scenario, and recording the record information of the new power consumption scenario into a text of the server. For example, as an optional implementation, the power consumption scenario information such as Time_peak and Toggle can be recorded into a text of the server by display or printf as needed.
[0031] When the power consumption assessment requirement is not considered, only the waveform data within the last few cycles need to be recorded, and the data before that will be lost. During the power consumption assessment process, the target power consumption scenario may appear at any time during the entire simulation cycle. Therefore, it is necessary to add a mechanism to temporarily export the waveform data corresponding to the target power consumption scenario recorded in the PDB. The power consumption data export controller 5 needs to control how to process the waveform data corresponding to the new target power consumption cached in the PDB based on the collected and analyzed flip rate information.
[0032] As an optional implementation, Figure 2 As shown, in step S106 of this embodiment, when the power consumption data export controller 5 is called to export the power consumption data in the power consumption data buffer PDB4 based on a preset processing scheme, the preset processing scheme includes scheme 1: Step S301: exporting the flip rate data; Step S302: Determine whether the current simulation time value is equal to Time_peak+T_power_post. If not, jump to step S107; otherwise, jump to step S303; wherein Time_peak is the time value corresponding to the peak power consumption, and T_power_post is the time length within the specified time range after the waveform slice length T_power during power consumption calculation. Step S303: Clear the waveform data buffer WDB3, and update the data of the power consumption data buffer PDB4 to the waveform data buffer WDB3; Step S304: export the power consumption data in the waveform data buffer WDB3, and then jump to step S107.
[0033] The principle of the above scheme 1 is as follows: the waveform data in the time window T_power corresponding to the maximum T_ave or T_gap up to the current simulation time has been recorded in the power consumption data buffer PDB4. However, in actual engineering applications, the waveform data within a certain time range before and after T_power is also very necessary. In this embodiment, T_power and the time window within a certain time range before and after it are represented by T_power_exp. Assuming that the waveforms in the time window before T_power (represented by T_power_pre) and the time window after T_power (represented by T_power_post) are collected, then T_power_exp=T_power_pre+T_power+T_power_post. In the application, there may be multiple T_powers, so there are also multiple T_pwer_exp. The logical space of the power consumption data buffer PDB4 must be greater than or equal to the maximum value of all T_power_exp. If the logical space size of the power consumption data buffer PDB4 meets this condition, then the waveform data of T_power_pre and T_power have been saved in the power consumption data buffer PDB4. This step ensures that the waveform of T_power_post is saved in the power consumption data buffer PDB4. Therefore, this step determines whether the current simulation time value is equal to Time_peak+T_power_post. If it is satisfied, it means that the collection of the data waveform of T_power_post has just been completed, and the temporary export of the data is executed; if it is not satisfied, it means that the collection of the data waveform of T_power_post has not been completed or has already been completed, and the operation is completed within this clock cycle. Since the new target power consumption scenario data is captured and needs to be exported, in order to reduce the difficulty of hardware implementation of the hardware simulation accelerator, the physical path for directly exporting data from the power consumption data buffer PDB4 is not set. The data in the power consumption data buffer PDB4 first enters the waveform data buffer WDB3, and then the data is exported through the physical channel for exporting data from the waveform data buffer WDB3. Therefore, this step first deletes all the waveform data for debugging recorded in the waveform data buffer WDB3, and then moves the data corresponding to the new power consumption scenario recorded in the power consumption data buffer PDB4 to the waveform data buffer WDB3 under the drive of the original clock of the hardware simulation accelerator.
[0034] As an optional implementation, Figure 2 As shown, in step S106 of this embodiment, when the power consumption data export controller 5 is called to export the power consumption data in the power consumption data buffer PDB4 based on a preset processing scheme, the preset processing scheme includes scheme 2: Step S401: exporting the flip rate data; Step S402: Determine whether the current simulation time value is equal to: Time_peak + D_PDB_Logic – T_power_pre – T_power – T_power_post Whether it is established, where Time_peak is the time value corresponding to the peak power consumption, D_PDB_Logic is the number of cycles of the waveform that can be cached by the power consumption data buffer PDB4, T_power_pre is the time length in the specified time range before the waveform slice length T_power when calculating the power consumption, T_power is the waveform slice length when calculating the power consumption, and T_power_post is the time length in the specified time range after the waveform slice length T_power when calculating the power consumption; if it is established, the power consumption data in the waveform data buffer WDB3 is exported and the process jumps to step S107.
[0035] The principle of the above-mentioned scheme 2 is as follows: Scheme 2 determines whether the current simulation time value is equal to Time_peak+D_PDB_Logic - T_power_pre-T_power-T_power_post, where D_PDB_Logic represents the number of cycles of the waveform that can be cached in the power consumption data buffer PDB4. If satisfied, it means that the data waveform of T_power_exp has just been moved from the power consumption data buffer PDB4 to the waveform data buffer WDB3, and the waveform data of the new power consumption scenario recorded in the waveform data buffer WDB3 is exported to the server to complete the temporary export of data; if not satisfied, it means that the data waveform of T_power_exp has not yet or has long been moved from the power consumption data buffer PDB4 to the waveform data buffer WDB3, and the operation is completed within this clock cycle.
[0036] In summary, this embodiment realizes real-time online processing of flip rate information, and can monitor multiple power consumption scenarios at the same time for different target power consumption requirements such as peak power consumption, average power consumption, and typical power consumption. Whether it is peak power consumption or average power consumption, it is the evaluation power consumption within a certain time range. The length of the time range is affected by many aspects such as the type of power consumption scenario, parasitic / package / mainboard capacitance, and design scale. Therefore, in the process of power consumption evaluation, it is often necessary to obtain the average power consumption within multiple different time ranges. This embodiment can simultaneously capture the maximum evaluation power consumption within multiple different time ranges, thereby improving the efficiency of power consumption evaluation. Power consumption evaluation can not only be used to evaluate the power consumption of the entire design, but also guide the layout and routing in the back-end implementation by evaluating the power consumption of each component in the design. This embodiment can simultaneously capture the power consumption of multiple design modules, thereby improving the efficiency of power consumption evaluation. In the simulation process of this embodiment, by adding an additional power consumption data buffer PDB device (PDB: Power Data Buffer), it is only used to access the waveform data required for the target power consumption. During the simulation process, according to the flip rate information processing result, its content can be updated in real time according to the actual situation, ensuring that the waveform data required for the target power consumption can be obtained after the current simulation is completed, avoiding historical simulation, and improving the efficiency of power consumption evaluation.
[0037] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A power consumption waveform capture device for a hardware simulation acceleration platform, characterized in that: The invention comprises a toggle rate counter array (1), a dynamic data capture array (2), a waveform data buffer WDB (3), a power consumption data buffer PDB (4), a power consumption data export controller (5) and a power consumption scenario capture component (6), wherein the toggle rate counter array (1) is connected to the input end of the power consumption scenario capture component (6), the output end of the power consumption scenario capture component (6) is connected to the input end of the power consumption data export controller (5), and the dynamic data capture array (2) and the power consumption data export controller (5) are respectively connected to the waveform data buffer WDB (3) and the power consumption data buffer PDB (4) for outputting captured waveform data w_load and power consumption data p_load.
2. The power consumption waveform capture device for hardware simulation acceleration platform according to claim 1, characterized in that: The flip rate counter array (1) comprises a plurality of flip rate counters TC, which are used to store the information of the number of latch flip-flops with data flipping in the user logic contained in the part or the whole of the DUT under test specified by the user for power consumption evaluation and the logic components of the gated clock in the corresponding flip rate counter TC after fitting with a preset weight under the original clock drive of the hardware simulation acceleration platform; the flip rate counter array (1) is the existing hardware logic of the hardware simulation accelerator or the auxiliary logic inserted in the DUT under test, and when the flip rate counter array (1) is the existing hardware logic of the hardware simulation accelerator, it includes providing compilation guidance during compilation to insert a plurality of flip rate counters TC for each DUT under test or the whole specified by the user.
3. The power consumption waveform capture device for hardware simulation acceleration platform according to claim 2, characterized in that: The dynamic data capture array (2) comprises a plurality of dynamic data capturers DDC, each of which corresponds to a design under test (DUT) on a one-to-one basis and is used to record the values of all logic components of the design under test (DUT) in each clock cycle.
4. The power consumption waveform capture device for hardware simulation acceleration platform according to claim 3, characterized in that: The power consumption scenario capturing component (6) comprises a toggle rate buffer array for caching the toggle rate, and the toggle rate buffer array is a first-in first-out queue FIFO.
5. An application method of the power consumption waveform capture device for hardware simulation acceleration platform according to claim 4, characterized in that: include: Step S101: Simulation starts; Step S102: Simulate and advance one clock cycle; Step S103: adopting a first-in-first-out update strategy to update the power consumption data buffer PDB (4) with the data captured by the dynamic data capture device DDC of the dynamic data capture array (2); Step S104: determining whether the power consumption data buffer PDB (4) overflows; if the power consumption data buffer PDB (4) overflows, updating the waveform data buffer WDB (3) with the overflow data of the power consumption data buffer PDB (4); Step S105: collecting the toggle rate through the toggle rate counter TC of the toggle rate counter array (1); Step S106: The flip rate collected by the flip rate counter TC of the flip rate counter array (1) is sent to the flip rate buffer array in the power consumption scenario capture component (6) through the power consumption scenario capture component (6), and the flip rate stored in the flip rate buffer array is processed online to realize power consumption scenario capture. If a new power consumption scenario is captured, the power consumption data export controller (5) is called to export the power consumption data in the power consumption data buffer PDB (4) based on a preset processing scheme; Step S107: Determine whether the simulation is finished. If it is not finished, jump to step S102. Otherwise, export the debugging data in the waveform data buffer WDB (3), end and exit.
6. The application method of the power consumption waveform capture device for hardware simulation acceleration platform according to claim 5, characterized in that: In step S106, the online processing of the flip rate stored in the flip rate buffer array to realize power consumption scene capture includes: Step S201: Set the depth of the first-in first-out queue FIFO, and set the initial value of each item therein to 0; initialize the current average flip rate T_ave and the current power consumption slope T_gap of each detected object to 0; initialize the historical average flip rate T_ave' and the historical power consumption slope T_gap' of each detected object to 0; Step S202: Determine whether the simulation is finished, if so, stop and exit; otherwise, jump to step S203; Step S203: Fill the toggle rate collected by the toggle rate counter TC of the toggle rate counter array (1) into the FIFO head of the first-in-first-out queue FIFO, and move the old data of each item in the first-in-first-out queue FIFO to the tail one by one in turn, and discard the old data of the last item in the first-in-first-out queue FIFO; Step S204: Calculate the current average flip rate T_ave and the current power consumption slope T_gap of each item in the FIFO header respectively. If the current average flip rate T_ave is greater than the historical average flip rate T_ave' and the current power consumption slope T_gap is greater than the historical power consumption slope T_gap', it is determined that a new power consumption scenario is captured; otherwise, assign the current average flip rate T_ave to the historical average flip rate T_ave' and the current power consumption slope T_gap to the historical power consumption slope T_gap', and jump to step S202.
7. The application method of the power consumption waveform capture device for hardware simulation acceleration platform according to claim 6 is characterized in that: When setting the depth of the first-in first-out queue FIFO in step S201, the depth D_fifo of the first-in first-out queue FIFO is set to be greater than or equal to the maximum average time required for evaluating the functional power consumption and the power consumption slope.
8. The application method of the power consumption waveform capture device for hardware simulation acceleration platform according to claim 5, characterized in that: After capturing the new power consumption scenario in step S106, the process also includes: recording the record information of the new power consumption scenario, wherein the record information of the new power consumption scenario includes the simulation time Time_peak and the toggle rate Toggle when the new power consumption scenario occurs, and recording the record information of the new power consumption scenario in a text file on the server.
9. The application method of the power consumption waveform capture device for hardware simulation acceleration platform according to claim 5, characterized in that: In step S106, when the power consumption data export controller (5) is called to export the power consumption data in the power consumption data buffer PDB (4) based on a preset processing scheme, the preset processing scheme includes scheme 1: Step S301: exporting the flip rate data; Step S302: determine whether the current simulation time value is equal to Time_peak + T_power_post. If not, jump to step S107. Otherwise, jump to step S303; Wherein Time_peak is the time value corresponding to the peak power consumption, T_power_post is the time length within the specified time range after the waveform slice length T_power during power consumption calculation, step S303: clearing the waveform data buffer WDB (3), and updating the data of the power consumption data buffer PDB (4) into the waveform data buffer WDB (3); Step S304: export the power consumption data in the waveform data buffer WDB (3), and then jump to step S107.
10. The application method of the power consumption waveform capture device for hardware simulation acceleration platform according to claim 5, characterized in that: In step S106, when the power consumption data export controller (5) is called to export the power consumption data in the power consumption data buffer PDB (4) based on a preset processing scheme, the preset processing scheme includes scheme 2: Step S401: exporting the flip rate data; Step S402: Determine whether the current simulation time value is equal to: Time_peak + D_PDB_Logic – T_power_pre – T_power – T_power_post Whether it is established, where Time_peak is the time value corresponding to the peak power consumption, D_PDB_Logic is the number of cycles of the waveform that can be cached by the power consumption data buffer PDB (4), T_power_pre is the time length in the specified time range before the waveform slice length T_power when calculating the power consumption, T_power is the waveform slice length in the power consumption calculation, and T_power_post is the time length in the specified time range after the waveform slice length T_power when calculating the power consumption; if it is established, the power consumption data in the waveform data buffer WDB (3) is exported and the process jumps to step S107.
Citation Information
Cited By
Method for extracting chip power consumption evaluation waveform and computing equipment
CN118917272A
