aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaire Xen <claire@clairexen.net>2021-12-06 16:09:00 +0100
committerGitHub <noreply@github.com>2021-12-06 16:09:00 +0100
commit354f65ab4a4b47defed961ac6efbfee559ffa641 (patch)
tree8ae2d60404dab8a52a78f8f1ab49f0c97c650ab2
parente8edf98772672653c67dc3f4877980abcaaedf09 (diff)
parenteeca10190b6934889cf068b49478388703afbf70 (diff)
downloadpicorv32-354f65ab4a4b47defed961ac6efbfee559ffa641.tar.gz
picorv32-354f65ab4a4b47defed961ac6efbfee559ffa641.zip
Merge pull request #202 from osresearch/icebreaker-fast-mul
picosoc: enable fast multiply option for icebreaker
-rw-r--r--picosoc/Makefile4
-rw-r--r--picosoc/icebreaker.v4
-rw-r--r--picosoc/picosoc.v9
3 files changed, 11 insertions, 6 deletions
diff --git a/picosoc/Makefile b/picosoc/Makefile
index f600062..0346d8e 100644
--- a/picosoc/Makefile
+++ b/picosoc/Makefile
@@ -57,7 +57,7 @@ icebsynsim: icebreaker_syn_tb.vvp icebreaker_fw.hex
vvp -N $< +firmware=icebreaker_fw.hex
icebreaker.json: icebreaker.v ice40up5k_spram.v spimemio.v simpleuart.v picosoc.v ../picorv32.v
- yosys -ql icebreaker.log -p 'synth_ice40 -top icebreaker -json icebreaker.json' $^
+ yosys -ql icebreaker.log -p 'synth_ice40 -dsp -top icebreaker -json icebreaker.json' $^
icebreaker_tb.vvp: icebreaker_tb.v icebreaker.v ice40up5k_spram.v spimemio.v simpleuart.v picosoc.v ../picorv32.v spiflash.v
iverilog -s testbench -o $@ $^ `yosys-config --datdir/ice40/cells_sim.v`
@@ -69,7 +69,7 @@ icebreaker_syn.v: icebreaker.json
yosys -p 'read_json icebreaker.json; write_verilog icebreaker_syn.v'
icebreaker.asc: icebreaker.pcf icebreaker.json
- nextpnr-ice40 --freq 13 --up5k --asc icebreaker.asc --pcf icebreaker.pcf --json icebreaker.json
+ nextpnr-ice40 --freq 13 --up5k --package sg48 --asc icebreaker.asc --pcf icebreaker.pcf --json icebreaker.json
icebreaker.bin: icebreaker.asc
icetime -d up5k -c 12 -mtr icebreaker.rpt icebreaker.asc
diff --git a/picosoc/icebreaker.v b/picosoc/icebreaker.v
index b76ed7d..a943bc6 100644
--- a/picosoc/icebreaker.v
+++ b/picosoc/icebreaker.v
@@ -108,7 +108,9 @@ module icebreaker (
picosoc #(
.BARREL_SHIFTER(0),
- .ENABLE_MULDIV(0),
+ .ENABLE_MUL(0),
+ .ENABLE_DIV(0),
+ .ENABLE_FAST_MUL(1),
.MEM_WORDS(MEM_WORDS)
) soc (
.clk (clk ),
diff --git a/picosoc/picosoc.v b/picosoc/picosoc.v
index 6315219..9790791 100644
--- a/picosoc/picosoc.v
+++ b/picosoc/picosoc.v
@@ -70,7 +70,9 @@ module picosoc (
input flash_io3_di
);
parameter [0:0] BARREL_SHIFTER = 1;
- parameter [0:0] ENABLE_MULDIV = 1;
+ parameter [0:0] ENABLE_MUL = 1;
+ parameter [0:0] ENABLE_DIV = 1;
+ parameter [0:0] ENABLE_FAST_MUL = 0;
parameter [0:0] ENABLE_COMPRESSED = 1;
parameter [0:0] ENABLE_COUNTERS = 1;
parameter [0:0] ENABLE_IRQ_QREGS = 0;
@@ -136,8 +138,9 @@ module picosoc (
.BARREL_SHIFTER(BARREL_SHIFTER),
.COMPRESSED_ISA(ENABLE_COMPRESSED),
.ENABLE_COUNTERS(ENABLE_COUNTERS),
- .ENABLE_MUL(ENABLE_MULDIV),
- .ENABLE_DIV(ENABLE_MULDIV),
+ .ENABLE_MUL(ENABLE_MUL),
+ .ENABLE_DIV(ENABLE_DIV),
+ .ENABLE_FAST_MUL(ENABLE_FAST_MUL),
.ENABLE_IRQ(1),
.ENABLE_IRQ_QREGS(ENABLE_IRQ_QREGS)
) cpu (