Commit Graph

19 Commits

Author SHA1 Message Date
Austin Seipp 1c7f51ed60 scripts/icestorm: check circuit @ 62MHz
With arachne-pnr this circuit couldn't hit 60MHz, just barely under it.
OTOH, nextpnr hits about ~68 MHz. So let's set it somewhere inbetween to
make sure this is true over time!

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:49:37 -06:00
Austin Seipp af3b1bb75d scripts/icestorm: dedupe calls to yosys-config
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:49:18 -06:00
Austin Seipp 13a9edf122 scripts/icestorm: remove unneeded -lgcc
This freestanding firmware doesn't need anything from the supporting
toolchain.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:09:07 -06:00
Austin Seipp 2944564ba8 scripts/icestorm: move SHIFT_COUNTER_BITS into Makefile
This makes it easier to build separate bitstreams for simulation targets
vs the real bitstream for hardware, without editing any source code.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:09:07 -06:00
Austin Seipp 752790a4d7 scripts/icestorm: comments only
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:09:07 -06:00
Austin Seipp d711ce527e scripts/icestorm: add 'timing' target
This dumps a simple IceTime report for the bitstream; we fix the device
package to CT256, corresponding to the HX8K.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:09:07 -06:00
Austin Seipp 4900ebb693 scripts/icestorm: force -march=rv32i
The IceStorm example core doesn't include compressed instructions or the
MULT extension; it is an rv32i core, not rv32i[m|c]. If the given
riscv32 toolchain is not explicitly told to generate rv32i code for the
firmware, it may generate invalid instructions which cause a trap during
simulation or on the hardware itself (although CATCH_ILLINSN is set to
zero in this case, too).

Luckily, any rv32i* toolchain (rv32imc for example) can fit the bill
here -- there's no use of libgcc or anything (which might introduce
illegal instructions generated previously) so just forcing the compiler
to generate the right code works nicely.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:09:07 -06:00
Austin Seipp fc71cadda4 scripts/icestorm: switch to nextpnr-ice40
nextpnr-ice40 gives a better fMAX for this design (by about ~9Mhz for
me: ~59MHz -> ~68MHz) and is The Way Of The Future.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 16:09:07 -06:00
Austin Seipp 070367c88d scripts/icestorm: touch up Makefile a bit
This touches up the Makefile so that it:

  - uses $@, $< and $^ in more places for brevity and robustness (typo
    guards, etc)
  - tracks dependencies slightly better (e.g. .pcf file changes weren't
    tracked before)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-11 15:59:56 -06:00
Austin Seipp 77a6b2dd26 scripts/icestorm: use 'yosys-config' to find data directory
This fixes the icestorm script to query yosys-config itself for the
right data directory. Not only does this fix installs where yosys was
not installed into /usr/local, it also ensures Icarus picks up a data
directory consistent with the version of yosys that you're using.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-02-14 16:54:47 -06:00
Austin Seipp 2260d2ab8a scripts: remove old -m32 argument to riscv-gcc
See also 55da6c7cd1

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-02-14 16:54:47 -06:00
Clifford Wolf f9da3f2ce8 Minor fixes in scripts/icestorm/ 2016-07-14 09:07:52 +02:00
Clifford Wolf 6c69b3812e Using .vvp instead of .exe for iverilog executables 2016-05-04 08:57:16 +02:00
Clifford Wolf 6783abd994 Merge branch 'master' of github.com:cliffordwolf/picorv32 2015-10-13 11:06:40 +02:00
Larry Doolittle f5eb93ff9d Add a missing dependency 2015-10-13 11:06:11 +02:00
Clifford Wolf a1b0d36432 Minor scripts/icestorm changes 2015-10-08 11:58:59 +02:00
Clifford Wolf 484fa4ac5f icestorm sim improvements 2015-07-21 17:43:33 +02:00
Clifford Wolf f4842be8bb Improved icestorm example 2015-07-19 16:44:31 +02:00
Clifford Wolf 6c7125b380 Improved icestorm example 2015-07-19 16:09:19 +02:00