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

Several MachXO2 devices appear to be broken #1423

Open
whitequark opened this issue Jan 15, 2025 · 5 comments
Open

Several MachXO2 devices appear to be broken #1423

whitequark opened this issue Jan 15, 2025 · 5 comments

Comments

@whitequark
Copy link
Member

I'm testing nextpnr with prjtrellis commit YosysHQ/prjtrellis@14ac883fa.

The four *X suffixed devices fail to generate chipdb:

Traceback (most recent call last):
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 695, in <module>
    main()
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 687, in main
    process_timing_data(dev_family[args.device])
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 296, in process_timing_data
    for grade in speed_grade_names[family]:
                 ~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'MachXO'
make[2]: *** [machxo2/CMakeFiles/chipdb-machxo2.dir/build.make:195: machxo2/chipdb-1200X.bba] Error 1
make[2]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 695, in <module>
    main()
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 687, in main
    process_timing_data(dev_family[args.device])
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 296, in process_timing_data
    for grade in speed_grade_names[family]:
                 ~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'MachXO'
make[2]: *** [machxo2/CMakeFiles/chipdb-machxo2.dir/build.make:203: machxo2/chipdb-2280X.bba] Error 1
Traceback (most recent call last):
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 695, in <module>
    main()
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 687, in main
    process_timing_data(dev_family[args.device])
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 296, in process_timing_data
    for grade in speed_grade_names[family]:
                 ~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'MachXO'
make[2]: *** [machxo2/CMakeFiles/chipdb-machxo2.dir/build.make:179: machxo2/chipdb-256X.bba] Error 1
Traceback (most recent call last):
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 695, in <module>
    main()
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 687, in main
    process_timing_data(dev_family[args.device])
  File "/home/whitequark/Projects/nextpnr/machxo2/facade_import.py", line 296, in process_timing_data
    for grade in speed_grade_names[family]:
                 ~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'MachXO'
make[2]: *** [machxo2/CMakeFiles/chipdb-machxo2.dir/build.make:187: machxo2/chipdb-640X.bba] Error 1

For some reason the MachXO2 target doesn't follow what iCE40, ECP5, etc were doing and only builds two devices (probably it's too slow?), which was hiding this problem.

@whitequark
Copy link
Member Author

cc @cr1901

@mmicko
Copy link
Member

mmicko commented Jan 15, 2025

@whitequark Feel free to remove MachXO devices from list, that was anyway in very early stages of reversing for some time and there was just no interest in those. Other devices do build but they also take lot of time due to how prjtrellis is generating data, so those that were most used are those that were enabled by default (1200 and 6900)

So MachXO2 and MachXO3 should both work just fine, if not that is some regression, but MachXO does not work anyway.

@whitequark
Copy link
Member Author

Okay. I've now changed the default to "every device that builds", to work the same way as every other target. It does take a bit of time admittedly.

@mmicko
Copy link
Member

mmicko commented Jan 15, 2025

@whitequark That is fine, but for oss-cad-suite builds it will probably be need to be limited to just few since chip database space takes a lot of space. I would like to convert it to be one of Himbaechel uarch, since it does not have much users, but would need some help from @gatecat mostly converting from prjtrellis data or redoing prjtrellis to be able to export data in more convenient format.

@cr1901
Copy link
Contributor

cr1901 commented Jan 15, 2025

since chip database space takes a lot of space

MachXO2 databases are not compressed/deduplicated like ECP5 databases are. I didn't think it was worth the complexity for such small targets (and also, ECP5 tile types and naming especially are much more regular).

I don't know why writing out the DBs would take a long time, considering ICE40 and ECP5 also use Python exports. When I was creating the facade_import.py script, 1200HC wait/turnaround times were reasonable. I would have to benchmark it.

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

No branches or pull requests

3 participants