Success! Subscription added.
Success! Subscription removed.
Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile.
This work would be much more reliable if we had more information about the System Controller design. The system controller is implemented in a MAX II device, in the boards with power monitoring capability.
If you have any information to share, please drop me a note. Thanks!
Scripts in TCL and Ruby for automating the power monitor circuit available in some FPGA boards.
Download the most recent version from GitHub (https://github.com/ricardo-jasinski/power_monitor_automation). Fork the project if you want to contribute with changes.
The scripts have been tested with:
Some kits from Altera® include an LTC2148 ADC whose differential inputs are connected to shunt resistors in series with the power rails that supply current to the FPGA. The ADC is controller by an SLD node that can be controlled via JTAG using the System Console application.
If you know the shunt resistor values, you can calculate the current that passes through each rail. This is what this script does.
There is no installation, just put everything in the same folder.
To run the Ruby script, you need to have Ruby (the programming language) installed in your system. Download it from www.rubyinstaller.org. Version 2.0.0 should work.
Run the Ruby script. Depending on your environment, you could try:
ruby power_reader.rb
./power_reader.rb
power_reader
Here is a sample output:
Board detected: Cyclone IV GX Transceiver Starter Kit
Current readings:
2.5_VCC 0.041 A Rail 8 0xbf 0x0
1.2_VCCL_GXB 0.068 A Rail 1 0x3f 0x1
2.5_VCC_GXB 0.057 A Rail 2 0xa 0x1
2.5_VCCIO 0.006 A Rail 3 0x1e 0x0
1.2_VCCINT 0.166 A Rail 4 0xe 0x3
1.2_VCCD_PLL 0.033 A Rail 5 0x9d 0x0
open 0.004 A Rail 6 0x11 0x0
open 0.005 A Rail 7 0x16 0x0
If you want, you can bypass the Ruby script and run the TCL script with System Console:
\altera\14.0\quartus\sopc_builder\bin\system-console --script=read_power_rails.tcl
All scripts were developed and tested in Microsoft Windows 8.1 with Quartus II 14.0. Previous versions of Quartus should work as well (also tested with 13.1sp1). I have used Ruby 2.0.0p0, but other versions should work too.
This script has been tested with the following boards:
It should be possible to run it with little changes in other platforms compatible with the Power Monitor™ infrastructure. Here are some directions:
Please let me know if you succeed in doing so or if you need any help.
Much of the information came from the sources below. Many thanks to the respective authors for sharing their experience!
Public domain. Do with this code whatever you want, just don't hold me responsible for anything.
If you find it useful, please drop me a note so that I can gauge how much effort to put into this project. :)
Cyclone, Power Monitor, and System Console are trademarks of Altera Corporation.
Community support is provided Monday to Friday. Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
For more complete information about compiler optimizations, see our Optimization Notice.