Add Murax scripts

This commit is contained in:
Charles Papon 2017-07-29 22:43:43 +02:00
parent 2736681be6
commit 087e3dda89
4 changed files with 82 additions and 0 deletions

View File

@ -264,6 +264,8 @@ Murax ->
ICE40-HX -> 53 Mhz 2142 LC (icestorm) ICE40-HX -> 53 Mhz 2142 LC (icestorm)
``` ```
There is some scripts to generate the SoC and call the icestorm toolchain there : scripts/Murax/
## Build the RISC-V GCC ## Build the RISC-V GCC
To install in /opt/ the rv32i and rv32im gcc, do the following (will take hours): To install in /opt/ the rv32i and rv32im gcc, do the following (will take hours):

23
scripts/Murax/makefile Normal file
View File

@ -0,0 +1,23 @@
VERILOG = ../../Murax.v toplevel.v
bin/toplevel.bin : toplevel.pcf ${VERILOG}
mkdir -p bin
yosys -v3 -p "synth_ice40 -top toplevel -blif bin/toplevel.blif" ${VERILOG}
arachne-pnr -p toplevel.pcf -d 8k --max-passes 600 -P ct256 bin/toplevel.blif -o bin/toplevel.asc
icepack bin/toplevel.asc bin/toplevel.bin
generate :
(cd ../..; sbt "run-main vexriscv.demo.Murax")
compile : bin/toplevel.bin
time: bin/toplevel.bin
icetime -tmd hx8k bin/toplevel.asc
prog : bin/toplevel.bin
sudo iceprog -S bin/toplevel.bin

View File

@ -0,0 +1,16 @@
## ICE40-hx8k breakout board
set_io io_J3 J3
set_io io_H16 H16
set_io io_G15 G15
set_io io_G16 G16
set_io io_F15 F15
set_io io_led[0] B5
set_io io_led[1] B4
set_io io_led[2] A2
set_io io_led[3] A1
set_io io_led[4] C5
set_io io_led[5] C4
set_io io_led[6] B3
set_io io_led[7] C3

41
scripts/Murax/toplevel.v Normal file
View File

@ -0,0 +1,41 @@
`timescale 1ns / 1ps
module toplevel(
input io_J3,
input io_H16,
input io_G15,
output io_G16,
input io_F15,
output [7:0] io_led
);
wire [31:0] io_gpioA_read;
wire [31:0] io_gpioA_write;
wire [31:0] io_gpioA_writeEnable;
wire io_mainClk;
wire io_jtag_tck;
SB_GB mainClkBuffer (
.USER_SIGNAL_TO_GLOBAL_BUFFER (io_J3),
.GLOBAL_BUFFER_OUTPUT ( io_mainClk)
);
SB_GB jtagClkBuffer (
.USER_SIGNAL_TO_GLOBAL_BUFFER (io_H16),
.GLOBAL_BUFFER_OUTPUT ( io_jtag_tck)
);
assign io_led = io_gpioA_write[7 : 0];
Murax murax (
.io_asyncReset(0),
.io_mainClk (io_mainClk ),
.io_jtag_tck(io_jtag_tck),
.io_jtag_tdi(io_G15),
.io_jtag_tdo(io_G16),
.io_jtag_tms(io_F15),
.io_gpioA_read (io_gpioA_read),
.io_gpioA_write (io_gpioA_write),
.io_gpioA_writeEnable(io_gpioA_writeEnable)
);
endmodule