Date:2011-09-06 16:37:01 (8 years 11 days ago)
Author:Werner Almesberger
Commit:87aa1e7345dc4fc1d344f551711052a2f50a8022
Message:m1/jtag-boot/: quick hack to boot an M1 with the "regular" bitstream (from NOR)

Files: m1/jtag-boot/Makefile (1 diff)
m1/jtag-boot/boot.bit (0 diffs)
m1/jtag-boot/boot.jtag (1 diff)
m1/jtag-boot/mkboot (1 diff)

Change Details

m1/jtag-boot/Makefile
1.PHONY: boot clean
2
3boot: boot.jtag boot.bit
4        jtag boot.jtag
5
6boot.bit: mkboot
7        ./mkboot >$@ || { rm -rf $@; exit 1; }
8
9clean:
10        rm -f boot.bit
m1/jtag-boot/boot.bit
m1/jtag-boot/boot.jtag
1cable milkymist
2detect
3instruction CFG_OUT 000100 BYPASS
4instruction CFG_IN 000101 BYPASS
5pld load boot.bit
m1/jtag-boot/mkboot
1#!/usr/bin/perl
2#
3# mkboot - generate a bitstream (in .bit format) that boots an M1
4# with the "regular" bitstream, using UrJTAG
5#
6# Hacked 2001 by Werner Almesberger
7#
8
9# magic, copied from xilinx_bitstream.c:xlx_bitstream_load_bit
10print pack("C*",
11    0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0,
12    0x0f, 0xf0, 0x00, 0x00, 0x01);
13
14@seq = (
15# 0xffff, # DUMMY
16    0xaa99, # Sync(1)
17    0x5566, # Sync(2)
18    0x3261, # write GENERAL1
19    0x0000, # start address 15:0
20    0x3281, # write GENERAL2
21    0x0037, # start address 23:16
22    0x30a1, # write CMD
23    0x000e); # IPROG
24# 0x2000); # NOP
25
26print pack("aN", "e", 2*@seq);
27
28print pack("n*", @seq);

Archive Download the corresponding diff file

Branches:
master



interactive