Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Max5 Power Monitor

Honored Contributor II



I'm working with the Arria starter kit. To start with, I've already seen this: 


but I still have some questions. 


1)How do I figure out what the reference voltage is for a given rail? 

2)How do I figure out what the resistance is? 

3)Where do these numbers comes from? sld_access_ir $vj 1 2 vs. sld_access_ir $vj 2 2 


4)The output I get from sld_access_dr $vj 16 1  

[list 0x00 0x00] looks like : 0x11 0x0, 0x16 0x0, etc.. 

is this backwards? I ask because the upper bytes shift wildly between 0x10 and 0x20, and the lower bytes are always 0x0, which seems backwards to me. 



0 Kudos
2 Replies
Honored Contributor II

Hi Jonah, 


Yes, very likely it is "backwards" (i.e., the least significant byte is printed first). 


I am sort of reverse engineering Power Monitor's behavior to automate some measurements on a Cyclone IV Development Kit. 


Here are some observations, which may or not be true: 

- The values read seem to the the least significant bits of a 24-bit ADC; in the formulas, some have advised dividing the reference voltage by 23 and multiplying by the value read. 

- You can read the resistance values by looking at the components on the PCB, or by looking and the schematics or datasheets for your board. 

- I believe all rails use the same reference voltage, because it is a single configuration for the whole ADC. In my board, it seems to be 5.37 or 5.0V. 

- The number changing from 1 to 2 in your question# 3 is the value to be written in the instruction register. The second value should be a timeout in microseconds. 


Hope this helps. 


0 Kudos
Honored Contributor II

I've created a script to read the current values from a command line, using system-console. It's been tested with the 'Cyclone IV GX Transceiver Starter Kit' and 'Cyclone IV GX FPGA Development Kit' boards, but it should be easy to adapt to other platforms. 


Good luck!
0 Kudos