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

[Feature request] Add a command to report the utilization info. #351

Open
zapta opened this issue Feb 22, 2024 · 1 comment
Open

[Feature request] Add a command to report the utilization info. #351

zapta opened this issue Feb 22, 2024 · 1 comment

Comments

@zapta
Copy link
Collaborator

zapta commented Feb 22, 2024

This request is for a command similar to apio time that reports the FPGA utilization. Alternatively, the time and the utilization reporting can be combined into a single reporting command, that can be extended later to report additional information.

By utilization I mean something similar to this part of the the apio build -v log:

Info: Device utilisation:
Info: 	         ICESTORM_LC:    34/ 5280     0%
Info: 	        ICESTORM_RAM:     0/   30     0%
Info: 	               SB_IO:     4/   96     4%
Info: 	               SB_GB:     1/    8    12%
Info: 	        ICESTORM_PLL:     0/    1     0%
Info: 	         SB_WARMBOOT:     0/    1     0%
Info: 	        ICESTORM_DSP:     0/    8     0%
Info: 	      ICESTORM_HFOSC:     0/    1     0%
Info: 	      ICESTORM_LFOSC:     0/    1     0%
Info: 	              SB_I2C:     0/    2     0%
Info: 	              SB_SPI:     0/    2     0%
Info: 	              IO_I3C:     0/    2     0%
Info: 	         SB_LEDDA_IP:     0/    1     0%
Info: 	         SB_RGBA_DRV:     0/    1     0%
Info: 	      ICESTORM_SPRAM:     0/    4     0%

IceStudio shows this information in the status bar, scraped from this log test. I wonder if the nextpnr team would agree to add a
--report flag that emits the report as flag text or structured json.

@obtitus
Copy link

obtitus commented Sep 15, 2024

don't know if it is new, but this information is now in .json when passing the --report argument to nextpnr:

$ nextpnr-ice40 --version
"nextpnr-ice40" -- Next Generation Place and Route (Version nextpnr-0.6-118-g0eb9a9ad)
$ nextpnr-ice40 --up5k --package sg48 --json hardware.json --asc hardware.asc --pcf pico_ice.pcf -q --report report.json

results in report.json:
...
"utilization": {                                                                                                                                                                                                                                      
    "ICESTORM_DSP": {                                                                                                                                                                                                                                   
      "available": 8,                                                                                                                                                                                                                                   
      "used": 0                                                                                                                                                                                                                                         
    },                                                                                                                                                                                                                                                  
    "ICESTORM_HFOSC": {                                                                                                                                                                                                                                 
      "available": 1,                                                                                                                                                                                                                                   
      "used": 0                                                                                                                                                                                                                                         
    },                                                                                                                                                                                                                                                  
    "ICESTORM_LC": {                                                                                                                                                                                                                                    
      "available": 5280,                                                                                                                                                                                                                                
      "used": 52                                                                                                                                                                                                                                        
    },
...

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

No branches or pull requests

3 participants