diff --git a/f4pga/__init__.py b/f4pga/__init__.py index 91b4df2..fa63294 100755 --- a/f4pga/__init__.py +++ b/f4pga/__init__.py @@ -570,7 +570,10 @@ def get_platform_name_for_part(part_name: str): differ only in a type of package they use. """ with (Path(mypath) / 'part_db.json').open('r') as rfptr: - return json_load(rfptr).get(part_name.upper()) + for key, val in json_load(rfptr).items(): + if part_name.upper() in val: + return key + raise(Exception(f"Unknown part name <{part_name}>!")) def make_flow_config(project_flow_cfg: ProjectFlowConfig, part_name: str) -> FlowConfig: """ Create `FlowConfig` from given project flow configuration and part name """ diff --git a/f4pga/part_db.json b/f4pga/part_db.json index e76ecff..072d51b 100644 --- a/f4pga/part_db.json +++ b/f4pga/part_db.json @@ -1,193 +1,34 @@ { - "XC7A50TCSG324-1": "xc7a50t", - "XC7A50TCSG324-2": "xc7a50t", - "XC7A50TCSG324-2L": "xc7a50t", - "XC7A50TCSG324-3": "xc7a50t", - "XC7A50TCPG236-1": "xc7a50t", - "XC7A50TCPG236-2": "xc7a50t", - "XC7A50TCPG236-2L": "xc7a50t", - "XC7A50TCPG236-3": "xc7a50t", - "XC7A50TCSG325-1": "xc7a50t", - "XC7A50TCSG325-2": "xc7a50t", - "XC7A50TCSG325-2L": "xc7a50t", - "XC7A50TCSG325-3": "xc7a50t", - "XC7A50TFGG484-1": "xc7a50t", - "XC7A50TFGG484-2": "xc7a50t", - "XC7A50TFGG484-2L": "xc7a50t", - "XC7A50TFGG484-3": "xc7a50t", - "XC7A50TFTG256-1": "xc7a50t", - "XC7A50TFTG256-2": "xc7a50t", - "XC7A50TFTG256-2L": "xc7a50t", - "XC7A50TFTG256-3": "xc7a50t", - "XC7A35TIFTG256-1L": "xc7a50t", - "XC7A35TIFGG484-1L": "xc7a50t", - "XC7A35TICSG325-1L": "xc7a50t", - "XC7A35TICSG324-1L": "xc7a50t", - "XC7A35TICPG236-1L": "xc7a50t", - "XC7A50TICPG236-1L": "xc7a50t", - "XC7A50TIFTG256-1L": "xc7a50t", - "XC7A50TIFGG484-1L": "xc7a50t", - "XC7A50TICSG325-1L": "xc7a50t", - "XC7A50TICSG324-1L": "xc7a50t", - "XC7A35TFTG256-1": "xc7a50t", - "XC7A35TFTG256-2": "xc7a50t", - "XC7A35TFTG256-2L": "xc7a50t", - "XC7A35TFTG256-3": "xc7a50t", - "XC7A35TFGG484-1": "xc7a50t", - "XC7A35TFGG484-2": "xc7a50t", - "XC7A35TFGG484-2L": "xc7a50t", - "XC7A35TFGG484-3": "xc7a50t", - "XC7A35TCSG325-1": "xc7a50t", - "XC7A35TCSG325-2": "xc7a50t", - "XC7A35TCSG325-2L": "xc7a50t", - "XC7A35TCSG325-3": "xc7a50t", - "XC7A35TCSG324-1": "xc7a50t", - "XC7A35TCSG324-2": "xc7a50t", - "XC7A35TCSG324-2L": "xc7a50t", - "XC7A35TCSG324-3": "xc7a50t", - "XC7A35TCPG236-1": "xc7a50t", - "XC7A35TCPG236-2": "xc7a50t", - "XC7A35TCPG236-2L": "xc7a50t", - "XC7A35TCPG236-3": "xc7a50t", - "XC7A100TIFTG256-1L": "xc7a100ti", - "XC7A100TIFGG676-1L": "xc7a100ti", - "XC7A100TIFGG484-1L": "xc7a100ti", - "XC7A100TICSG324-1L": "xc7a100ti", - "XC7A100TFTG256-1": "xc7a100t", - "XC7A100TFTG256-2": "xc7a100t", - "XC7A100TFTG256-2L": "xc7a100t", - "XC7A100TFTG256-3": "xc7a100t", - "XC7A100TFGG676-1": "xc7a100t", - "XC7A100TFGG676-2": "xc7a100t", - "XC7A100TFGG676-2L": "xc7a100t", - "XC7A100TFGG676-3": "xc7a100t", - "XC7A100TFGG484-1": "xc7a100t", - "XC7A100TFGG484-2": "xc7a100t", - "XC7A100TFGG484-2L": "xc7a100t", - "XC7A100TFGG484-3": "xc7a100t", - "XC7A100TCSG324-1": "xc7a100t", - "XC7A100TCSG324-2": "xc7a100t", - "XC7A100TCSG324-2L": "xc7a100t", - "XC7A100TCSG324-3": "xc7a100t", - "XC7A200TFBG484-1": "xc7a200t", - "XC7A200TFBG484-2": "xc7a200t", - "XC7A200TFBG484-2L": "xc7a200t", - "XC7A200TFBG484-3": "xc7a200t", - "XC7A200TFBG676-1": "xc7a200t", - "XC7A200TFBG676-2": "xc7a200t", - "XC7A200TFBG676-2L": "xc7a200t", - "XC7A200TFBG676-3": "xc7a200t", - "XC7A200TFBV484-1": "xc7a200t", - "XC7A200TFBV484-2": "xc7a200t", - "XC7A200TFBV484-2L": "xc7a200t", - "XC7A200TFBV484-3": "xc7a200t", - "XC7A200TFBV676-1": "xc7a200t", - "XC7A200TFBV676-2": "xc7a200t", - "XC7A200TFBV676-2L": "xc7a200t", - "XC7A200TFBV676-3": "xc7a200t", - "XC7A200TFFG1156-1": "xc7a200t", - "XC7A200TFFG1156-2": "xc7a200t", - "XC7A200TFFG1156-2L": "xc7a200t", - "XC7A200TFFG1156-3": "xc7a200t", - "XC7A200TSBV484-1": "xc7a200t", - "XC7A200TSBV484-2": "xc7a200t", - "XC7A200TSBV484-2L": "xc7a200t", - "XC7A200TSBV484-3": "xc7a200t", - "XC7A200TFFV1156-1": "xc7a200t", - "XC7A200TFFV1156-2": "xc7a200t", - "XC7A200TFFV1156-2L": "xc7a200t", - "XC7A200TFFV1156-3": "xc7a200t", - "XC7A200TSBG484-1": "xc7a200t", - "XC7A200TSBG484-2": "xc7a200t", - "XC7A200TSBG484-2L": "xc7a200t", - "XC7A200TSBG484-3": "xc7a200t", - "XC7A200TISBV484-1L": "xc7a200t", - "XC7A200TISBG484-1L": "xc7a200t", - "XC7A200TIFFV1156-1L": "xc7a200t", - "XC7A200TIFFG1156-1L": "xc7a200t", - "XC7A200TIFBV676-1L": "xc7a200t", - "XC7A200TIFBV484-1L": "xc7a200t", - "XC7A200TIFBG676-1L": "xc7a200t", - "XC7A200TIFBG484-1L": "xc7a200t", - "XC7A12TLCSG325-2L": "xc7a12tl", - "XC7A12TLCPG238-2L": "xc7a12tl", - "XC7A25TLCSG325-2L": "xc7a25tl", - "XC7A25TLCPG238-2L": "xc7a25tl", - "XC7A35TLCPG236-2L": "xc7a35tl", - "XC7A35TLCSG324-2L": "xc7a35tl", - "XC7A35TLCSG325-2L": "xc7a35tl", - "XC7A35TLFGG484-2L": "xc7a35tl", - "XC7A35TLFTG256-2L": "xc7a35tl", - "XC7A15TLCPG236-2L": "xc7a15tl", - "XC7A15TLCSG324-2L": "xc7a15tl", - "XC7A15TLCSG325-2L": "xc7a15tl", - "XC7A15TLFGG484-2L": "xc7a15tl", - "XC7A15TLFTG256-2L": "xc7a15tl", - "XC7A50TLCPG236-2L": "xc7a50tl", - "XC7A50TLCSG324-2L": "xc7a50tl", - "XC7A50TLCSG325-2L": "xc7a50tl", - "XC7A50TLFGG484-2L": "xc7a50tl", - "XC7A50TLFTG256-2L": "xc7a50tl", - "XC7A75TLFTG256-2L": "xc7a75tl", - "XC7A75TLFGG676-2L": "xc7a75tl", - "XC7A75TLFGG484-2L": "xc7a75tl", - "XC7A75TLCSG324-2L": "xc7a75tl", - "XC7A100TLCSG324-2L": "xc7a100tl", - "XC7A100TLFGG484-2L": "xc7a100tl", - "XC7A100TLFGG676-2L": "xc7a100tl", - "XC7A100TLFTG256-2L": "xc7a100tl", - "XC7A200TLFBG484-2L": "xc7a200tl", - "XC7A200TLFBG676-2L": "xc7a200tl", - "XC7A200TLFBV484-2L": "xc7a200tl", - "XC7A200TLFBV676-2L": "xc7a200tl", - "XC7A200TLFFG1156-2L": "xc7a200tl", - "XC7A200TLFFV1156-2L": "xc7a200tl", - "XC7A200TLSBG484-2L": "xc7a200tl", - "XC7A200TLSBV484-2L": "xc7a200tl", - "XA7A35TCSG325-1I": "xa7a50t", - "XA7A35TCSG325-1Q": "xa7a50t", - "XA7A35TCSG325-2I": "xa7a50t", - "XA7A35TCSG324-1I": "xa7a50t", - "XA7A35TCSG324-1Q": "xa7a50t", - "XA7A35TCSG324-2I": "xa7a50t", - "XA7A35TCPG236-1I": "xa7a50t", - "XA7A35TCPG236-1Q": "xa7a50t", - "XA7A35TCPG236-2I": "xa7a50t", - "XA7A15TCPG236-1I": "xa7a15t", - "XA7A15TCPG236-1Q": "xa7a15t", - "XA7A15TCPG236-2I": "xa7a15t", - "XA7A15TCSG324-1I": "xa7a15t", - "XA7A15TCSG324-1Q": "xa7a15t", - "XA7A15TCSG324-2I": "xa7a15t", - "XA7A15TCSG325-1I": "xa7a15t", - "XA7A15TCSG325-1Q": "xa7a15t", - "XA7A15TCSG325-2I": "xa7a15t", - "XA7A50TCPG236-1I": "xa7a50t", - "XA7A50TCPG236-1Q": "xa7a50t", - "XA7A50TCPG236-2I": "xa7a50t", - "XA7A50TCSG324-1I": "xa7a50t", - "XA7A50TCSG324-1Q": "xa7a50t", - "XA7A50TCSG324-2I": "xa7a50t", - "XA7A50TCSG325-1I": "xa7a50t", - "XA7A50TCSG325-1Q": "xa7a50t", - "XA7A50TCSG325-2I": "xa7a50t", - "XA7A100TFGG484-1I": "xa7a100t", - "XA7A100TFGG484-1Q": "xa7a100t", - "XA7A100TFGG484-2I": "xa7a100t", - "XA7A100TCSG324-1I": "xa7a100t", - "XA7A100TCSG324-1Q": "xa7a100t", - "XA7A100TCSG324-2I": "xa7a100t", - - "EOS3FF512-PDN64": "ql-eos-s3", - "EOS3FF512-WRN42": "ql-eos-s3", - "EOS3FLF512-PDN64": "ql-eos-s3", - "EOS3FLF512-WRN42": "ql-eos-s3", - "EOS3CF512-PDN64": "ql-eos-s3", - "EOS3CF512-WRN42": "ql-eos-s3", - "EOS3CLF512-PDN64": "ql-eos-s3", - "EOS3CLF512-WRN42": "ql-eos-s3", - - "K4N8": "ql-k4n8_slow", - "K4N8_SLOW": "ql-k4n8_slow", - "K4N8_FAST": "ql-k4n8_fast" -} \ No newline at end of file + "xc7a50t": [ + "XC7A50TCSG324-1", + "XC7A35TCSG324-1", + "XC7A35TCPG236-1" + ], + "xc7a100t": [ + "XC7A100TCSG324-1", + "XC7A100TFGG484-2" + ], + "xc7a200t": [ + "XC7A200TSBG484-1" + ], + "xc7z010t": [ + "XC7C010CLG400-1" + ], + "ql-eos-s3": [ + "EOS3FF512-PDN64", + "EOS3FF512-WRN42", + "EOS3FLF512-PDN64", + "EOS3FLF512-WRN42", + "EOS3CF512-PDN64", + "EOS3CF512-WRN42", + "EOS3CLF512-PDN64", + "EOS3CLF512-WRN42" + ], + "ql-k4n8_slow": [ + "K4N8", + "K4N8_SLOW" + ], + "ql-k4n8_fast": [ + "K4N8_FAST" + ] +}