aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-12 08:50:39 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-12 08:50:39 -0700
commitf7a9769c140f6a56e51d7384dfd8e76bf2aef66d (patch)
tree4be49b8b30a03ac7d4deafaa7318de275d5c3a7f /techlibs/ice40
parentac2aff9e28a087a9a2697cd6ccf754af738903a7 (diff)
parenta91ea6612a73568782c80bd12ce2875353e2b5c5 (diff)
downloadyosys-f7a9769c140f6a56e51d7384dfd8e76bf2aef66d.tar.gz
yosys-f7a9769c140f6a56e51d7384dfd8e76bf2aef66d.tar.bz2
yosys-f7a9769c140f6a56e51d7384dfd8e76bf2aef66d.zip
Merge remote-tracking branch 'origin/master' into xaig
Diffstat (limited to 'techlibs/ice40')
-rw-r--r--techlibs/ice40/cells_sim.v35
-rw-r--r--techlibs/ice40/synth_ice40.cc12
2 files changed, 43 insertions, 4 deletions
diff --git a/techlibs/ice40/cells_sim.v b/techlibs/ice40/cells_sim.v
index 40972766d..560008bc4 100644
--- a/techlibs/ice40/cells_sim.v
+++ b/techlibs/ice40/cells_sim.v
@@ -957,10 +957,21 @@ endmodule
(* blackbox *)
module SB_HFOSC(
+ input TRIM0,
+ input TRIM1,
+ input TRIM2,
+ input TRIM3,
+ input TRIM4,
+ input TRIM5,
+ input TRIM6,
+ input TRIM7,
+ input TRIM8,
+ input TRIM9,
input CLKHFPU,
input CLKHFEN,
output CLKHF
);
+parameter TRIM_EN = "0b0";
parameter CLKHF_DIV = "0b00";
endmodule
@@ -990,6 +1001,30 @@ parameter RGB2_CURRENT = "0b000000";
endmodule
(* blackbox *)
+module SB_LED_DRV_CUR(
+ input EN,
+ output LEDPU
+);
+endmodule
+
+(* blackbox *)
+module SB_RGB_DRV(
+ input RGBLEDEN,
+ input RGB0PWM,
+ input RGB1PWM,
+ input RGB2PWM,
+ input RGBPU,
+ output RGB0,
+ output RGB1,
+ output RGB2
+);
+parameter CURRENT_MODE = "0b0";
+parameter RGB0_CURRENT = "0b000000";
+parameter RGB1_CURRENT = "0b000000";
+parameter RGB2_CURRENT = "0b000000";
+endmodule
+
+(* blackbox *)
module SB_I2C(
input SBCLKI,
input SBRWI,
diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc
index 718f9d9e0..168161a90 100644
--- a/techlibs/ice40/synth_ice40.cc
+++ b/techlibs/ice40/synth_ice40.cc
@@ -245,11 +245,13 @@ struct SynthIce40Pass : public ScriptPass
run("proc");
}
- if (flatten && check_label("flatten", "(unless -noflatten)"))
+ if (check_label("flatten", "(unless -noflatten)"))
{
- run("flatten");
- run("tribuf -logic");
- run("deminout");
+ if (flatten) {
+ run("flatten");
+ run("tribuf -logic");
+ run("deminout");
+ }
}
if (check_label("coarse"))
@@ -259,6 +261,8 @@ struct SynthIce40Pass : public ScriptPass
run("check");
run("opt");
run("wreduce");
+ run("peepopt");
+ run("opt_clean");
run("share");
run("techmap -map +/cmp2lut.v -D LUT_WIDTH=4");
run("opt_expr");