Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Git Source Tree
Root/
Source at commit 87aa1e7345dc4fc1d344f551711052a2f50a8022 created 12 years 6 months ago. By Werner Almesberger, m1/jtag-boot/: quick hack to boot an M1 with the "regular" bitstream (from NOR) | |
---|---|
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 |
10 | print 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 | |
26 | print pack("aN", "e", 2*@seq); |
27 | |
28 | print pack("n*", @seq); |
29 |
Branches:
master