scripts/murax better makefile, add pullup on jtag interface

This commit is contained in:
Charles Papon 2017-08-03 23:22:57 +02:00
parent ac59eebb8d
commit d962406b26
3 changed files with 58 additions and 19 deletions

View File

@ -2,16 +2,21 @@
VERILOG = ../../Murax.v toplevel.v 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 : generate :
(cd ../..; sbt "run-main vexriscv.demo.Murax") (cd ../..; sbt "run-main vexriscv.demo.Murax")
../../Murax.v :
(cd ../..; sbt "run-main vexriscv.demo.Murax")
bin/toplevel.blif : ${VERILOG}
mkdir -p bin
yosys -v3 -p "synth_ice40 -top toplevel -blif bin/toplevel.blif" ${VERILOG}
bin/toplevel.asc : toplevel.pcf bin/toplevel.blif
arachne-pnr -p toplevel.pcf -d 8k --max-passes 600 -P ct256 bin/toplevel.blif -o bin/toplevel.asc
bin/toplevel.bin : bin/toplevel.asc
icepack bin/toplevel.asc bin/toplevel.bin
compile : bin/toplevel.bin compile : bin/toplevel.bin

View File

@ -16,3 +16,4 @@ set_io io_led[5] C4
set_io io_led[6] B3 set_io io_led[6] B3
set_io io_led[7] C3 set_io io_led[7] C3

View File

@ -14,28 +14,61 @@ module toplevel(
wire [31:0] io_gpioA_read; wire [31:0] io_gpioA_read;
wire [31:0] io_gpioA_write; wire [31:0] io_gpioA_write;
wire [31:0] io_gpioA_writeEnable; wire [31:0] io_gpioA_writeEnable;
wire io_mainClk;
wire io_jtag_tck; wire io_jtag_tck;
wire io_jtag_tdi;
wire io_jtag_tms;
SB_IO #(
.PIN_TYPE(6'b0000_01),
.PULLUP(1'b1)
) io_jtag_tck_buff (
.PACKAGE_PIN(io_H16),
.D_IN_0(io_jtag_tck)
);
SB_IO #(
.PIN_TYPE(6'b0000_01),
.PULLUP(1'b1)
) io_jtag_tdi_buff (
.PACKAGE_PIN(io_G15),
.D_IN_0(io_jtag_tdi)
);
SB_IO #(
.PIN_TYPE(6'b0000_01),
.PULLUP(1'b1)
) io_jtag_tms_buff (
.PACKAGE_PIN(io_F15),
.D_IN_0(io_jtag_tms)
);
wire io_mainClk_gb;
wire io_jtag_tck_gb;
SB_GB mainClkBuffer ( SB_GB mainClkBuffer (
.USER_SIGNAL_TO_GLOBAL_BUFFER (io_J3), .USER_SIGNAL_TO_GLOBAL_BUFFER (io_J3),
.GLOBAL_BUFFER_OUTPUT ( io_mainClk) .GLOBAL_BUFFER_OUTPUT ( io_mainClk_gb)
); );
SB_GB jtagClkBuffer ( SB_GB jtagClkBuffer (
.USER_SIGNAL_TO_GLOBAL_BUFFER (io_H16), .USER_SIGNAL_TO_GLOBAL_BUFFER (io_jtag_tck),
.GLOBAL_BUFFER_OUTPUT ( io_jtag_tck) .GLOBAL_BUFFER_OUTPUT ( io_jtag_tck_gb)
); );
assign io_led = io_gpioA_write[7 : 0]; assign io_led = io_gpioA_write[7 : 0];
Murax murax ( Murax murax (
.io_asyncReset(0), .io_asyncReset(0),
.io_mainClk (io_mainClk ), .io_mainClk (io_mainClk_gb ),
.io_jtag_tck(io_jtag_tck), .io_jtag_tck(io_jtag_tck_gb),
.io_jtag_tdi(io_G15), .io_jtag_tdi(io_jtag_tdi),
.io_jtag_tdo(io_G16), .io_jtag_tdo(io_jtag_tdo),
.io_jtag_tms(io_F15), .io_jtag_tms(io_jtag_tms),
.io_gpioA_read (io_gpioA_read), .io_gpioA_read (io_gpioA_read),
.io_gpioA_write (io_gpioA_write), .io_gpioA_write (io_gpioA_write),
.io_gpioA_writeEnable(io_gpioA_writeEnable), .io_gpioA_writeEnable(io_gpioA_writeEnable),