OpenFPGA/docs/source/fpga_spice/spice_simulation.rst

40 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2018-09-13 16:38:41 -05:00
Run SPICE simulation
====================
2018-09-13 23:58:54 -05:00
2018-09-14 14:11:51 -05:00
* Simulation results
2019-04-01 17:26:02 -05:00
The HSPICE simulator creates an LIS file (\*.lis) to store the results. In each LIS file, you can find the leakage power and dynamic power of each module, as well the total leakage power and the total dynamic power of all the modules in a SPICE netlist.
2018-09-14 14:11:51 -05:00
The following is an example of simulation results of a pb_mux testbench.::
2018-09-13 23:58:54 -05:00
total_leakage_srams= -16.4425u
total_dynamic_srams= 83.0480u
total_energy_per_cycle_srams= 269.7773f
total_leakage_power_mux[0to76]=-140.1750u
total_energy_per_cycle_mux[0to76]= -37.5871p
total_leakage_power_pb_mux=-140.1750u
total_energy_per_cycle_pb_mux= -37.5871p
2018-09-14 14:11:51 -05:00
.. note:: total_energy_per_cycle_srams represents the total energy per cycle of all the SRAMs of the multiplexers in this testbench, while total_energy_per_cycle_pb_mux is the total energy per cycle of all the multiplexer structures in this testbench.
Therefore, the total energy per cycle of all the multiplexers in this testbench should be the sum of total_energy_per_cycle_srams and total_energy_per_cycle_pb_mux.
2019-04-01 17:26:02 -05:00
Similarly, the total leakage power of all the multiplexers in this testbench should be the sum of total_leakage_srams and total_leakage_power_pb_mux.
2018-09-14 14:11:51 -05:00
The leakage power is measured for the first clock cycle, where FPGA-SPICE set all the voltage stimuli in constant voltage levels.
2018-09-13 23:58:54 -05:00
2018-09-14 14:11:51 -05:00
The total energy per cycle is measured for the rest of clock cycles (the 1st clock cycle is not included).
The total power can be calculated by,
2018-09-13 23:58:54 -05:00
2018-09-14 14:11:51 -05:00
:math:`total\_energy\_per\_cycle \cdot clock\_freq`
2018-09-13 23:58:54 -05:00
where clock_freq is the clock frequency used in SPICE simulations.