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

Programmers definitions 'openfpgaloader', 'ujprog' are not used. #536

Closed
zapta opened this issue Jan 11, 2025 · 9 comments
Closed

Programmers definitions 'openfpgaloader', 'ujprog' are not used. #536

zapta opened this issue Jan 11, 2025 · 9 comments

Comments

@zapta
Copy link
Collaborator

zapta commented Jan 11, 2025

The two programmers 'openfpgaloader', 'ujprog' are defined but not used.

@juan, @cavearr, OK to delete? (we can also add back when needed).

Motivation: I am adding an automatic test that validates the boards, fpgas, and programmers and this breaks the test.

https://github.com/FPGAwars/apio/blob/develop/apio/resources/programmers.json

@Obijuan
Copy link
Member

Obijuan commented Jan 13, 2025

Please, do not remove the programmers by now. Some boards can be programmed using different programmers. Buy default one is used, but the others can also be used. It is good for testing. For example, the Alhambra-II board uses iceprog, but it can also use openFPGALoader, which is faster (I am planning to switch to it)

Before removing things I think it is better to mark them as deprecated, and give more time to other uses to test. The current apio development branch has too many changes. I fear that when releasing it, many projects will be broken

@cavearr
Copy link
Member

cavearr commented Jan 13, 2025

@Obijuan , in Icestudio i'm evolving the compiler to add verilator exceptions for some things that broken a lot of projects at verify process.

The big "projects conflicts" comes from verify with verilator, but this is good in medium term because the problems are really bad practice implementations. I'm requesting at fpgawars community to test with projects and send me each of this that verify fails to add exceptions or evolve the error handling.

Don't worry with that, i think we don't needed of release nothing that has not been tested for months and all of the problems will be solved before.

The migration to openfpgaloader i thinks is a very good idea, i use a lof and thinks is better than iceprog, if you need help with this, tell us.

I'm ok with no delete this programmers, in fact we could do in near future that in apio.ini some boards could be configure tu use one or other, what do you think @zapta ? Setup a preferrer programmer for board, but do the capability of setup an alternative programmer per board, for example Alhambra-ii, default programmer iceprog but alternative could be openfpgaloader defined in apio.ini.

@zapta
Copy link
Collaborator Author

zapta commented Jan 13, 2025

@Obijuan, sounds good, I will leave it. The 'openfpgaloader' is in use now for the gowin/tang boards so ujprog is the only one that is unused.

https://github.com/zapta/apio_dev/blob/2cd73f2f33c6a0cae48776c2a41ffca6e1e34eaa/test/test_apio_context.py#L97

As for breaking existing project, they are supposed to break only were we had concuss decisions such as requiring apio.ini or dropping support for custom SConstruct.


$ apio boards
BOARD                              EXAMPLES   ARCH     PART NUMBER              SIZE   PROGRAMMER                    
alchitry-cu                           1       ice40    ICE40HX8K-CB132          8k     iceprog                       
alhambra-ii                           4       ice40    ICE40HX4K-TQ144          8k     iceprog                       
arice1                                        ice40    ICE40UP5K-SG48           5k     iceprog                       
blackice                              2       ice40    ICE40HX4K-TQ144          8k     blackiceprog                  
blackice-ii                                   ice40    ICE40HX4K-TQ144          8k     blackiceprog                  
blackice-mx                                   ice40    ICE40HX4K-TQ144          8k     blackiceprog                  
edu-ciaa-fpga                         4       ice40    ICE40HX4K-TQ144          8k     iceprog                       
fomu                                  2       ice40    ICE40UP5K-UWG30          5k     dfu                           
fpga101                                       ice40    ICE40UP5K-SG48           5k     iceprog                       
go-board                              3       ice40    ICE40HX1K-VQ100          1k     iceprog                       
ice40-hx1k-evb                        1       ice40    ICE40HX1K-VQ100          1k     iceprogduino                  
ice40-hx8k                            1       ice40    ICE40HX8K-CT256          8k     iceprog                       
ice40-hx8k-evb                        1       ice40    ICE40HX8K-CT256          8k     iceprogduino                  
ice40-ul1k-breakout                           ice40    ICE40UL1K-CM36A          1k     iceprog                       
ice40-up5k                            3       ice40    ICE40UP5K-SG48           5k     iceprog                       
iceblink40-hx1k                               ice40    ICE40HX1K-VQ100          1k     iceburn                       
icebreaker                            3       ice40    ICE40UP5K-SG48           5k     iceprog                       
icebreaker-bitsy0                             ice40    ICE40UP5K-SG48           5k     dfu                           
icebreaker-bitsy1                             ice40    ICE40UP5K-SG48           5k     dfu                           
icefun                                        ice40    ICE40HX8K-CB132          8k     icefunprog                    
icestick                              2       ice40    ICE40HX1K-TQ144          1k     iceprog                       
icesugar-1-5                          1       ice40    ICE40UP5K-SG48           5k     icesprog                      
icesugar-nano                                 ice40    ICE40LP1K-CM36           1k     icesprog                      
icewerx                               2       ice40    ICE40HX8K-CB132          8k     icefunprog                    
icezum                                5       ice40    ICE40HX1K-TQ144          1k     iceprog                       
kefir                                 2       ice40    ICE40HX4K-TQ144          8k     iceprog                       
odt-icyblue-feather                           ice40    ICE40U4K-SG48            4k     icesprog                      
odt-rpga-feather                              ice40    ICE40U4K-SG48            4k     mcu                           
ok-ice40pro                                   ice40    ICE40UP5K-SG48           5k     iceprog                       
pi-sicle                                      ice40    ICE40HX4K-TQ144          8k     pi-sicle-loader               
pico-ice                                      ice40    ICE40UP5K-SG48           5k     dfu                           
thetamachines-eth4k                           ice40    ICE40HX4K-TQ144          8k     iceprog                       
tinyfpga-b2                           2       ice40    ICE40LP8K-CM81           8k     tinyfpgab                     
tinyfpga-bx                           4       ice40    ICE40LP8K-CM81           8k     tinyprog                      
upduino                                       ice40    ICE40UP5K-SG48           5k     iceprog                       
upduino2                                      ice40    ICE40UP5K-SG48           5k     iceprog                       
upduino21                                     ice40    ICE40UP5K-SG48           5k     iceprog                       
upduino3                                      ice40    ICE40UP5K-SG48           5k     iceprog                       
upduino31                             3       ice40    ICE40UP5K-SG48           5k     iceprog                       
butterstick-r10-2g-85k                        ecp5     LFE5UM5G-85F-8BG381C     85k    dfu                           
butterstick-r10-2g-85k-ft2232h                ecp5     LFE5UM5G-85F-8BG381C     85k    openfpgaloader-ft2232         
butterstick-r10-2g-85k-ft232h                 ecp5     LFE5UM5G-85F-8BG381C     85k    openfpgaloader-ft232          
colorlight-5a-75b-v61                         ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-ft2232         
colorlight-5a-75b-v7                          ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft2232         
colorlight-5a-75b-v8                  2       ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft2232         
colorlight-5a-75e-v6                          ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft2232         
colorlight-5a-75e-v71-ft2232h         2       ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft2232         
colorlight-5a-75e-v71-ft232h                  ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft232          
colorlight-5a-75e-v71-usb-blaster             ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-usb-blaster    
colorlight-i5-v7-0-ft2232h                    ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-ft2232         
colorlight-i5-v7-0-ft232h                     ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-ft232          
colorlight-i5-v7-0-usb-blaster                ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-usb-blaster    
colorlight-i9-v7-2-ft2232h                    ecp5     LFE5U-45F-6BG381C        45k    openfpgaloader-ft2232         
colorlight-i9-v7-2-ft232h                     ecp5     LFE5U-45F-6BG381C        45k    openfpgaloader-ft232          
colorlight-i9-v7-2-usb-blaster                ecp5     LFE5U-45F-6BG381C        45k    openfpgaloader-usb-blaster    
cynthion-r1-4                         1       ecp5     LFE5U-12F-6BG256C        12k    apollo                        
ecp5-evaluation-board                         ecp5     LFE5UM5G-85F-8BG381C     85k    openfpgaloader-ft2232         
ecp5-mini-12                                  ecp5     LFE5U-12F-6BG256C        12k    openfpgaloader-ft2232         
ecp5-mini-25                                  ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft2232         
fleafpga-ohm-ft2232h                          ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-ft2232         
fleafpga-ohm-ft232h                           ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-ft232          
fleafpga-ohm-usb-blaster                      ecp5     LFE5U-25F-6BG381C        25k    openfpgaloader-usb-blaster    
icesugar-pro-ft2232h                          ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft2232         
icesugar-pro-ft232h                           ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-ft232          
icesugar-pro-usb-blaster                      ecp5     LFE5U-25F-6BG256C        25k    openfpgaloader-usb-blaster    
mimas-ecp5-mini                               ecp5     LFE5U-45F-6BG256C        45k    openfpgaloader-ft2232         
orangecrab-r02-25f                            ecp5     LFE5U-25F-6MG285C        25k    dfu                           
orangecrab-r02-85f                            ecp5     LFE5U-85F-6MG285C        85k    dfu                           
tinyfpga-ex-rev1                              ecp5     LFE5U-85F-6MG285C        85k    tinyprog                      
tinyfpga-ex-rev2                              ecp5     LFE5UM5G-85F-8MG285C     85k    tinyprog                      
ulx3s-12f                             2       ecp5     LFE5U-12F-6BG381C        12k    fujprog                       
ulx3s-25f                                     ecp5     LFE5U-25F-6BG381C        25k    fujprog                       
ulx3s-45f                             1       ecp5     LFE5U-45F-6BG381C        45k    fujprog                       
ulx3s-85f                             1       ecp5     LFE5U-85F-6BG381C        85k    fujprog                       
versa                                         ecp5     LFE5UM-45F-6BG381C       45k    iceprog                       
sipeed-tang-nano                              gowin    GW1N-LV1QN48C6/I5        1k     openfpgaloader                
sipeed-tang-nano-1k                           gowin    GW1NZ-LV1QN48C6/I5       1k     openfpgaloader                
sipeed-tang-nano-20k                          gowin    GW2AR-LV18QN88C8/I7      20k    openfpgaloader                
sipeed-tang-nano-4k                   1       gowin    GW1NSR-LV4CQN48PC7/I6    4k     openfpgaloader                
sipeed-tang-nano-9k                   2       gowin    GW1NR-LV9QN88PC6/I5      9k     openfpgaloader                
Total of 80 boards
Run 'apio boards -v' for additional columns.

@zapta
Copy link
Collaborator Author

zapta commented Jan 13, 2025

@cavearr, regarding allowing the user to switch the programmer a board uses, there are a few options:

  1. Making the programmer in the board definition an array (or a dictionary), having a few name alternatives.
    "programmer": {

apio.ini

board=alhambra-ii
programmer=iceprog  # The programmer variant of the board to use.
top-module=main
  1. Defining multiple boards as we do now
$ apio boards | grep colorlight-i9-v7-2
colorlight-i9-v7-2-ft2232h                    ecp5     LFE5U-45F-6BG381C        45k    openfpgaloader-ft2232         
colorlight-i9-v7-2-ft232h                     ecp5     LFE5U-45F-6BG381C        45k    openfpgaloader-ft232          
colorlight-i9-v7-2-usb-blaster                ecp5     LFE5U-45F-6BG381C        45k    openfpgaloader-usb-blaster   
  1. Allowing the user to have a custom boards.json in their project, which is already supported in the dev version.

Any thoughts?

@cavearr
Copy link
Member

cavearr commented Jan 13, 2025

i like a lot all of the options, the board.json in the project folder for custom boards is very interesting, this is very aligned with a new feature to add boards that i'm developing at icestudio.

For me and for the momment with this should be enought, maybe in apio.ini needs and "args" parameter for the programmer.

@zapta
Copy link
Collaborator Author

zapta commented Jan 13, 2025 via email

@zapta
Copy link
Collaborator Author

zapta commented Jan 13, 2025

I created an issue to discuss the board and programmer replication issue. https://github.com/FPGAwars/apio/issues/new

Closing this one. The unused programmer will say.

@zapta zapta closed this as completed Jan 13, 2025
@zapta
Copy link
Collaborator Author

zapta commented Jan 18, 2025

@Obijuan, the ujprog programmer definition is not only unused by also doesn't have a matching binary, so broken. Ok to delete?

(There is another programmer definition called fujprog and it seems to be ok).

  "ujprog": {
    "command": "ujprog",
    "args": "-q -j SRAM"
  },
/projects/apio-dev/repo$ apio raw -- which ujprog
/projects/apio-dev/repo$

@zapta zapta reopened this Jan 18, 2025
@zapta
Copy link
Collaborator Author

zapta commented Feb 4, 2025

Closing.

@zapta zapta closed this as completed Feb 4, 2025
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