Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMC output values #13

Open
avacoder42 opened this issue Jul 23, 2020 · 8 comments
Open

HMC output values #13

avacoder42 opened this issue Jul 23, 2020 · 8 comments
Labels

Comments

@avacoder42
Copy link

When I used the DRAMSpec output for HMC parameters (all combinations of technology and architectural I/P) in DRAMPower to calculate energy, I always got a negative value for act_energy. Here is the formula used in DRAMPower -

energy.act_energy += vdd2Domain.calcTivEnergy(sum(c.numberofactsBanks) * t.RAS , mps.idd0 - mps.idd3n1);

I mapped idd0 --> IDD0 ,idd3n1 --> IDD3N , what's the correct mapping to IDD1 and IDD5B to DRAMPower parameters?
And can DRAMPower be used to calculate power and energy for HMC config?

@myzinsky
Copy link
Member

Could be that there is something wrong with the Voltage Domains. Will come back to you soon.

@AndreChinazzo
Copy link
Collaborator

Hi @avacoder42 could you copy the output of DRAMSpec and what you use as input for DRAMPower?

@avacoder42
Copy link
Author

avacoder42 commented Jul 24, 2020

DRAMSpec : Arch I/P= techhmc_5x , Tech I/p= HMC_para512RB
Output from DRAMSpec in xml file added as input to DRAMPower

<!DOCTYPE memspec SYSTEM "memspec.dtd">
<memspec>

  <parameter id="memoryId" type="string" value="techhmc_5x" />
  <parameter id="memoryType" type="string" value="WIDEIO_SDR" />
  <memarchitecturespec>
    <parameter id="width" type="uint" value="32" />
    <parameter id="nbrOfBanks" type="uint" value="256" />
    <parameter id="nbrOfRanks" type="uint" value="1" />
    <parameter id="dll" type="bool" value="1" />
    <parameter id="twoVoltageDomains" type="bool" value="1" />

    <parameter id="dataRate" type="uint" value="2.5" />
    <parameter id="burstLength" type="uint" value="4" />
  </memarchitecturespec>
  <memtimingspec>
      <parameter id="clkMhz" type="double" value="1250" />
      <parameter id="RC" type="uint" value="50" />
      <parameter id="RCD" type="uint" value="19" />
      <parameter id="RL" type="uint" value="15" />
      <parameter id="RP" type="uint" value="14" />
      <parameter id="RFC" type="uint" value="550" />
      <parameter id="RAS" type="uint" value="37" />
      <parameter id="WL" type="uint" value="0" />
      <parameter id="AL" type="uint" value="0" />
      <parameter id="DQSCK" type="uint" value="0" />      
      <parameter id="RTP" type="uint" value="12" />
      <parameter id="WR" type="uint" value="10" />
      <parameter id="XP" type="uint" value="0" />
      <parameter id="XPDLL" type="uint" value="0" />
      <parameter id="XS" type="uint" value="0" />
      <parameter id="XSDLL" type="uint" value="0" />
      <parameter id="REFI" type="uint" value="9750" />
      <parameter id="CL" type="uint" value="15" />

      <parameter id="CCD" type="uint" value="6" />


  </memtimingspec>
  <mempowerspec>
      <parameter id="idd0" type="double" value="41.2271" />
      <parameter id="idd02" type="double" value="0" />
      
      <parameter id="idd2n" type="double" value="33.5633" />
      <parameter id="idd2n2" type="double" value="0" />
      
      <parameter id="idd3n" type="double" value="46.7633" />
      <parameter id="idd3n2" type="double" value="0" />
      <parameter id="idd4r" type="double" value="1031" />
    
      <parameter id="idd4w" type="double" value="1031" />

      <parameter id="idd5" type="double" value="162.987" />
     
      <parameter id="vdd" type="double" value="2.8" />
      <parameter id="vdd2" type="double" value="1.1" />
  </mempowerspec>
</memspec>

DRAMPower results with sample trace file

* Trace Power and Energy Estimates:

ACT Cmd Energy: -1394874.38 pJ
PRE Cmd Energy: 678436.36 pJ
RD Cmd Energy: 13404516.46 pJ
WR Cmd Energy: 0.00 pJ
RD I/O Energy: 0.00 pJ
ACT Stdby Energy: 934652226.08 pJ
  Active Idle Energy: 636878.74 pJ
  Active Power-Up Energy: 0.00 pJ
    Active Stdby Energy during Auto-Refresh cycles in Self-Refresh Power-Up: 0.00 pJ
PRE Stdby Energy: 11378364477.61 pJ
  Precharge Idle Energy: 11357861575.93 pJ
  Precharged Power-Up Energy: 0.00 pJ
    Precharge Stdby Energy during Auto-Refresh cycles in Self-Refresh Power-Up: 0.00 pJ
  Self-Refresh Power-Up Energy: 0.00 pJ
Total Idle Energy (Active + Precharged): 11358498454.67 pJ
Total Power-Down Energy: 0.00 pJ
  Fast-Exit Active Power-Down Energy: 0.00 pJ
  Slow-Exit Active Power-Down Energy: 0.00 pJ
    Slow-Exit Active Power-Down Energy during Auto-Refresh cycles in Self-Refresh: 0.00 pJ
  Fast-Exit Precharged Power-Down Energy: 0.00 pJ
  Slow-Exit Precharged Power-Down Energy: 0.00 pJ
    Slow-Exit Precharged Power-Down Energy during Auto-Refresh cycles in Self-Refresh: 0.00 pJ
Auto-Refresh Energy: 2353574554.90 pJ
Bankwise-Refresh Energy: 0.00 pJ
Self-Refresh Energy: 0.00 pJ
----------------------------------------
Total Trace Energy: 14679279337.04 pJ
Average Power: 114.49 mW
----------------------------------------

@AndreChinazzo
Copy link
Collaborator

AndreChinazzo commented Jul 25, 2020

The negative value is then clear: since idd0 = 41 < idd3n = 46.76, the subtraction mps.idd0 - mps.idd3n1 < 0, thus the energy calculation outputs a negative number.

The problem seems to come from the definition of idd0 and idd3n. In DRAMPower, is seems to be assumed that idd0 (one bank act-pre current) minus idd3n (active standby current) should result in the fraction of the total idd0 that is spend by the operation itself, discounting the standby current.

The problem, however, is that DRAMSpec assumes idd3n as the worst case: when all banks are active. So idd3n is the total standby current, not the standby current of a single bank. To calculate idd0, DRAMSpec uses an internal variable that is the standby current of a single bank, but this variable is not outputted.

@myzinsky is the definition used in DRAMSpec incorrect?

@avacoder42
Copy link
Author

Hi,
Thank you for the clarification. Maybe this holds for all configurations, not just HMC.

@myzinsky
Copy link
Member

IDD3N is the worst case in DRAM Power as well. We introduced the rho parameter in order to configure this more precisely (see the two recent paper about DRAMPower). If the rho is set to 100% everything should be fine from DRAM power side and the worst case should be assumed.

I find it more suspicious that IDD3n generated from DRAMSpec is bigger than IDD0 since IDD0 actually included IDD3N/IDD2N. This should be double checked also with Christian.

@myzinsky myzinsky added the bug label Jul 29, 2020
@AndreChinazzo
Copy link
Collaborator

@avacoder42 I have fixed the calculation of IDD0. Now IDD0 = 56 mA > IDD3n = 50 mA when simulating:

./build/release/dramspec -t technology_input/techhmc_5x.json -p architecture_input/parhmc_512RB.json

Please let me know if that solves the problem.

@avacoder42
Copy link
Author

@AndreChinazzo , thank you for the update, now its all positive.

I had one query since DRAMPower does not have a memory type for HMC or HBM , are the values obtained with WIDEI/O as memory type and I/P parameters from HMC or HBM still correct?

config <parameter id="memoryType" type="string" value="WIDEIO_SDR" /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants