Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hw/system/spatz_cluster/src/generated/bootrom.sv
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module bootrom #(
localparam int AddrBits = RomSize > 1 ? $clog2(RomSize) : 1;

const logic [RomSize-1:0][DataWidth-1:0] mem = {
512'h000000000000000000000000000200000000000000100000000000000000000000000000000000020000000000001000ffdff06f10500073000380670003a383,
512'h000383930583839301c383b30205ae030185a3831050007330461073008666133040267330431073800303130000133704858593000005973053107304c30313,
512'h0000000000100000000000000000000000000000000000020000000000001000ffdff06f10500073000380670003a383000383930583839301c383b30205ae03,
512'h0185a383105000733046107300666633000803373040267330461073008666133040267330431073800303130000133705858593000005973053107305c30313,
512'h0000031700000f9300000f1300000e9300000e1300000d9300000d1300000c9300000c1300000b9300000b1300000a9300000a13000009930000091300000893,
512'h00000813000007930000071300000693000006130000059300000513000004930000041300000393000003130000029300000213000001930000011300000093
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ package spatz_cluster_pkg;

localparam int unsigned TCDMStartAddr = 32'h100000;
localparam int unsigned TCDMSize = 32'h20000;

localparam logic AddrMisalign = 1'b0; // 0-aligned, 1-misalign
localparam int unsigned PeriStartAddr = TCDMStartAddr + TCDMSize;

localparam int unsigned BootAddr = 32'h1000;
Expand Down Expand Up @@ -243,6 +243,7 @@ module spatz_cluster_wrapper
localparam int unsigned NumSpatzOutstandingLoads [NumCores] = '{4, 4};
localparam int unsigned NumSpatzFPUs [NumCores] = '{default: 4};
localparam int unsigned NumSpatzIPUs [NumCores] = '{default: 1};
localparam int unsigned NumSpatzTCDMPorts [NumCores] = '{default: 4};

typedef logic [IwcAxiIdOutWidth-1:0] axi_id_out_iwc_t;

Expand Down Expand Up @@ -302,6 +303,8 @@ module spatz_cluster_wrapper
.NumSpatzOutstandingLoads (NumSpatzOutstandingLoads),
.NumSpatzFPUs (NumSpatzFPUs),
.NumSpatzIPUs (NumSpatzIPUs),
.NumSpatzTCDMPorts (NumSpatzTCDMPorts),
.AddrMisalign (AddrMisalign),
.axi_in_req_t (axi_in_req_t),
.axi_in_resp_t (axi_in_resp_t),
.axi_out_req_t (spatz_axi_iwc_out_req_t),
Expand Down
5 changes: 5 additions & 0 deletions hw/system/spatz_cluster/test/bootrom.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ _start:
csrr a2, mie
ori a2, a2, 0x8
csrw mie, a2
// Activate MCIP
csrr a2, mie
li t1, 0x80000
or a2, a2, t1
csrw mie, a2

// Wait for the wakeup interrupt
wfi
Expand Down
Binary file modified hw/system/spatz_cluster/test/bootrom.bin
Binary file not shown.
64 changes: 34 additions & 30 deletions hw/system/spatz_cluster/test/bootrom.dump
Original file line number Diff line number Diff line change
Expand Up @@ -37,54 +37,58 @@ Disassembly of section .text:
1074: 00000f13 li t5,0
1078: 00000f93 li t6,0
107c: 00000317 auipc t1,0x0
1080: 04c30313 addi t1,t1,76 # 10c8 <dummy_exception>
1080: 05c30313 addi t1,t1,92 # 10d8 <dummy_exception>
1084: 30531073 csrw mtvec,t1
1088: 00000597 auipc a1,0x0
108c: 04858593 addi a1,a1,72 # 10d0 <BOOTDATA>
108c: 05858593 addi a1,a1,88 # 10e0 <BOOTDATA>
1090: 00001337 lui t1,0x1
1094: 80030313 addi t1,t1,-2048 # 800 <_start-0x800>
1098: 30431073 csrw 0x304,t1
109c: 30402673 csrr a2,0x304
10a0: 00866613 ori a2,a2,8
10a4: 30461073 csrw 0x304,a2
10a8: 10500073 wfi
10ac: 0185a383 lw t2,24(a1)
10b0: 0205ae03 lw t3,32(a1)
10b4: 01c383b3 add t2,t2,t3
10b8: 05838393 addi t2,t2,88
10bc: 00038393 mv t2,t2
10c0: 0003a383 lw t2,0(t2)
10c4: 00038067 jr t2
10a8: 30402673 csrr a2,0x304
10ac: 00080337 lui t1,0x80
10b0: 00666633 or a2,a2,t1
10b4: 30461073 csrw 0x304,a2
10b8: 10500073 wfi
10bc: 0185a383 lw t2,24(a1)
10c0: 0205ae03 lw t3,32(a1)
10c4: 01c383b3 add t2,t2,t3
10c8: 05838393 addi t2,t2,88
10cc: 00038393 mv t2,t2
10d0: 0003a383 lw t2,0(t2)
10d4: 00038067 jr t2

000010c8 <dummy_exception>:
10c8: 10500073 wfi
10cc: ffdff06f j 10c8 <dummy_exception>
000010d8 <dummy_exception>:
10d8: 10500073 wfi
10dc: ffdff06f j 10d8 <dummy_exception>

Disassembly of section .rodata:

000010d0 <BOOTDATA>:
10d0: 1000 addi s0,sp,32
10d2: 0000 unimp
10d4: 0000 unimp
10d6: 0000 unimp
10d8: 0002 0x2
...
10ea: 0010 addi a2,sp,0
10ec: 0000 unimp
10ee: 0000 unimp
10f0: 0000 unimp
10f2: 0002 0x2
000010e0 <BOOTDATA>:
10e0: 1000 addi s0,sp,32
10e2: 0000 unimp
10e4: 0000 unimp
10e6: 0000 unimp
10e8: 0002 0x2
...
10fa: 0010 addi a2,sp,0
10fc: 0000 unimp
10fe: 0000 unimp
1100: 0000 unimp
1102: 8000 0x8000
1102: 0002 0x2
...
1110: 0000 unimp
1112: 8000 0x8000
...
110c: 0001 nop
111c: 0001 nop
...

Disassembly of section .boot_section:

00001110 <entry_addr>:
1110: 10c8 addi a0,sp,100
00001120 <entry_addr>:
1120: 10d8 addi a4,sp,100
...

Disassembly of section .Pulp_Chip.Info:
Expand All @@ -101,7 +105,7 @@ Disassembly of section .Pulp_Chip.Info:
10: 495f 666e 006f 0x6f666e495f
16: 70696863 bltu s2,t1,726 <_start-0x8da>
1a: 6e3d lui t3,0xf
1c: 20656e6f jal t3,56222 <entry_addr+0x55112>
1c: 20656e6f jal t3,56222 <entry_addr+0x55102>
20: 3d757063 bleu s7,a0,3e0 <_start-0xc20>
24: 6f6e flw ft10,216(sp)
26: 656e flw fa0,216(sp)
Expand Down
Binary file modified hw/system/spatz_cluster/test/bootrom.elf
Binary file not shown.