Merge branch 'ariane_next' of github.com:pulp-platform/ariane into ariane_next

This commit is contained in:
Florian Zaruba 2018-11-26 17:56:16 +01:00
commit a957685f24
No known key found for this signature in database
GPG key ID: E742FFE8EC38A792
17 changed files with 1855 additions and 248 deletions

View file

@ -132,14 +132,14 @@ serdiv-quest:
s-asm-quest:
stage: serpent
script:
- make -j${NUM_JOBS} run-asm-tests defines=SERPENT_PULP+AXI64_CACHE_PORTS batch-mode=1
- make -j${NUM_JOBS} run-asm-tests defines=PITON_ARIANE+AXI64_CACHE_PORTS batch-mode=1
dependencies:
- build
s-bench-quest:
stage: serpent
script:
- make -j${NUM_JOBS} run-benchmarks defines=SERPENT_PULP+AXI64_CACHE_PORTS batch-mode=1
- make -j${NUM_JOBS} run-benchmarks defines=PITON_ARIANE+AXI64_CACHE_PORTS batch-mode=1
dependencies:
- build
@ -147,7 +147,7 @@ s-bench-quest:
s-asm1-ver:
stage: serpent
script:
- make -j${NUM_JOBS} run-asm-tests1-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make -j${NUM_JOBS} run-asm-tests1-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
dependencies:
- build
@ -155,14 +155,14 @@ s-asm1-ver:
s-asm2-ver:
stage: serpent
script:
- make -j${NUM_JOBS} run-asm-tests2-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make -j${NUM_JOBS} run-asm-tests2-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
dependencies:
- build
s-bench-ver:
stage: serpent
script:
- make -j${NUM_JOBS} run-benchmarks-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make -j${NUM_JOBS} run-benchmarks-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
dependencies:
- build
@ -187,7 +187,7 @@ s-dcache-quest:
# s-torture:
# stage: serpent
# script:
# - make torture-rtest defines=SERPENT_PULP+AXI64_CACHE_PORTS batch-mode=1
# - make torture-rtest-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
# - make torture-rtest defines=PITON_ARIANE+AXI64_CACHE_PORTS batch-mode=1
# - make torture-rtest-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
# dependencies:
# - build

View file

@ -108,27 +108,27 @@ jobs:
name: run riscv benchmarks (serpent)
script:
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-benchmarks-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make -j${NUM_JOBS} run-benchmarks-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
# rv64ui-p-* tests
- stage: test
name: run asm tests1 (serpent)
script:
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-asm-tests1-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make -j${NUM_JOBS} run-asm-tests1-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
# rv64ui-v-* tests
- stage: test
name: run asm tests2 (serpent)
script:
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-asm-tests2-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make -j${NUM_JOBS} run-asm-tests2-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS
- stage: test
name: run torture (serpent)
script:
- ci/get-torture.sh
- make clean
- make torture-gen defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make torture-rtest-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS
- make torture-gen defines=PITON_ARIANE+AXI64_CACHE_PORTS
- make torture-rtest-verilator defines=PITON_ARIANE+AXI64_CACHE_PORTS

View file

@ -221,7 +221,7 @@ Ariane version 4.0 has preliminary support for the OpenPiton distributed cache s
The corresponding integration patches will soon be released on [OpenPiton GitHub repository](https://github.com/PrincetonUniversity/openpiton).
To activate the different cache system, compile your code with the macro `SERPENT_PULP`.
To activate the different cache system, compile your code with the macro `PITON_ARIANE`.
Note that this feature is still in Beta stage, and may hence not be completely bug-free.

File diff suppressed because it is too large Load diff

View file

@ -20,9 +20,102 @@ module bootrom (
input logic [63:0] addr_i,
output logic [63:0] rdata_o
);
localparam int RomSize = 481;
localparam int RomSize = 942;
const logic [RomSize-1:0][63:0] mem = {
64'h00000000_00000000,
64'h00000000_00000000,
64'h0a0d2165_6e6f6420,
64'h00000000_00206567,
64'h616d6920_746f6f62,
64'h20676e69_79706f63,
64'h00000000_00000009,
64'h3a656d61_6e090a0d,
64'h00093a73_65747562,
64'h69727474_61090a0d,
64'h00000009_3a61626c,
64'h20747361_6c090a0d,
64'h0000093a_61626c20,
64'h74737269_66090a0d,
64'h00000000_00000000,
64'h09202020_20203a64,
64'h69756720_6e6f6974,
64'h69747261_70090a0d,
64'h00000000_00000000,
64'h093a6469_75672065,
64'h70797420_6e6f6974,
64'h69747261_70090a0d,
64'h00000000_20797274,
64'h6e65206e_6f697469,
64'h74726170_20747067,
64'h00000009_20203a73,
64'h65697274_6e65206e,
64'h6f697469_74726170,
64'h20657a69_73090a0d,
64'h00000009_3a736569,
64'h72746e65_206e6f69,
64'h74697472_61702072,
64'h65626d75_6e090a0d,
64'h00000009_2020203a,
64'h61626c20_73656972,
64'h746e6520_6e6f6974,
64'h69747261_70090a0d,
64'h00093a61_646c2070,
64'h756b6361_62090a0d,
64'h00000000_00000000,
64'h093a6162_6c20746e,
64'h65727275_63090a0d,
64'h00000009_3a646576,
64'h72657365_72090a0d,
64'h00093a72_65646165,
64'h685f6372_63090a0d,
64'h00000000_00000909,
64'h3a657a69_73090a0d,
64'h00000009_3a6e6f69,
64'h73697665_72090a0d,
64'h0000093a_65727574,
64'h616e6769_73090a0d,
64'h00000000_003a7265,
64'h64616568_20656c62,
64'h6174206e_6f697469,
64'h74726170_20747067,
64'h0000203a_65756c61,
64'h76206e72_75746572,
64'h2079706f_63206473,
64'h00000000_0000000a,
64'h0d216465_6c696166,
64'h20647261_63204453,
64'h00000000_0000000a,
64'h0d216465_7a696c61,
64'h6974696e_69206473,
64'h00000000_0a0d676e,
64'h69746978_65202e2e,
64'h2e647320_657a696c,
64'h61697469_6e692074,
64'h6f6e2064_6c756f63,
64'h00000000_0000002e,
64'h0000000a_0d202e2e,
64'h2e445320_676e697a,
64'h696c6169_74696e69,
64'h00000031_34646d63,
64'h00000035_35646d63,
64'h00000000_30646d63,
64'h00000020_3a206573,
64'h6e6f7073_65720920,
64'h00000000_0020646e,
64'h616d6d6f_63204453,
64'h00000000_203f3f79,
64'h74706d65_20746f6e,
64'h206f6669_66207872,
64'h00000000_00000a0d,
64'h2164657a_696c6169,
64'h74696e69_20495053,
64'h00000000_00007830,
64'h203a7375_74617473,
64'h00000000_00000a0d,
64'h49505320_74696e69,
64'h00000a0d_21646c72,
64'h6f57206f_6c6c6548,
64'h00000000_00000032,
64'h2d746c75_61666564,
64'h2d697274_2c786e6c,
@ -493,17 +586,385 @@ module bootrom (
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_0000bff5,
64'h10500073_03c58593,
64'h00000597_f1402573,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00008402_07458593,
64'h00000597_f1402573,
64'h01f41413_0010041b
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'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'h00000000_00000000,
64'h00000000_00000000,
64'h46454443_42413938,
64'h37363534_33323130,
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'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'ha0018402_17c58593,
64'h00000597_01f41413,
64'h0010041b_e911d13f,
64'hf0ef057e_65a14505,
64'hef6ff0ef_02450513,
64'h00001517_ed0ff0ef,
64'he4061141_b38df0cf,
64'hf0ef30a5_05130000,
64'h1517bbd9_08450513,
64'h00001517_fa4ff0ef,
64'h8526f28f_f0ef1665,
64'h05130000_1517f34f,
64'hf0ef15a5_05130000,
64'h1517bbfd_0ac50513,
64'h00001517_fccff0ef,
64'h8526f50f_f0ef18e5,
64'h05130000_1517f5cf,
64'hf0ef1825_05130000,
64'h1517c929_84aac69f,
64'hf0ef8556_865e020b,
64'h2583f78f_f0ef35e5,
64'h05130000_1517f384,
64'h9de30809_0913080a,
64'h0993f90f_f0ef2485,
64'h10050513_00001517,
64'hff3a1be3_867ff0ef,
64'h0a05000a_4503facf,
64'hf0ef3825_05130000,
64'h151783bf_f0ef0109,
64'h3503fc0f_f0ef3865,
64'h05130000_151784ff,
64'hf0ef0089_3503fd4f,
64'hf0ef38a5_05130000,
64'h1517863f_f0effb89,
64'h8a130009_3503fecf,
64'hf0ef3925_05130000,
64'h1517ff2a_1be38c1f,
64'hf0ef0a05_000a4503,
64'hf9098a13_80bff0ef,
64'h39050513_00001517,
64'hff9a19e3_8dfff0ef,
64'h0a050007_c503014d,
64'h07b34a01_82bff0ef,
64'hf8098d13_39450513,
64'h00001517_8ffff0ef,
64'h0ff4f513_843ff0ef,
64'h39050513_00001517,
64'h4c114cc1_10051b63,
64'h02010913_08010993,
64'h84aa8b0a_d5fff0ef,
64'h850a4605_71010489,
64'h2583871f_f0ef1de5,
64'h05130000_15178bff,
64'hf0ef4556_883ff0ef,
64'h3b050513_00001517,
64'h8d1ff0ef_4546895f,
64'hf0ef3a25_05130000,
64'h1517923f_f0ef6526,
64'h8a7ff0ef_39450513,
64'h00001517_935ff0ef,
64'h75028b9f_f0ef3965,
64'h05130000_1517947f,
64'hf0ef6562_8cbff0ef,
64'h39050513_00001517,
64'h919ff0ef_45528ddf,
64'hf0ef3925_05130000,
64'h151792bf_f0ef4542,
64'h8efff0ef_39450513,
64'h00001517_93dff0ef,
64'h4532901f_f0ef3965,
64'h05130000_151794ff,
64'hf0ef4522_913ff0ef,
64'h39850513_00001517,
64'h9a1ff0ef_6502925f,
64'hf0ef39a5_05130000,
64'h1517931f_f0ef3865,
64'h05130000_1517bf51,
64'h54f9941f_f0ef2ae5,
64'h05130000_15179cff,
64'hf0ef8526_953ff0ef,
64'h39050513_00001517,
64'h95fff0ef_38450513,
64'h00001517_c90584aa,
64'h890ae6df_f0ef850a,
64'h45854605_710197df,
64'hf0ef38a5_05130000,
64'h15178082_61256d02,
64'h6ca26c42_6be27b02,
64'h7aa27a42_79e26906,
64'h64a66446_852660e6,
64'hfa040113_54fd9adf,
64'hf0ef3925_05130000,
64'h1517c90d_e1bff0ef,
64'h8bae8aaa_1080e06a,
64'he466e862_f05af852,
64'hfc4ee0ca_e4a6ec86,
64'hec5ef456_e8a2711d,
64'hbfe15479_80826169,
64'h6baa6b4a_6aea7a0a,
64'h79aa794a_74ea640e,
64'h60ae8522_c7bff0ef,
64'hc87ff0ef_45314581,
64'h46054401_f89046e3,
64'h20090913_14fda15f,
64'hf0ef3f25_05130000,
64'h1517e799_0364e7b3,
64'h04899463_90412981,
64'h14428c49_cb3ff0ef,
64'h90410305_14130085,
64'h151bcc1f_f0effd24,
64'h1ae30404_0413ff7a,
64'h17e389aa_f11ff0ef,
64'h0a05854e_0007c583,
64'h014407b3_04000b93,
64'h4a01c65f_f0ef850a,
64'h04000593_86224981,
64'hff551ee3_cfbff0ef,
64'he0090413_3e800b13,
64'h0fe00a93_20090913,
64'h90811482_bff5d15f,
64'hf0efc501_d23ff0ef,
64'h454985a2_0ff67613,
64'h00166613_0015161b,
64'hf53ff0ef_0ff47593,
64'hf5bff0ef_0ff5f593,
64'h0084559b_f67ff0ef,
64'h0ff5f593_0104559b,
64'hf73ff0ef_45010184,
64'h559bfee7_9be30785,
64'h00c68023_00f106b3,
64'h08000713_567d4781,
64'h842e892a_e55ee95a,
64'hed56f152_f54ee586,
64'h84b2f94a_fd26e1a2,
64'h71558082_91411542,
64'h8d3d8ff9_0057979b,
64'h17016709_0107d79b,
64'h0105179b_4105551b,
64'h0105151b_8d2d00c5,
64'h95138da9_893d0045,
64'hd51b8da9_91411542,
64'h8d5d0522_0085579b,
64'h808207f5_75138d2d,
64'h00451593_8d2d8d3d,
64'h0045d51b_0075d79b,
64'h8de98082_0141853e,
64'h640260a2_57f5e111,
64'h4781f89f_f0efc511,
64'h57f9efbf_f0efc911,
64'h57fdeb7f_f0effc6d,
64'he07ff0ef_347d4429,
64'hb8fff0ef_55450513,
64'h00001517_c89ff0ef,
64'he022e406_11418082,
64'h61050015_351364a2,
64'h644260e2_0004051b,
64'hfc940ce3_e3bff0ef,
64'heb3ff0ef_57c50513,
64'h00001517_85aa842a,
64'he57ff0ef_02900513,
64'h400005b7_07700613,
64'hfbdff0ef_4485e822,
64'hec06e426_11018082,
64'h01410015_3513157d,
64'h640260a2_0004051b,
64'hef3ff0ef_5b650513,
64'h85a20000_1517e8df,
64'hf0ef842a_e9bff0ef,
64'he022e406_03700513,
64'h45810650_06131141,
64'h80826105_690264a2,
64'h644260e2_00153513,
64'hf5650513_0004051b,
64'h01249863_88bd00f9,
64'h1b634501_4785ecdf,
64'hf0efed1f_f0ef842a,
64'hed7ff0ef_84aaeddf,
64'hf0efee1f_f0efee5f,
64'hf0ef892a_ef3ff0ef,
64'he04ae426_e822ec06,
64'h45211aa0_05930870,
64'h06131101_bfcd4501,
64'h80826105_690264a2,
64'h644260e2_4505f89f,
64'hf0ef4585_64450513,
64'h00001517_fe9915e3,
64'hc00df29f_f0ef892a,
64'h347df39f_f0ef4501,
64'h45810950_06134485,
64'h71040413_e04aec06,
64'he4266409_e8221101,
64'hccfff06f_610563e5,
64'h05130000_151760e2,
64'h6442da5f_f0ef852e,
64'h65a2ce9f_f0ef6865,
64'h05130000_1517cf5f,
64'hf0ef8522_cfbff0ef,
64'he42eec06_68c50513,
64'h00001517_842ae822,
64'h11018082_614564e2,
64'h740270a2_f47d147d,
64'h0007d463_4187d79b,
64'h0185179b_fabff0ef,
64'heb5ff0ef_85320640,
64'h04136622_ec1ff0ef,
64'h0ff47513_ec9ff0ef,
64'h0ff57513_0084551b,
64'hed5ff0ef_0ff57513,
64'h0104551b_ee1ff0ef,
64'h0184551b_ee9ff0ef,
64'h0404e513_febff0ef,
64'h84aa842e_ec26f022,
64'he432f406_7179f03f,
64'hf06f0ff0_05138082,
64'h557db7d9_00d70023,
64'h078500f6_073306c8,
64'h2683ff69_8b055178,
64'hb77dd6b8_07850007,
64'h470300f5_07338082,
64'h4501d3b8_4719dbb8,
64'h577d2000_07b702b6,
64'he1630007_869b2000,
64'h08372000_0537fff5,
64'h8b85537c_20000737,
64'hd3b82000_07b71060,
64'h0713fff5_37fd0001,
64'h03200793_04b76163,
64'h0007871b_47812000,
64'h06b7dbb8_57792000,
64'h07b706b7_ee631000,
64'h07938082_610564a2,
64'hd3b84719_dbb86442,
64'h60e20ff4_7513577d,
64'h200007b7_e23ff0ef,
64'h79050513_00001517,
64'heb1ff0ef_91011502,
64'h4088e39f_f0ef7ae5,
64'h05130000_1517e395,
64'h8b852401_53fc57e0,
64'hff658b05_06478493,
64'h53f8d3b8_10600713,
64'h200007b7_fff537fd,
64'h00010640_0793d7a8,
64'hdbb85779_e426e822,
64'hec062000_07b71101,
64'he7fff06f_61057de5,
64'h05130000_151764a2,
64'h60e26442_d03c4799,
64'he97ff0ef_80450513,
64'h00002517_f25ff0ef,
64'h91010204_95132481,
64'heafff0ef_7fc50513,
64'h00001517_5064d03c,
64'h16600793_ec3ff0ef,
64'h83050513_00002517,
64'hf51ff0ef_91010204,
64'h95132481_edbff0ef,
64'h82850513_00002517,
64'h5064d03c_10400793,
64'h20000437_fff537fd,
64'h000147a9_c3b84729,
64'h200007b7_f03ff0ef,
64'he426e822_ec068485,
64'h05131101_00002517,
64'h80822501_41088082,
64'hc10c8082_610560e2,
64'hee1ff0ef_00914503,
64'hee9ff0ef_00814503,
64'hf55ff0ef_ec06002c,
64'h11018082_61456942,
64'h64e27402_70a2fe94,
64'h10e3f0bf_f0ef0091,
64'h4503f13f_f0ef3461,
64'h00814503_f81ff0ef,
64'h0ff57513_002c0089,
64'h553354e1_03800413,
64'h892af406_e84aec26,
64'hf0227179_80826145,
64'h694264e2_740270a2,
64'hfe9410e3_f4dff0ef,
64'h00914503_f55ff0ef,
64'h34610081_4503fc3f,
64'hf0ef0ff5_7513002c,
64'h0089553b_54e14461,
64'h892af406_e84aec26,
64'hf0227179_808200f5,
64'h80230007_c78300e5,
64'h80a397aa_81110007,
64'h4703973e_00f57713,
64'h98078793_00001797,
64'hb7f50405_fa5ff0ef,
64'h80820141_640260a2,
64'he5090004_4503842a,
64'he406e022_11418082,
64'h00e78823_02000713,
64'h00e78423_fc700713,
64'h00e78623_470d0007,
64'h822300e7_8023476d,
64'h00e78623_f8000713,
64'h00078223_100007b7,
64'h808200a7_0023dfe5,
64'h0207f793_01474783,
64'h10000737_80820205,
64'h75130147_c5031000,
64'h07b78082_00054503,
64'h808200b5_00238082,
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'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00048067_01f49493,
64'h0010049b_b8458593,
64'h00001597_f1402573,
64'hff24c6e3_4009091b,
64'h02000937_00448493,
64'hfe091ee3_0004a903,
64'h00092023_00990933,
64'h00291913_f1402973,
64'h020004b7_fe090ae3,
64'h00897913_34402973,
64'h10500073_ff24c6e3,
64'h4009091b_02000937,
64'h00448493_0124a023,
64'h00100913_020004b7,
64'h241000ef_01a11113,
64'h0210011b_03249663,
64'hf1402973_00000493,
64'h30491073_00800913
};
logic [$clog2(RomSize)-1:0] addr_q;

View file

@ -30,9 +30,14 @@ SECTIONS
_BSS_END_ = .;
}
/* PROVIDE(_sp = 0x84000000); */
/* PROVIDE(_heap_end = _sp - 0x80000); */
/*.rodata.dtb : { *(.rodata.dtb) }*/
# PROVIDE(_sp = 0x84000000);
# PROVIDE(_heap_end = _sp - 0x80000);
.rodata : ALIGN(0x100) {
_RODATA_START_ = .;
*(.rodata)
*(.dtb*)
*(.rodata*)
_RODATA_END_ = .;
}
}

View file

@ -4,12 +4,12 @@
#include "uart.h"
#include <stddef.h>
void gpt_find_boot_partition(uint8_t* dest, uint32_t size)
int gpt_find_boot_partition(uint8_t* dest, uint32_t size)
{
int ret = init_sd();
if (ret != 0) {
print_uart("could not initialize sd... exiting\r\n");
return;
return -1;
}
print_uart("sd initialized!\r\n");
@ -22,9 +22,11 @@ void gpt_find_boot_partition(uint8_t* dest, uint32_t size)
if (res != 0)
{
print_uart("SD card failed!\r\n");
print_uart("sd copy return value: ");
print_uart_addr(res);
print_uart("\r\n");
return -2;
}
gpt_pth_t *lba1 = (gpt_pth_t *)lba1_buf;
@ -58,9 +60,11 @@ void gpt_find_boot_partition(uint8_t* dest, uint32_t size)
if (res != 0)
{
print_uart("SD card failed!\r\n");
print_uart("sd copy return value: ");
print_uart_addr(res);
print_uart("\r\n");
return -2;
}
for (int i = 0; i < 4; i++)
@ -89,5 +93,16 @@ void gpt_find_boot_partition(uint8_t* dest, uint32_t size)
partition_entries_t *boot = (partition_entries_t *)(lba2_buf);
print_uart("copying boot image ");
res = sd_copy(dest, boot->first_lba, size);
if (res != 0)
{
print_uart("SD card failed!\r\n");
print_uart("sd copy return value: ");
print_uart_addr(res);
print_uart("\r\n");
return -2;
}
print_uart(" done!\r\n");
return 0;
}

View file

@ -36,4 +36,4 @@ typedef struct partition_entries
} partition_entries_t;
// Find boot partition and load it to the destination
void gpt_find_boot_partition(uint8_t* dest, uint32_t size);
int gpt_find_boot_partition(uint8_t* dest, uint32_t size);

View file

@ -8,14 +8,16 @@ int main()
init_uart();
print_uart("Hello World!\r\n");
gpt_find_boot_partition((uint8_t *)0x80000000UL, 2*16384);
int res = gpt_find_boot_partition((uint8_t *)0x80000000UL, 2 * 16384);
// jump to the address
__asm__ volatile(
"li s0, 0x80000000;"
"la a1, _dtb;"
"jr s0"
);
if (res == 0)
{
// jump to the address
__asm__ volatile(
"li s0, 0x80000000;"
"la a1, _dtb;"
"jr s0");
}
while (1)
{

View file

@ -31,7 +31,9 @@ uint8_t sd_cmd(uint8_t cmd, uint32_t arg, uint8_t crc)
}
} while (--n > 0);
if (n == 0)
print_uart("could not find valid sd response\r\n");
{
// print_uart("could not find valid sd response\r\n");
}
return r;
}
@ -46,13 +48,17 @@ void print_status(const char *cmd, uint8_t response)
int sd_cmd0()
{
int counter = 10000;
uint8_t r = 0xff;
while (r != 0x1)
{
r = sd_cmd(0, 0, 0x95);
sd_dummy(); // R1: 1 Byte response
print_status("cmd0", r);
counter--;
if (counter <= 0)
return 1 == 0;
}
print_status("cmd0", r);
return r == 0x1;
}

View file

@ -17,9 +17,8 @@ _prog_start:
li s1, DRAM_BASE
jr s1
.section .rodata
.section .rodata.dtb, "a", @progbits
.globl _dtb
.align 5, 0
.section .dtb
.globl _dtb
.align 4, 0
_dtb:
.incbin "ariane.dtb"
.incbin "ariane.dtb"

View file

@ -49,7 +49,7 @@ package ariane_pkg;
// depth of store-buffers, this needs to be a power of two
localparam int unsigned DEPTH_SPEC = 4;
`ifdef SERPENT_PULP
`ifdef PITON_ARIANE
// in this case we can use a small commit queue since we have a write buffer in the dcache
// we could in principle do without the commit queue in this case, but the timing degrades if we do that due
// to longer paths into the commit stage
@ -263,28 +263,53 @@ package ariane_pkg;
// we just use the default config of ariane
// otherwise we have to propagate the openpiton L15 configuration from l15.h
`ifdef PITON_ARIANE
// I$
localparam int unsigned ICACHE_LINE_WIDTH = `CONFIG_L1I_CACHELINE_WIDTH;
localparam int unsigned ICACHE_SET_ASSOC = `CONFIG_L1I_ASSOCIATIVITY;
localparam int unsigned ICACHE_INDEX_WIDTH = $clog2(`CONFIG_L1I_SIZE / ICACHE_SET_ASSOC);
localparam int unsigned ICACHE_TAG_WIDTH = 56 - ICACHE_INDEX_WIDTH;
// D$
localparam int unsigned DCACHE_LINE_WIDTH = `CONFIG_L1D_CACHELINE_WIDTH;
localparam int unsigned DCACHE_SET_ASSOC = `CONFIG_L1D_ASSOCIATIVITY;
localparam int unsigned DCACHE_INDEX_WIDTH = $clog2(`CONFIG_L1D_SIZE / DCACHE_SET_ASSOC);
localparam int unsigned DCACHE_TAG_WIDTH = 56 - DCACHE_INDEX_WIDTH;
`else
`ifndef CONFIG_L1I_CACHELINE_WIDTH
`define CONFIG_L1I_CACHELINE_WIDTH 128
`endif
`ifndef CONFIG_L1I_ASSOCIATIVITY
`define CONFIG_L1I_ASSOCIATIVITY 4
`endif
`ifndef CONFIG_L1I_SIZE
`define CONFIG_L1I_SIZE 16*1024
`endif
`ifndef CONFIG_L1D_CACHELINE_WIDTH
`define CONFIG_L1D_CACHELINE_WIDTH 128
`endif
`ifndef CONFIG_L1D_ASSOCIATIVITY
`define CONFIG_L1D_ASSOCIATIVITY 4
`endif
`ifndef CONFIG_L1I_SIZE
`define CONFIG_L1D_SIZE 16*1024
`endif
// I$
localparam int unsigned ICACHE_LINE_WIDTH = `CONFIG_L1I_CACHELINE_WIDTH;
localparam int unsigned ICACHE_SET_ASSOC = `CONFIG_L1I_ASSOCIATIVITY;
localparam int unsigned ICACHE_INDEX_WIDTH = $clog2(`CONFIG_L1I_SIZE / ICACHE_SET_ASSOC);
localparam int unsigned ICACHE_TAG_WIDTH = 56 - ICACHE_INDEX_WIDTH;
// D$
localparam int unsigned DCACHE_LINE_WIDTH = `CONFIG_L1D_CACHELINE_WIDTH;
localparam int unsigned DCACHE_SET_ASSOC = `CONFIG_L1D_ASSOCIATIVITY;
localparam int unsigned DCACHE_INDEX_WIDTH = $clog2(`CONFIG_L1D_SIZE / DCACHE_SET_ASSOC);
localparam int unsigned DCACHE_TAG_WIDTH = 56 - DCACHE_INDEX_WIDTH;
`else
// align to openpiton for the time being (this should be more configurable in the future)
// I$
localparam int unsigned ICACHE_INDEX_WIDTH = 12; // in bit
localparam int unsigned ICACHE_TAG_WIDTH = 44; // in bit
localparam int unsigned ICACHE_LINE_WIDTH = 128; // in bit
localparam int unsigned ICACHE_SET_ASSOC = 4;
// D$
localparam int unsigned DCACHE_INDEX_WIDTH = 12; // in bit
localparam int unsigned DCACHE_TAG_WIDTH = 44; // in bit
localparam int unsigned DCACHE_LINE_WIDTH = 128; // in bit
localparam int unsigned DCACHE_SET_ASSOC = 8;
// I$
localparam int unsigned ICACHE_INDEX_WIDTH = 12; // in bit
localparam int unsigned ICACHE_TAG_WIDTH = 44; // in bit
localparam int unsigned ICACHE_LINE_WIDTH = 128; // in bit
localparam int unsigned ICACHE_SET_ASSOC = 4;
// D$
localparam int unsigned DCACHE_INDEX_WIDTH = 12; // in bit
localparam int unsigned DCACHE_TAG_WIDTH = 44; // in bit
localparam int unsigned DCACHE_LINE_WIDTH = 128; // in bit
localparam int unsigned DCACHE_SET_ASSOC = 8;
`endif
// ---------------

View file

@ -14,7 +14,7 @@
// default to AXI64 cache ports if not using the
// serpent PULP extension
`ifndef SERPENT_PULP
`ifndef PITON_ARIANE
`ifndef AXI64_CACHE_PORTS
`define AXI64_CACHE_PORTS
`endif

View file

@ -21,14 +21,14 @@ import instruction_tracer_pkg::*;
// default to AXI64 cache ports if not using the
// serpent PULP extension
`ifndef SERPENT_PULP
`ifndef PITON_ARIANE
`ifndef AXI64_CACHE_PORTS
`define AXI64_CACHE_PORTS
`endif
`endif
module ariane #(
`ifdef SERPENT_PULP
`ifdef PITON_ARIANE
parameter bit SwapEndianess = 0, // swap endianess in l15 adapter
parameter logic [63:0] CachedAddrEnd = 64'h80_0000_0000, // end of cached region
`endif
@ -578,7 +578,7 @@ module ariane #(
// Cache Subsystem
// -------------------
`ifdef SERPENT_PULP
`ifdef PITON_ARIANE
// this is a cache subsystem that is compatible with OpenPiton
serpent_cache_subsystem #(
.CachedAddrBeg ( CachedAddrBeg ),
@ -715,7 +715,7 @@ module ariane #(
end
endprogram
`ifdef SERPENT_PULP
`ifdef PITON_ARIANE
logic piton_pc_vld;
logic [63:0] piton_pc;
@ -746,7 +746,7 @@ module ariane #(
end
end
`endif // SERPENT_PULP
`endif // PITON_ARIANE
// mock tracer for Verilator, to be used with spike-dasm
`else

View file

@ -18,7 +18,7 @@
// Description: Ariane cache subsystem that is compatible with the OpenPiton
// coherent memory system.
//
// Define SERPENT_PULP if you want to use this cache.
// Define PITON_ARIANE if you want to use this cache.
// Define AXI64_CACHE_PORTS if you want to use this cache
// with a standard 64bit AXI interace instead of the openpiton
// L1.5 interface.

View file

@ -33,7 +33,7 @@ package ariane_soc;
localparam NB_PERIPHERALS = Debug + 1;
localparam logic[63:0] DebugLength = 64'h1000;
localparam logic[63:0] ROMLength = 64'h1000;
localparam logic[63:0] ROMLength = 64'h10000;
localparam logic[63:0] CLINTLength = 64'hC0000;
localparam logic[63:0] PLICLength = 64'h3FF_FFFF;
localparam logic[63:0] UARTLength = 64'h1000;

View file

@ -539,7 +539,7 @@ module ariane_testharness #(
ariane_axi::resp_t axi_ariane_resp;
ariane #(
`ifdef SERPENT_PULP
`ifdef PITON_ARIANE
.SwapEndianess ( 0 ),
.CachedAddrEnd ( (ariane_soc::DRAMBase + ariane_soc::DRAMLength) ),
`endif