Skip to content

Commit

Permalink
Support variants for ECP5
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed May 16, 2023
1 parent f1e5710 commit 1989890
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 453 deletions.
166 changes: 102 additions & 64 deletions devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@
"families": {
"ECP5": {
"devices": {
"LFE5U-12F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x21111043",
"frames": 7562,
"bits_per_frame": 592,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 0,
"max_row" : 50,
"max_col" : 72,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
},
"LFE5U-25F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x41111043",
"frames": 7562,
"bits_per_frame": 592,
"pad_bits_after_frame": 0,
Expand All @@ -26,11 +12,30 @@
"max_col" : 72,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
"fuzz": 1,
"variants": {
"LFE5U-25F": {
"idcode": "0x41111043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I" ]
},
"LFE5U-12F": {
"idcode": "0x21111043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I" ]
},
"LAE5U-12F": {
"idcode": "0x21111043",
"packages": ["caBGA381"],
"speeds": [ 6, 7 ],
"suffixes": [ "E" ]
}
}
},
"LFE5U-45F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x41112043",
"frames": 9470,
"bits_per_frame": 846,
"pad_bits_after_frame": 0,
Expand All @@ -39,11 +44,18 @@
"max_col" : 90,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
"fuzz": 1,
"variants": {
"LFE5U-45F": {
"idcode": "0x41112043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I" ]
}
}
},
"LFE5U-85F": {
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x41113043",
"frames": 13294,
"bits_per_frame": 1136,
"pad_bits_after_frame": 0,
Expand All @@ -52,11 +64,18 @@
"max_col" : 126,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
"fuzz": 1,
"variants": {
"LFE5U-85F": {
"idcode": "0x41113043",
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I" ]
}
}
},
"LFE5UM-25F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x01111043",
"frames": 7562,
"bits_per_frame": 592,
"pad_bits_after_frame": 0,
Expand All @@ -65,11 +84,30 @@
"max_col" : 72,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
"fuzz": 1,
"variants": {
"LFE5UM-25F": {
"idcode": "0x01111043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I" ]
},
"LAE5UM-25F": {
"idcode": "0x01111043",
"packages": ["csfBGA285", "caBGA381"],
"speeds": [ 6, 7 ],
"suffixes": [ "E" ]
},
"LFE5UM5G-25F": {
"idcode": "0x81111043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 8 ],
"suffixes": [ "C", "I" ]
}
}
},
"LFE5UM-45F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x01112043",
"frames": 9470,
"bits_per_frame": 846,
"pad_bits_after_frame": 0,
Expand All @@ -78,50 +116,30 @@
"max_col" : 90,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
"fuzz": 1,
"variants": {
"LFE5UM-45F": {
"idcode": "0x01112043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I" ]
},
"LAE5UM-45F": {
"idcode": "0x01112043",
"packages": ["csfBGA285", "caBGA381"],
"speeds": [ 6, 7 ],
"suffixes": [ "E" ]
},
"LFE5UM5G-45F": {
"idcode": "0x81112043",
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 8 ],
"suffixes": [ "C", "I" ]
}
}
},
"LFE5UM-85F": {
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x01113043",
"frames": 13294,
"bits_per_frame": 1136,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 0,
"max_row" : 95,
"max_col" : 126,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
},
"LFE5UM5G-25F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x81111043",
"frames": 7562,
"bits_per_frame": 592,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 0,
"max_row" : 50,
"max_col" : 72,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
},
"LFE5UM5G-45F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x81112043",
"frames": 9470,
"bits_per_frame": 846,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 2,
"max_row" : 71,
"max_col" : 90,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
},
"LFE5UM5G-85F": {
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x81113043",
"frames": 13294,
"bits_per_frame": 1136,
"pad_bits_after_frame": 0,
Expand All @@ -130,7 +148,27 @@
"max_col" : 126,
"row_bias" : 0,
"col_bias" : 0,
"fuzz": 1
"fuzz": 1,
"variants": {
"LFE5UM-85F": {
"idcode": "0x01113043",
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 6, 7, 8 ],
"suffixes": [ "C", "I"]
},
"LAE5UM-85F": {
"idcode": "0x01113043",
"packages": ["caBGA756"],
"speeds": [ 6, 7 ],
"suffixes": [ "E" ]
},
"LFE5UM5G-85F": {
"idcode": "0x81113043",
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"speeds": [ 8 ],
"suffixes": [ "C", "I" ]
}
}
}
}
},
Expand Down
12 changes: 6 additions & 6 deletions diamond.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ set -- "$1" $NCL_SUB
PART=$1

case "${PART}" in
LFE5U-85F)
LFE5U-85|LFE5U-85F)
PACKAGE="${DEV_PACKAGE:-CABGA756}"
DEVICE="LFE5U-85F"
LSE_ARCH="ECP5U"
;;
LFE5U-45F)
LFE5U-45|LFE5U-45F)
PACKAGE="${DEV_PACKAGE:-CABGA381}"
DEVICE="LFE5U-45F"
LSE_ARCH="ECP5U"
;;
LFE5U-25F)
LFE5U-25|LFE5U-25F)
PACKAGE="${DEV_PACKAGE:-CABGA381}"
DEVICE="LFE5U-25F"
LSE_ARCH="ECP5U"
Expand All @@ -111,17 +111,17 @@ case "${PART}" in
LSE_ARCH="ECP5U"
;;

LFE5UM-85F)
LFE5UM-85|LFE5UM-85F)
PACKAGE="${DEV_PACKAGE:-CABGA756}"
DEVICE="LFE5UM-85F"
LSE_ARCH="ECP5UM"
;;
LFE5UM-45F)
LFE5UM-45|LFE5UM-45F)
PACKAGE="${DEV_PACKAGE:-CABGA381}"
DEVICE="LFE5UM-45F"
LSE_ARCH="ECP5UM"
;;
LFE5UM-25F)
LFE5UM-25|LFE5UM-25F)
PACKAGE="${DEV_PACKAGE:-CABGA381}"
DEVICE="LFE5UM-25F"
LSE_ARCH="ECP5UM"
Expand Down
3 changes: 1 addition & 2 deletions libtrellis/src/ChipConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ string ChipConfig::to_string() const
{
stringstream ss;
ss << ".device " << chip_name << endl << endl;
if (!chip_variant.empty())
ss << ".variant " << chip_variant << endl << endl;
ss << ".variant " << chip_variant << endl << endl;
for (const auto &meta : metadata)
ss << ".comment " << meta << endl;
for (const auto &sc : sysconfig)
Expand Down
2 changes: 1 addition & 1 deletion libtrellis/src/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DeviceLocator find_device_by_name(string name) {

DeviceLocator find_device_by_name_and_variant(string name, string variant) {
if (variant.empty())
return find_device_by_name(name);
throw runtime_error("using old nexpnr with new trellis tools. ");
auto found = find_device_generic([variant](const string &n, const pt::ptree &p) -> bool {
UNUSED(p);
return n == variant;
Expand Down
88 changes: 0 additions & 88 deletions metadata/ECP5/LFE5U-12F/globals.json

This file was deleted.

Loading

0 comments on commit 1989890

Please sign in to comment.