FPGAwars / apio

:seedling: Open source ecosystem for open FPGA boards
https://github.com/FPGAwars/apio/wiki
GNU General Public License v2.0
802 stars 139 forks source link

[Feature request] Have uniform board names. #483

Open zapta opened 1 day ago

zapta commented 1 day ago

@Obijuan , @cavearr, what do you think?

Currently there are a few issues related to board names

The proposal here is to

  1. Define for each board a 'new name' using the code snippet below.
  2. For some transition time support both the new names and old names, with a warning to the user if an old name if used.
  3. All the examples will use the new names in their apio.ini.
  4. Change the directory names of the apio examples to match their board= value in apio.ini

EDIT: I just noticed a period in colorlight-i5-v7.0-usb-blaster so it can be ommited resulting in colorlight-i5-v70-usb-blaster

Generating new names from old name:

 name = name.lower()
 name = name.replace("_", "-")
 name = name.replace("(", "")
 name = name.replace(")", "")

Old board names (left) vs new board names (right):

Alchitry-Cu                         -> alchitry-cu
alhambra-ii                         -> alhambra-ii
arice1                              -> arice1
blackice                            -> blackice
blackice-ii                         -> blackice-ii
blackice-mx                         -> blackice-mx
Butterstick-r10-2g-85k              -> butterstick-r10-2g-85k
Butterstick-r10-2g-85k_(FT2232H)    -> butterstick-r10-2g-85k-ft2232h
Butterstick-r10-2g-85k_(FT232H)     -> butterstick-r10-2g-85k-ft232h
Cat-board                           -> cat-board
ColorLight-5A-75B-V61               -> colorlight-5a-75b-v61
ColorLight-5A-75B-V7                -> colorlight-5a-75b-v7
ColorLight-5A-75B-V8                -> colorlight-5a-75b-v8
ColorLight-5A-75E-V6                -> colorlight-5a-75e-v6
ColorLight-5A-75E-V71_(FT2232H)     -> colorlight-5a-75e-v71-ft2232h
ColorLight-5A-75E-V71_(FT232H)      -> colorlight-5a-75e-v71-ft232h
ColorLight-5A-75E-V71_(USB-Blaster) -> colorlight-5a-75e-v71-usb-blaster
ColorLight-i5-v7.0_(FT2232H)        -> colorlight-i5-v7.0-ft2232h
ColorLight-i5-v7.0_(FT232H)         -> colorlight-i5-v7.0-ft232h
ColorLight-i5-v7.0_(USB-Blaster)    -> colorlight-i5-v7.0-usb-blaster
ColorLight-i9-v7.2_(FT2232H)        -> colorlight-i9-v7.2-ft2232h
ColorLight-i9-v7.2_(FT232H)         -> colorlight-i9-v7.2-ft232h
ColorLight-i9-v7.2_(USB-Blaster)    -> colorlight-i9-v7.2-usb-blaster
Cynthion-r1.4                       -> cynthion-r1.4
ECP5-Evaluation-Board               -> ecp5-evaluation-board
ECP5-Mini-12                        -> ecp5-mini-12
ECP5-Mini-25                        -> ecp5-mini-25
edu-ciaa-fpga                       -> edu-ciaa-fpga
FleaFPGA-Ohm_(FT2232H)              -> fleafpga-ohm-ft2232h
FleaFPGA-Ohm_(FT232H)               -> fleafpga-ohm-ft232h
FleaFPGA-Ohm_(USB-Blaster)          -> fleafpga-ohm-usb-blaster
fomu                                -> fomu
fpga101                             -> fpga101
go-board                            -> go-board
iCE40-HX1K-EVB                      -> ice40-hx1k-evb
iCE40-HX8K                          -> ice40-hx8k
iCE40-HX8K-EVB                      -> ice40-hx8k-evb
iCE40-UL1K-Breakout                 -> ice40-ul1k-breakout
iCE40-UP5K                          -> ice40-up5k
iceblink40-hx1k                     -> iceblink40-hx1k
iCEBreaker                          -> icebreaker
iCEBreaker-bitsy0                   -> icebreaker-bitsy0
iCEBreaker-bitsy1                   -> icebreaker-bitsy1
icefun                              -> icefun
icestick                            -> icestick
iCESugar-nano                       -> icesugar-nano
iCESugar-Pro_(FT2232H)              -> icesugar-pro-ft2232h
iCESugar-Pro_(FT232H)               -> icesugar-pro-ft232h
iCESugar-Pro_(USB-Blaster)          -> icesugar-pro-usb-blaster
iCESugar_1_5                        -> icesugar-1-5
iceWerx                             -> icewerx
icezum                              -> icezum
icoboard                            -> icoboard
kefir                               -> kefir
ODT_IcyBlue_Feather                 -> odt-icyblue-feather
ODT_RPGA_Feather                    -> odt-rpga-feather
OK-iCE40Pro                         -> ok-ice40pro
orangecrab-r02-25f                  -> orangecrab-r02-25f
orangecrab-r02-85f                  -> orangecrab-r02-85f
pi-sicle                            -> pi-sicle
pico-ice                            -> pico-ice
Sipeed-Tang-Nano                    -> sipeed-tang-nano
Sipeed-Tang-Nano-1k                 -> sipeed-tang-nano-1k
Sipeed-Tang-Nano-20k                -> sipeed-tang-nano-20k
Sipeed-Tang-Nano-4k                 -> sipeed-tang-nano-4k
Sipeed-Tang-Nano-9k                 -> sipeed-tang-nano-9k
ThetaMachines-ETH4K                 -> thetamachines-eth4k
TinyFPGA-B2                         -> tinyfpga-b2
TinyFPGA-BX                         -> tinyfpga-bx
TinyFPGA-EX-rev1                    -> tinyfpga-ex-rev1
TinyFPGA-EX-rev2                    -> tinyfpga-ex-rev2
ulx3s-12f                           -> ulx3s-12f
ulx3s-25f                           -> ulx3s-25f
ulx3s-45f                           -> ulx3s-45f
ulx3s-85f                           -> ulx3s-85f
upduino                             -> upduino
upduino2                            -> upduino2
upduino21                           -> upduino21
upduino3                            -> upduino3
upduino31                           -> upduino31
versa                               -> versa
cavearr commented 1 day ago

Hi @zapta! i'm of course with you in the way that we need to standardize the board names (i'll do the same in Icestudio)

The only thing i think could be better is that we could define a mode of naming that improve the readability. We could use something like BEM in css , dividing the name in groups with -- (two lines for) kind of information and __ (two underline) for subtype or information less important, for example:

colorlight-5a-75e-v71-usb-blaster

convert into: colorlight--5a__75e--v7--usb-blaster boardname--model--version--other-info

Other example:

sipeed-tang-nano-20k sipeed--tang-nano--20k

It's onlny a porposal but i think the readibility is better (i don't like long names all separeted with - but is my opinion).

zapta commented 1 day ago

Hi @cavearr, we can use the convention of '--' to separate between fields but I am not sure where to insert them.

Attached below is the names.txt file. You can download and edit it any way you like and post it back here. The new name doesn't have to be an exact match of the old name, and it can be anything you want.

names.txt

cavearr commented 1 day ago

But what do you think? if you think, could be a "maniac" of mine XD

If you like the idea i'll change the names in names.txt , but please thinking if you see useful.

De: "Zapta" @.> Para: "FPGAwars" @.> CC: "Carlos" @.>, "Mention" @.> Enviados: Lunes, 2 de Diciembre 2024 19:45:24 Asunto: Re: [FPGAwars/apio] [Feature request] Have uniform board names. (Issue #483)

Hi [ https://github.com/cavearr | @cavearr ] , we can use the convention of '--' to separate between fields but I am not sure where to insert them.

Attached below is the names.txt file. You can download and edit it any way you like and post it back here. The new name doesn't have to be an exact match of the old name, and it can be anything you want.

[ https://github.com/user-attachments/files/17982488/names.txt | names.txt ]

— Reply to this email directly, [ https://github.com/FPGAwars/apio/issues/483#issuecomment-2512412595 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABUVYIJNQH4XSWX3ZADI4W32DSTEJAVCNFSM6AAAAABS36EE5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJSGQYTENJZGU | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

zapta commented 1 day ago

Hi @cavearr, I think that the board id colorlight-i9-v72-ft2232h is clear enough without the concept of 'fields' but maybe you can improve other things in some board ids.

Please remember that this is the board id and that the boards.json has another field for a more human readable board description https://github.com/FPGAwars/apio/blob/e5d834bd102b91dc38e91bebb560e04fe3e0ec8d/apio/resources/boards.json#L9

cavearr commented 1 day ago

@zapta Yes, yes don't worry, ok then continue with your proposal, don't complex the naming.

Thanks!

zapta commented 1 day ago

@cavearr, sounds good. Once we have the mechanism for new/legacy names, we can change later.