aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/bitstream.cc
diff options
context:
space:
mode:
authorSimon Schubert <2@0x2c.org>2019-06-10 11:30:01 +0200
committerSimon Schubert <2@0x2c.org>2019-06-10 14:04:25 +0200
commit88eeafae12b78798f6b886b2d4193b5fa64bac4c (patch)
treeeaff7c02dc6db212f6b147a5193b1a1ddf2b6ab0 /ice40/bitstream.cc
parent187db92b0571b87360516598e88f36cdb1f33349 (diff)
downloadnextpnr-88eeafae12b78798f6b886b2d4193b5fa64bac4c.tar.gz
nextpnr-88eeafae12b78798f6b886b2d4193b5fa64bac4c.tar.bz2
nextpnr-88eeafae12b78798f6b886b2d4193b5fa64bac4c.zip
ice40: add RGB_DRV/LED_DRV_CUR support for u4k
Diffstat (limited to 'ice40/bitstream.cc')
-rw-r--r--ice40/bitstream.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index 9b85dff5..d35c43aa 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -610,6 +610,13 @@ void write_asc(const Context *ctx, std::ostream &out)
set_config(ti_ramt, config.at(y + 1).at(x), "RamConfig.CBIT_1", write_mode & 0x2);
set_config(ti_ramt, config.at(y + 1).at(x), "RamConfig.CBIT_2", read_mode & 0x1);
set_config(ti_ramt, config.at(y + 1).at(x), "RamConfig.CBIT_3", read_mode & 0x2);
+ } else if (cell.second->type == ctx->id("SB_LED_DRV_CUR")) {
+ set_ec_cbit(config, ctx, get_ec_config(ctx->chip_info, cell.second->bel), "LED_DRV_CUR_EN", true, "IpConfig.");
+ } else if (cell.second->type == ctx->id("SB_RGB_DRV")) {
+ const std::vector<std::pair<std::string, int>> rgb_params = {
+ {"RGB0_CURRENT", 6}, {"RGB1_CURRENT", 6}, {"RGB2_CURRENT", 6}};
+ configure_extra_cell(config, ctx, cell.second.get(), rgb_params, true, std::string("IpConfig."));
+ set_ec_cbit(config, ctx, get_ec_config(ctx->chip_info, cell.second->bel), "RGB_DRV_EN", true, "IpConfig.");
} else if (cell.second->type == ctx->id("SB_RGBA_DRV")) {
const std::vector<std::pair<std::string, int>> rgba_params = {
{"CURRENT_MODE", 1}, {"RGB0_CURRENT", 6}, {"RGB1_CURRENT", 6}, {"RGB2_CURRENT", 6}};