Adjust Memory size to Genesys2 maximum (1GByte) (#177)

This commit is contained in:
jrrk 2019-02-15 18:45:26 +00:00 committed by Florian Zaruba
parent f5bc68618d
commit 3ca3a28aa5
5 changed files with 324 additions and 312 deletions

View file

@ -51,4 +51,4 @@ clean:
all: $(MAIN) $(MAIN_BIN) $(MAIN_IMG) $(MAIN_SV)
@echo "zero stage bootloader has been compiled!"
# DO NOT DELETE THIS LINE -- make depend needs it
# DO NOT DELETE THIS LINE -- make depend needs it

View file

@ -31,7 +31,7 @@
};
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x8000000>;
reg = <0x0 0x80000000 0x0 0x40000000>;
};
leds {
compatible = "gpio-leds";
@ -113,7 +113,7 @@
device_type = "network";
interrupt-parent = <&PLIC0>;
interrupts = <3 0>;
local-mac-address = [ee e1 e2 e3 e4 e5];
local-mac-address = [00 18 3e 02 e3 7f]; // This needs to change if more than one GenesysII on a VLAN
reg = <0x0 0x30000000 0x0 0x8000>;
};
xlnx_gpio: gpio@40000000 {

View file

@ -1,6 +1,6 @@
// Auto-generated code
const int reset_vec_size = 1724;
const int reset_vec_size = 1732;
uint32_t reset_vec[reset_vec_size] = {
0x00800913,
@ -10,7 +10,7 @@ uint32_t reset_vec[reset_vec_size] = {
0x03249663,
0x0210011b,
0x01a11113,
0x221000ef,
0x24d000ef,
0x020004b7,
0x00100913,
0x0124a023,
@ -410,81 +410,92 @@ uint32_t reset_vec[reset_vec_size] = {
0x8ff90057,
0x15428d3d,
0x80829141,
0xe1a27155,
0xf94afd26,
0xe58684b2,
0xf152f54e,
0xe95aed56,
0x892ae55e,
0x4781842e,
0x0713567d,
0x06b30800,
0x802300f1,
0x078500c6,
0xfee79be3,
0x0184559b,
0xf54e7155,
0x02061993,
0xfd26e1a2,
0xf94ae586,
0xed56f152,
0xe55ee95a,
0x842e84aa,
0x0209d993,
0x567d4781,
0x08000713,
0x00f106b3,
0x00c68023,
0x9be30785,
0x559bfee7,
0xf5930184,
0x45010ff5,
0xf69ff0ef,
0x0104559b,
0x0ff5f593,
0xf0ef4501,
0x559bf6ff,
0xf5930104,
0xf0ef0ff5,
0x559bf63f,
0xf5930084,
0xf0ef0ff5,
0x7593f57f,
0xf0ef0ff4,
0x161bf4ff,
0x66130015,
0x76130016,
0x85a20ff6,
0xf0ef4549,
0xc501d1bf,
0xd0dff0ef,
0x1482bff5,
0x0a139081,
0xf5dff0ef,
0x0084559b,
0x0ff5f593,
0xf51ff0ef,
0x0ff47593,
0xf49ff0ef,
0x0015161b,
0x00166613,
0x0ff67613,
0x454985a2,
0xd15ff0ef,
0x0a13e951,
0x0a930fe0,
0xf0ef3e80,
0x1ee3cfbf,
0x0b13ff45,
0x844a2009,
0x86224981,
0x1ee3cfff,
0x8b13ff45,
0x84262004,
0x86224901,
0x04000593,
0xf0ef850a,
0x4901c63f,
0x4481c67f,
0x04000b93,
0x012407b3,
0x009407b3,
0x0007c583,
0x0905854e,
0xf0fff0ef,
0x17e389aa,
0x0413ff79,
0x0485854a,
0xf13ff0ef,
0x97e3892a,
0x0413ff74,
0x1ae30404,
0xf0effd64,
0x151bcbbf,
0x89220085,
0x151bcbff,
0x84a20085,
0x03051413,
0xf0ef9041,
0x8c49cabf,
0x8c49caff,
0x90411442,
0x12632981,
0xe7b30534,
0xe7990354,
0x1a632901,
0xe7b30724,
0xe7990359,
0x00001517,
0x17850513,
0xa13ff0ef,
0x46e314fd,
0x4401f890,
0x19c50513,
0xa17ff0ef,
0x46e319fd,
0x4401f930,
0x45814605,
0xf0ef4531,
0xf0efc83f,
0x8522c77f,
0xf0efc87f,
0xa805c7bf,
0xc75ff0ef,
0xc71ff0ef,
0xc6dff0ef,
0xc69ff0ef,
0xc65ff0ef,
0xc61ff0ef,
0xc5dff0ef,
0xc59ff0ef,
0x00001517,
0x13850513,
0x9d3ff0ef,
0x8522547d,
0x640e60ae,
0x794a74ea,
0x7a0a79aa,
0x6b4a6aea,
0x61696baa,
0x54798082,
0x715dbfe1,
0x715db765,
0xf052e0a2,
0xe486e85a,
0xf84afc26,
@ -492,10 +503,10 @@ uint32_t reset_vec[reset_vec_size] = {
0xe062e45e,
0x8a2a0880,
0xf0ef8b2e,
0xc51de1ff,
0xc51ddf3f,
0x00001517,
0x12050513,
0x9b3ff0ef,
0x11450513,
0x987ff0ef,
0x011354fd,
0x60a6fb04,
0x64068526,
@ -505,171 +516,171 @@ uint32_t reset_vec[reset_vec_size] = {
0x6c026ba2,
0x80826161,
0x00001517,
0x11c50513,
0x987ff0ef,
0x11050513,
0x95bff0ef,
0x46057101,
0x850a4585,
0xe75ff0ef,
0xe49ff0ef,
0x84aa890a,
0x1517c905,
0x05130000,
0xf0ef1165,
0x1517969f,
0xf0ef10a5,
0x151793df,
0x05130000,
0xf0ef1225,
0x852695df,
0x9d9ff0ef,
0xf0ef1165,
0x8526931f,
0x9adff0ef,
0x00001517,
0x04050513,
0x94bff0ef,
0x01450513,
0x91fff0ef,
0xbf6154f9,
0x00001517,
0x11850513,
0x93bff0ef,
0x00001517,
0x12c50513,
0x92fff0ef,
0x4b916502,
0x9a9ff0ef,
0x00001517,
0x12850513,
0x91bff0ef,
0xf0ef4522,
0x1517957f,
0x05130000,
0xf0ef1265,
0x4532909f,
0x945ff0ef,
0x00001517,
0x12450513,
0x8f7ff0ef,
0xf0ef4542,
0x1517933f,
0x05130000,
0xf0ef1225,
0x45528e5f,
0x921ff0ef,
0x10c50513,
0x90fff0ef,
0x00001517,
0x12050513,
0x8d3ff0ef,
0xf0ef6562,
0x151794ff,
0x05130000,
0xf0ef1265,
0x75028c1f,
0x93dff0ef,
0x903ff0ef,
0x4b916502,
0x97dff0ef,
0x00001517,
0x12450513,
0x8afff0ef,
0xf0ef6526,
0x11c50513,
0x8efff0ef,
0xf0ef4522,
0x151792bf,
0x05130000,
0xf0ef1325,
0x454689df,
0x8d9ff0ef,
0xf0ef11a5,
0x45328ddf,
0x919ff0ef,
0x00001517,
0x14050513,
0x88bff0ef,
0xf0ef4556,
0x15178c7f,
0x11850513,
0x8cbff0ef,
0xf0ef4542,
0x1517907f,
0x05130000,
0xf0eff6e5,
0x2583879f,
0xf0ef1165,
0x45528b9f,
0x8f5ff0ef,
0x00001517,
0x11450513,
0x8a7ff0ef,
0xf0ef6562,
0x1517923f,
0x05130000,
0xf0ef11a5,
0x7502895f,
0x911ff0ef,
0x00001517,
0x11850513,
0x883ff0ef,
0xf0ef6526,
0x15178fff,
0x05130000,
0xf0ef1265,
0x4546871f,
0x8adff0ef,
0x00001517,
0x13450513,
0x85fff0ef,
0xf0ef4556,
0x151789bf,
0x05130000,
0xf0eff425,
0x258384df,
0x71010489,
0x850a4605,
0xd65ff0ef,
0xd39ff0ef,
0x89aa8a8a,
0xc50d0804,
0x00001517,
0xff850513,
0x82bff0ef,
0x00001517,
0x00450513,
0x857ff0ef,
0x00001517,
0x01050513,
0x84bff0ef,
0x81fff0ef,
0xf0ef854e,
0x15178c7f,
0x151789bf,
0x05130000,
0xb5fdf2e5,
0xb5fdf025,
0x00001517,
0x10450513,
0x82fff0ef,
0x0f850513,
0x803ff0ef,
0x0ff9f513,
0x8ebff0ef,
0x8bfff0ef,
0x00001517,
0x10850513,
0x81bff0ef,
0x0fc50513,
0xfeeff0ef,
0xff048913,
0x00094503,
0xf0ef0905,
0x1be38d1f,
0x1be38a5f,
0x1517fe99,
0x05130000,
0xf0ef10a5,
0x0c13ffcf,
0xf0ef0fe5,
0x0c13fd0f,
0x45030109,
0x09050009,
0x8b3ff0ef,
0x887ff0ef,
0xff2c1be3,
0x00001517,
0x10c50513,
0xfdeff0ef,
0x89136888,
0x8c130284,
0xf0ef0704,
0x1517853f,
0x05130000,
0xf0ef1025,
0x6c88fc4f,
0x841ff0ef,
0x00001517,
0x10050513,
0xfb2ff0ef,
0xf0ef7088,
0x151782ff,
0x89136888,
0x8c130284,
0xf0ef0704,
0x1517827f,
0x05130000,
0xf0ef0fe5,
0x4503fa0f,
0xf0ef0f65,
0x6c88f98f,
0x815ff0ef,
0x00001517,
0x0f450513,
0xf86ff0ef,
0xf0ef7088,
0x1517803f,
0x05130000,
0xf0ef0f25,
0x4503f74f,
0x09050009,
0x85bff0ef,
0x82fff0ef,
0xff2c1be3,
0x00001517,
0xe7c50513,
0xe5050513,
0xf0ef2985,
0x8493f84f,
0x8493f58f,
0x93e30804,
0x1517f579,
0x05130000,
0xf0ef0de5,
0xa583f70f,
0xf0ef0d25,
0xa583f44f,
0x865a020a,
0xf0ef8552,
0x84aac5ff,
0x84aac33f,
0x1517c50d,
0x05130000,
0xf0eff025,
0x1517f54f,
0xf0efef65,
0x1517f28f,
0x05130000,
0xf0eff0e5,
0x8526f48f,
0xfc4ff0ef,
0xf0eff025,
0x8526f1cf,
0xf98ff0ef,
0x00001517,
0xe2c50513,
0xe0050513,
0x1517b3f5,
0x05130000,
0xf0ef0b25,
0xbbb5f2cf,
0xf0ef0a65,
0xbbb5f00f,
0xe4061141,
0xef0ff0ef,
0xec4ff0ef,
0x00001517,
0xdcc50513,
0xf16ff0ef,
0xda050513,
0xeeaff0ef,
0x65a14505,
0xf0ef057e,
0xe911d31f,
0x0010041b,
0x01f41413,
0x00000597,
0x19c58593,
0x17058593,
0xa0018402,
0x00000000,
0x00000000,
@ -696,17 +707,6 @@ uint32_t reset_vec[reset_vec_size] = {
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x33323130,
0x37363534,
0x42413938,
@ -1587,6 +1587,14 @@ uint32_t reset_vec[reset_vec_size] = {
0x2e445320,
0x0d202e2e,
0x0000000a,
0x6c756f63,
0x6f6e2064,
0x65722074,
0x53206461,
0x6c622044,
0x0d6b636f,
0x0000000a,
0x00000000,
0x0000002e,
0x00000000,
0x6c756f63,

View file

@ -20,7 +20,7 @@ module bootrom (
input logic [63:0] addr_i,
output logic [63:0] rdata_o
);
localparam int RomSize = 862;
localparam int RomSize = 866;
const logic [RomSize-1:0][63:0] mem = {
64'h00000000_00000000,
@ -93,6 +93,10 @@ module bootrom (
64'h61697469_6e692074,
64'h6f6e2064_6c756f63,
64'h00000000_0000002e,
64'h00000000_0000000a,
64'h0d6b636f_6c622044,
64'h53206461_65722074,
64'h6f6e2064_6c756f63,
64'h0000000a_0d202e2e,
64'h2e445320_676e697a,
64'h696c6169_74696e69,
@ -545,143 +549,143 @@ module bootrom (
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'ha0018402_19c58593,
64'h00000597_01f41413,
64'h0010041b_e911d31f,
64'hf0ef057e_65a14505,
64'hf16ff0ef_dcc50513,
64'h00001517_ef0ff0ef,
64'he4061141_bbb5f2cf,
64'hf0ef0b25_05130000,
64'h1517b3f5_e2c50513,
64'h00001517_fc4ff0ef,
64'h8526f48f_f0eff0e5,
64'h05130000_1517f54f,
64'h00000000_a0018402,
64'h17058593_00000597,
64'h01f41413_0010041b,
64'he911d31f_f0ef057e,
64'h65a14505_eeaff0ef,
64'hda050513_00001517,
64'hec4ff0ef_e4061141,
64'hbbb5f00f_f0ef0a65,
64'h05130000_1517b3f5,
64'he0050513_00001517,
64'hf98ff0ef_8526f1cf,
64'hf0eff025_05130000,
64'h1517c50d_84aac5ff,
64'hf0ef8552_865a020a,
64'ha583f70f_f0ef0de5,
64'h05130000_1517f579,
64'h93e30804_8493f84f,
64'hf0ef2985_e7c50513,
64'h00001517_ff2c1be3,
64'h85bff0ef_09050009,
64'h4503fa0f_f0ef0fe5,
64'h05130000_151782ff,
64'hf0ef7088_fb2ff0ef,
64'h1517f28f_f0efef65,
64'h05130000_1517c50d,
64'h84aac33f_f0ef8552,
64'h865a020a_a583f44f,
64'hf0ef0d25_05130000,
64'h1517f579_93e30804,
64'h8493f58f_f0ef2985,
64'he5050513_00001517,
64'hff2c1be3_82fff0ef,
64'h09050009_4503f74f,
64'hf0ef0f25_05130000,
64'h1517803f_f0ef7088,
64'hf86ff0ef_0f450513,
64'h00001517_815ff0ef,
64'h6c88f98f_f0ef0f65,
64'h05130000_1517827f,
64'hf0ef0704_8c130284,
64'h89136888_fb2ff0ef,
64'h10050513_00001517,
64'h841ff0ef_6c88fc4f,
64'hf0ef1025_05130000,
64'h1517853f_f0ef0704,
64'h8c130284_89136888,
64'hfdeff0ef_10c50513,
64'h00001517_ff2c1be3,
64'h8b3ff0ef_09050009,
64'h45030109_0c13ffcf,
64'hf0ef10a5_05130000,
64'h1517fe99_1be38d1f,
64'hf0ef0905_00094503,
64'hff048913_81bff0ef,
64'h10850513_00001517,
64'h8ebff0ef_0ff9f513,
64'h82fff0ef_10450513,
64'h00001517_b5fdf2e5,
64'h05130000_15178c7f,
64'hf0ef854e_84bff0ef,
64'h01050513_00001517,
64'h857ff0ef_00450513,
64'h00001517_c50d0804,
64'h89aa8a8a_d65ff0ef,
64'h850a4605_71010489,
64'h2583879f_f0eff6e5,
64'h05130000_15178c7f,
64'hf0ef4556_88bff0ef,
64'h14050513_00001517,
64'h8d9ff0ef_454689df,
64'hf0ef1325_05130000,
64'h151792bf_f0ef6526,
64'h8afff0ef_12450513,
64'h00001517_93dff0ef,
64'h75028c1f_f0ef1265,
64'h05130000_151794ff,
64'hf0ef6562_8d3ff0ef,
64'h12050513_00001517,
64'h921ff0ef_45528e5f,
64'hf0ef1225_05130000,
64'h1517933f_f0ef4542,
64'h8f7ff0ef_12450513,
64'h00001517_945ff0ef,
64'h4532909f_f0ef1265,
64'h05130000_1517957f,
64'hf0ef4522_91bff0ef,
64'h12850513_00001517,
64'h9a9ff0ef_4b916502,
64'h92fff0ef_12c50513,
64'h00001517_93bff0ef,
64'hff2c1be3_887ff0ef,
64'h09050009_45030109,
64'h0c13fd0f_f0ef0fe5,
64'h05130000_1517fe99,
64'h1be38a5f_f0ef0905,
64'h00094503_ff048913,
64'hfeeff0ef_0fc50513,
64'h00001517_8bfff0ef,
64'h0ff9f513_803ff0ef,
64'h0f850513_00001517,
64'hb5fdf025_05130000,
64'h151789bf_f0ef854e,
64'h81fff0ef_00450513,
64'h00001517_82bff0ef,
64'hff850513_00001517,
64'hc50d0804_89aa8a8a,
64'hd39ff0ef_850a4605,
64'h71010489_258384df,
64'hf0eff425_05130000,
64'h151789bf_f0ef4556,
64'h85fff0ef_13450513,
64'h00001517_8adff0ef,
64'h4546871f_f0ef1265,
64'h05130000_15178fff,
64'hf0ef6526_883ff0ef,
64'h11850513_00001517,
64'hbf6154f9_94bff0ef,
64'h04050513_00001517,
64'h9d9ff0ef_852695df,
64'hf0ef1225_05130000,
64'h1517969f_f0ef1165,
64'h05130000_1517c905,
64'h84aa890a_e75ff0ef,
64'h850a4585_46057101,
64'h987ff0ef_11c50513,
64'h00001517_80826161,
64'h6c026ba2_6b426ae2,
64'h7a0279a2_794274e2,
64'h64068526_60a6fb04,
64'h011354fd_9b3ff0ef,
64'h911ff0ef_7502895f,
64'hf0ef11a5_05130000,
64'h1517923f_f0ef6562,
64'h8a7ff0ef_11450513,
64'h00001517_8f5ff0ef,
64'h45528b9f_f0ef1165,
64'h05130000_1517907f,
64'hf0ef4542_8cbff0ef,
64'h11850513_00001517,
64'h919ff0ef_45328ddf,
64'hf0ef11a5_05130000,
64'h151792bf_f0ef4522,
64'h8efff0ef_11c50513,
64'h00001517_97dff0ef,
64'h4b916502_903ff0ef,
64'h12050513_00001517,
64'hc51de1ff_f0ef8b2e,
64'h8a2a0880_e062e45e,
64'hec56f44e_f84afc26,
64'he486e85a_f052e0a2,
64'h715dbfe1_54798082,
64'h61696baa_6b4a6aea,
64'h7a0a79aa_794a74ea,
64'h640e60ae_8522c77f,
64'hf0efc83f_f0ef4531,
64'h45814605_4401f890,
64'h46e314fd_a13ff0ef,
64'h17850513_00001517,
64'he7990354_e7b30534,
64'h12632981_90411442,
64'h8c49cabf_f0ef9041,
64'h03051413_89220085,
64'h151bcbbf_f0effd64,
64'h1ae30404_0413ff79,
64'h17e389aa_f0fff0ef,
64'h0905854e_0007c583,
64'h012407b3_04000b93,
64'h4901c63f_f0ef850a,
64'h04000593_86224981,
64'h844a2009_0b13ff45,
64'h1ee3cfbf_f0ef3e80,
64'h0a930fe0_0a139081,
64'h1482bff5_d0dff0ef,
64'hc501d1bf_f0ef4549,
64'h85a20ff6_76130016,
64'h66130015_161bf4ff,
64'hf0ef0ff4_7593f57f,
64'hf0ef0ff5_f5930084,
64'h559bf63f_f0ef0ff5,
64'hf5930104_559bf6ff,
64'hf0ef4501_0ff5f593,
64'h0184559b_fee79be3,
64'h078500c6_802300f1,
64'h06b30800_0713567d,
64'h4781842e_892ae55e,
64'he95aed56_f152f54e,
64'he58684b2_f94afd26,
64'he1a27155_80829141,
64'h90fff0ef_10c50513,
64'h00001517_bf6154f9,
64'h91fff0ef_01450513,
64'h00001517_9adff0ef,
64'h8526931f_f0ef1165,
64'h05130000_151793df,
64'hf0ef10a5_05130000,
64'h1517c905_84aa890a,
64'he49ff0ef_850a4585,
64'h46057101_95bff0ef,
64'h11050513_00001517,
64'h80826161_6c026ba2,
64'h6b426ae2_7a0279a2,
64'h794274e2_64068526,
64'h60a6fb04_011354fd,
64'h987ff0ef_11450513,
64'h00001517_c51ddf3f,
64'hf0ef8b2e_8a2a0880,
64'he062e45e_ec56f44e,
64'hf84afc26_e486e85a,
64'hf052e0a2_715db765,
64'h54798082_61696baa,
64'h6b4a6aea_7a0a79aa,
64'h794a74ea_640e60ae,
64'h8522547d_9d3ff0ef,
64'h13850513_00001517,
64'hc59ff0ef_c5dff0ef,
64'hc61ff0ef_c65ff0ef,
64'hc69ff0ef_c6dff0ef,
64'hc71ff0ef_c75ff0ef,
64'ha805c7bf_f0efc87f,
64'hf0ef4531_45814605,
64'h4401f930_46e319fd,
64'ha17ff0ef_19c50513,
64'h00001517_e7990359,
64'he7b30724_1a632901,
64'h90411442_8c49caff,
64'hf0ef9041_03051413,
64'h84a20085_151bcbff,
64'hf0effd64_1ae30404,
64'h0413ff74_97e3892a,
64'hf13ff0ef_0485854a,
64'h0007c583_009407b3,
64'h04000b93_4481c67f,
64'hf0ef850a_04000593,
64'h86224901_84262004,
64'h8b13ff45_1ee3cfff,
64'hf0ef3e80_0a930fe0,
64'h0a13e951_d15ff0ef,
64'h454985a2_0ff67613,
64'h00166613_0015161b,
64'hf49ff0ef_0ff47593,
64'hf51ff0ef_0ff5f593,
64'h0084559b_f5dff0ef,
64'h0ff5f593_0104559b,
64'hf69ff0ef_45010ff5,
64'hf5930184_559bfee7,
64'h9be30785_00c68023,
64'h00f106b3_08000713,
64'h567d4781_0209d993,
64'h842e84aa_e55ee95a,
64'hed56f152_f94ae586,
64'hfd26e1a2_02061993,
64'hf54e7155_80829141,
64'h15428d3d_8ff90057,
64'h979b1701_67090107,
64'hd79b0105_179b4105,
@ -881,7 +885,7 @@ module bootrom (
64'h4009091b_02000937,
64'h00448493_0124a023,
64'h00100913_020004b7,
64'h221000ef_01a11113,
64'h24d000ef_01a11113,
64'h0210011b_03249663,
64'hf1402973_00000493,
64'h30491073_00800913

View file

@ -40,7 +40,7 @@ package ariane_soc;
localparam logic[63:0] SPILength = 64'h800000;
localparam logic[63:0] EthernetLength = 64'h10000;
localparam logic[63:0] GPIOLength = 64'h1000;
localparam logic[63:0] DRAMLength = 64'h8000000; // 128 MByte of DDR
localparam logic[63:0] DRAMLength = 64'h40000000; // 1GByte of DDR (split between two chips on Genesys2)
localparam logic[63:0] SRAMLength = 64'h1800000; // 24 MByte of SRAM
// Instantiate AXI protocol checkers
localparam bit GenProtocolChecker = 1'b0;