aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/bitstream.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-08-01 09:45:08 +0200
committerDavid Shah <davey1576@gmail.com>2018-08-01 09:45:08 +0200
commit0414c93403a75c8d5d14feb70f3ccf7a9a127c47 (patch)
tree395cbec1e66410fa39b7ea771843a6b2ac5c1b93 /ice40/bitstream.cc
parentbbd2ecf558f8b60bbe3fc836b64819b5c4af51fe (diff)
downloadnextpnr-0414c93403a75c8d5d14feb70f3ccf7a9a127c47.tar.gz
nextpnr-0414c93403a75c8d5d14feb70f3ccf7a9a127c47.tar.bz2
nextpnr-0414c93403a75c8d5d14feb70f3ccf7a9a127c47.zip
ice40: Add HFOSC support, force fabric routing on oscillators for now
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/bitstream.cc')
-rw-r--r--ice40/bitstream.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index e9851a83..d0d6b205 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -425,6 +425,10 @@ void write_asc(const Context *ctx, std::ostream &out)
{"A_SIGNED", 1},
{"B_SIGNED", 1}};
configure_extra_cell(config, ctx, cell.second.get(), mac16_params, false, std::string("IpConfig."));
+ } else if (cell.second->type == ctx->id("ICESTORM_HFOSC")) {
+ const std::vector<std::pair<std::string, int>> hfosc_params = {{"CLKHF_DIV", 2}, {"TRIM_EN", 1}};
+ configure_extra_cell(config, ctx, cell.second.get(), hfosc_params, true, std::string("IpConfig."));
+
} else if (cell.second->type == ctx->id("ICESTORM_PLL")) {
const std::vector<std::pair<std::string, int>> pll_params = {{"DELAY_ADJMODE_FB", 1},
{"DELAY_ADJMODE_REL", 1},