Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThanks. You are right.
I generated gate level code (.VHO) from VHDL code using Quartus. Quartus also generated a .do script to compile the code in ModelSim. Then I simulated the gate level code with RTL stimulator in ModelSim and generated VCD file. The power confidence level was High. Below are the steps that I used to calculate power, hope it will be useful for beginners. ----------- DUT = design for which we want to measure power STM = stimulation vectors TOP = wrapper for DUT and STM 1. write DUT, STM, TOP. simulate using ModelSim. See wave form to verify 2. In Quartus, Make project with only DUT file, compile 3. In Quartus, Assignment->Settings-> EDA Tool -> Simulation Tool name: ModelSim Altera [check] Run gate level --will creat gate level .vho file (we need to make VCD from gate level DUT) --also will creat a .do file of how to compile it in ModelSim language: vhdl [chk] map, [chk] glitch OK 2. Compile design, Modelsim will open autometically, quit 3. Lunch ModelSim set directory File->load--> .do file (to compile .vho file of DUT) remove "FOR ALL" statements from TOP file compile stm, top Simulate->start simulation select TOP in VSIM prompt: vsim> vcd file my_vcd.vcd vsim> vcd add -r /* vsim> run 2000ns vsim> vcd checkpoint vsim> quit -sim 4. In Quartus --> Assignments-->Settings-->powerplay--> assign VCD file [entity DUT] [chk] write saf [chk] write block [chk] glitch 5. processign ->start--> powerplay 6. Tools--advisor-->powerplay (for more optimization)