infrastructure to change SW without re-synthesizing
Stefan Schuermans

Stefan Schuermans commited on 2012-03-25 02:16:26
Showing 6 changed files, with 141 additions and 1 deletions.

... ...
@@ -0,0 +1 @@
1
+mips_sys_bd.bmm
... ...
@@ -0,0 +1,53 @@
1
+#! /bin/bash
2
+
3
+cd "$(dirname "$0")"
4
+
5
+DATA2MEM="/opt/Xilinx/13.4/ISE_DS/ISE/bin/lin64/data2mem"
6
+
7
+cd ..
8
+
9
+ERR=0
10
+
11
+"$DATA2MEM" \
12
+  -bm memory_maps/mips_sys_bd.bmm \
13
+  -bt e_system.bit \
14
+  -d >e_system.bit.txt
15
+
16
+"$DATA2MEM" \
17
+  -bm memory_maps/mips_sys_bd.bmm \
18
+  -bt e_system.bit \
19
+  -bd fw/rom.bin tag rom \
20
+  -o b changed_rom.bit
21
+
22
+"$DATA2MEM" \
23
+  -bm memory_maps/mips_sys_bd.bmm \
24
+  -bt changed_rom.bit \
25
+  -d >changed_rom.bit.txt
26
+
27
+N=$(diff e_system.bit.txt changed_rom.bit.txt | wc -l)
28
+if (($N > 12))
29
+then
30
+  echo "ROM failed" >&2
31
+  ERR=1
32
+fi
33
+
34
+"$DATA2MEM" \
35
+  -bm memory_maps/mips_sys_bd.bmm \
36
+  -bt e_system.bit \
37
+  -bd fw/ram.bin tag ram \
38
+  -o b changed_ram.bit
39
+
40
+"$DATA2MEM" \
41
+  -bm memory_maps/mips_sys_bd.bmm \
42
+  -bt changed_ram.bit \
43
+  -d >changed_ram.bit.txt
44
+
45
+N=$(diff e_system.bit.txt changed_ram.bit.txt | wc -l)
46
+if (($N > 12))
47
+then
48
+  echo "RAM failed" >&2
49
+  ERR=1
50
+fi
51
+
52
+exit $ERR
53
+
... ...
@@ -0,0 +1,21 @@
1
+ADDRESS_SPACE rom RAMB16 [0x00000000:0x00003FFF]
2
+    BUS_BLOCK
3
+        instr/Mrom__varindex00002 RAMB16 [3:0] [0:4095];
4
+        instr/Mrom__varindex00001 RAMB16 [7:4] [0:4095];
5
+        instr/Mrom__varindex00004 RAMB16 [11:8] [0:4095];
6
+        instr/Mrom__varindex00003 RAMB16 [15:12] [0:4095];
7
+        instr/Mrom__varindex00006 RAMB16 [19:16] [0:4095];
8
+        instr/Mrom__varindex00005 RAMB16 [23:20] [0:4095];
9
+        instr/Mrom__varindex00008 RAMB16 [27:24] [0:4095];
10
+        instr/Mrom__varindex00007 RAMB16 [31:28] [0:4095];
11
+    END_BUS_BLOCK;
12
+END_ADDRESS_SPACE;
13
+
14
+ADDRESS_SPACE ram RAMB16 [0x00000000:0x00001FFF]
15
+    BUS_BLOCK
16
+        data_0/Mram_s_buf RAMB16 [7:0] [0:2047];
17
+        data_1/Mram_s_buf RAMB16 [15:8] [0:2047];
18
+        data_2/Mram_s_buf RAMB16 [23:16] [0:2047];
19
+        data_3/Mram_s_buf RAMB16 [31:24] [0:2047];
20
+    END_BUS_BLOCK;
21
+END_ADDRESS_SPACE;
... ...
@@ -0,0 +1,41 @@
1
+// BMM LOC annotation file.
2
+//
3
+// Release 13.4 - (null) O.87xd, build 2.7 Nov 11, 2011
4
+// Copyright (c) 1995-2012 Xilinx, Inc.  All rights reserved.
5
+
6
+
7
+///////////////////////////////////////////////////////////////////////////////
8
+//
9
+// Address space 'ram' 0x00000000:0x00001FFF (8 KBytes).
10
+//
11
+///////////////////////////////////////////////////////////////////////////////
12
+
13
+ADDRESS_SPACE ram RAMB16 [0x00000000:0x00001FFF]
14
+    BUS_BLOCK
15
+        data_0/Mram_s_buf RAMB16 [7:0] [0:2047] PLACED = X1Y5;
16
+        data_1/Mram_s_buf RAMB16 [15:8] [0:2047] PLACED = X1Y4;
17
+        data_2/Mram_s_buf RAMB16 [23:16] [0:2047] PLACED = X1Y6;
18
+        data_3/Mram_s_buf RAMB16 [31:24] [0:2047] PLACED = X1Y7;
19
+    END_BUS_BLOCK;
20
+END_ADDRESS_SPACE;
21
+
22
+
23
+///////////////////////////////////////////////////////////////////////////////
24
+//
25
+// Address space 'rom' 0x00000000:0x00003FFF (16 KBytes).
26
+//
27
+///////////////////////////////////////////////////////////////////////////////
28
+
29
+ADDRESS_SPACE rom RAMB16 [0x00000000:0x00003FFF]
30
+    BUS_BLOCK
31
+        instr/Mrom__varindex00002 RAMB16 [3:0] [0:4095] PLACED = X0Y3;
32
+        instr/Mrom__varindex00001 RAMB16 [7:4] [0:4095] PLACED = X0Y2;
33
+        instr/Mrom__varindex00004 RAMB16 [11:8] [0:4095] PLACED = X0Y9;
34
+        instr/Mrom__varindex00003 RAMB16 [15:12] [0:4095] PLACED = X0Y6;
35
+        instr/Mrom__varindex00006 RAMB16 [19:16] [0:4095] PLACED = X0Y8;
36
+        instr/Mrom__varindex00005 RAMB16 [23:20] [0:4095] PLACED = X0Y7;
37
+        instr/Mrom__varindex00008 RAMB16 [27:24] [0:4095] PLACED = X0Y5;
38
+        instr/Mrom__varindex00007 RAMB16 [31:28] [0:4095] PLACED = X0Y4;
39
+    END_BUS_BLOCK;
40
+END_ADDRESS_SPACE;
41
+
... ...
@@ -0,0 +1,20 @@
1
+#! /bin/bash
2
+
3
+cd "$(dirname "$0")"
4
+
5
+DATA2MEM="/opt/Xilinx/13.4/ISE_DS/ISE/bin/lin64/data2mem"
6
+
7
+cd ..
8
+
9
+"$DATA2MEM" \
10
+  -bm memory_maps/mips_sys_bd.bmm \
11
+  -bt e_system.bit \
12
+  -bd fw/rom.bin tag rom \
13
+  -o b e_system_tmp.bit
14
+
15
+"$DATA2MEM" \
16
+  -bm memory_maps/mips_sys_bd.bmm \
17
+  -bt e_system_tmp.bit \
18
+  -bd fw/ram.bin tag ram \
19
+  -o b e_system.bit
20
+
... ...
@@ -171,6 +171,9 @@
171 171
       <association xil_pn:name="BehavioralSimulation" xil_pn:seqID="5"/>
172 172
       <association xil_pn:name="Implementation" xil_pn:seqID="5"/>
173 173
     </file>
174
+    <file xil_pn:name="memory_maps/mips_sys.bmm" xil_pn:type="FILE_BMM">
175
+      <association xil_pn:name="Implementation" xil_pn:seqID="0"/>
176
+    </file>
174 177
   </files>
175 178
 
176 179
   <properties>
... ...
@@ -293,7 +296,7 @@
293 296
     <property xil_pn:name="Language" xil_pn:value="VHDL" xil_pn:valueState="default"/>
294 297
     <property xil_pn:name="Last Applied Goal" xil_pn:value="Balanced" xil_pn:valueState="default"/>
295 298
     <property xil_pn:name="Last Applied Strategy" xil_pn:value="Xilinx Default (unlocked)" xil_pn:valueState="default"/>
296
-    <property xil_pn:name="Last Selected UCF File" xil_pn:value="/home/stefan/spartan3/mips_sys/constraints/lcd.ucf" xil_pn:valueState="non-default"/>
299
+    <property xil_pn:name="Last Selected UCF File" xil_pn:value="/home/stefan/spartan3/mips_sys/constraints/clk.ucf" xil_pn:valueState="non-default"/>
297 300
     <property xil_pn:name="Last Unlock Status" xil_pn:value="false" xil_pn:valueState="default"/>
298 301
     <property xil_pn:name="Launch SDK after Export" xil_pn:value="true" xil_pn:valueState="default"/>
299 302
     <property xil_pn:name="Library for Verilog Sources" xil_pn:value="" xil_pn:valueState="default"/>
... ...
@@ -489,6 +492,7 @@
489 492
     <binding xil_pn:location="/e_system" xil_pn:name="constraints/switches.ucf"/>
490 493
     <binding xil_pn:location="/e_system" xil_pn:name="constraints/uart.ucf"/>
491 494
     <binding xil_pn:location="/e_system" xil_pn:name="constraints/eth.ucf"/>
495
+    <binding xil_pn:location="/e_system" xil_pn:name="memory_maps/mips_sys.bmm"/>
492 496
   </bindings>
493 497
 
494 498
   <libraries/>
495 499