Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix memset bug #439

Merged
merged 136 commits into from
Jan 19, 2024
Merged
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
8696bb9
QuadSPI example, not working in Questasim
Oct 13, 2023
2222baf
Merge branch 'esl-epfl:main' into main
consanii Oct 13, 2023
c1c4ba3
Add quadIO SPI example
Oct 16, 2023
f40bfce
Merge branch 'esl-epfl:main' into main
consanii Oct 16, 2023
0dad5da
Remove old quadspi example
Oct 16, 2023
7e937c9
Merge branch 'main' of github.com:consanii/x-heep
Oct 16, 2023
6f5235a
Code cleanup, fix to also support fisical flash
Oct 16, 2023
800e97c
QE bit set, small changes
Oct 18, 2023
de79010
small fix
Oct 18, 2023
b2e1a5b
small fix
Oct 18, 2023
9311a54
Merge branch 'esl-epfl:main' into main
consanii Oct 20, 2023
2d021b0
Write Enable, status reg2 check
consanii Oct 22, 2023
82bd290
BSP for standard read/write
consanii Oct 23, 2023
e6a3964
add test showcase
consanii Oct 24, 2023
68a7118
Add erase functionalities
consanii Oct 29, 2023
b45959b
Merge branch 'esl-epfl:main' into main
consanii Oct 29, 2023
ca2a48f
Variables refactor, QE bit set implemented
consanii Oct 30, 2023
0fc8921
Update test files
consanii Oct 30, 2023
5da4870
Support for simulation, add dma function def
consanii Oct 30, 2023
631e324
Merge branch 'esl-epfl:main' into main
consanii Nov 1, 2023
44da7b0
move bsp folder path, finish read test
consanii Nov 3, 2023
bc2227a
add standard write functionality
consanii Nov 3, 2023
8b1ab85
add basic write example
consanii Nov 3, 2023
2a73f8f
add wait for flash function
consanii Nov 4, 2023
44eb1f6
add quad page program, not tested
consanii Nov 4, 2023
fad76f4
bug fix
consanii Nov 4, 2023
909c3ff
support simulation write
consanii Nov 4, 2023
37c18f2
Merge branch 'verilog_flash_write' into bsp
consanii Nov 4, 2023
0f27166
fix typo
consanii Nov 4, 2023
dc54368
simple write woking
consanii Nov 4, 2023
d5bd715
small typo
consanii Nov 4, 2023
775e944
Fast Read Quad IO working + example
consanii Nov 5, 2023
134d629
add quad write bsp example
consanii Nov 5, 2023
0d8b8e8
bsp quad write working on simulation
consanii Nov 5, 2023
4ff10ce
implement standard read dma
consanii Nov 6, 2023
3fb535c
add quad read dma, rearrange write functions
consanii Nov 6, 2023
cc94105
implement write dma
consanii Nov 6, 2023
3e5bd52
Delate non relevant example
consanii Nov 7, 2023
fccf7ea
Add erase before write functionality
consanii Nov 9, 2023
647803d
Add profile test programm
consanii Nov 9, 2023
643dc26
Tested on FPGA
consanii Nov 9, 2023
e585f5f
small fix
consanii Nov 9, 2023
a198f34
Bug fix on flag defines
consanii Nov 10, 2023
901817b
Saved state server bug
consanii Nov 12, 2023
edbfc15
Merge branch 'bsp' of github.com:consanii/x-heep into bsp
consanii Nov 12, 2023
8ee13f9
Merge branch 'esl-epfl:main' into main
consanii Nov 12, 2023
14d4ae9
Merge branch 'esl-epfl:main' into bsp
consanii Nov 13, 2023
6d27046
Reset timer counter
consanii Nov 13, 2023
f038a96
Finish profile application for standard mode
consanii Nov 13, 2023
58e3946
Update flash profiling print statements
consanii Nov 13, 2023
ccafdc2
Add python notebbok to analise profiling results
consanii Nov 13, 2023
661528f
bug fix
consanii Nov 14, 2023
141e32b
Export function needed for profiling
consanii Nov 15, 2023
94a77c6
Profiling routine
consanii Nov 15, 2023
2faccb8
Add standard and quad measurements
consanii Nov 15, 2023
ca3df8c
Finalise plot settings
consanii Nov 15, 2023
5390da8
From 768 to 1024 bytes to reproduce bug
consanii Nov 15, 2023
21a2648
move profiling to another branch
consanii Nov 15, 2023
3a3e590
Fixes on profiling
consanii Nov 16, 2023
a392bcd
Comments
consanii Nov 16, 2023
e15cb8a
Merge branch 'bsp' of github.com:consanii/x-heep into bsp
consanii Nov 16, 2023
7f38ebe
Hot fix
consanii Nov 16, 2023
40ba3d6
Add last bytes check
consanii Nov 16, 2023
26d60e1
fix
consanii Nov 16, 2023
1e14ed2
fix
consanii Nov 16, 2023
530d939
Fix issue with reading extra bytes in
consanii Nov 16, 2023
2fdd12b
Disable QE bit before programming
consanii Nov 23, 2023
b9d714b
Merge branch 'main' of github.com:consanii/x-heep into main
consanii Nov 23, 2023
0af5c43
Debug QE bit set
consanii Nov 23, 2023
08e3516
Fix QE bit set bug
consanii Nov 24, 2023
d47946a
boh
consanii Nov 24, 2023
e15865c
Revert "boh"
consanii Nov 24, 2023
a3e7cfd
boh2
consanii Nov 24, 2023
8fb317c
boh3
consanii Nov 24, 2023
2628263
Merge branch 'main' into verilog_flash_write
consanii Nov 24, 2023
9c95617
Merge branch 'main' into bsp
consanii Nov 24, 2023
330ddda
Fix QE bit set function
consanii Nov 24, 2023
90d60bc
Merge remote-tracking branch 'upstream/main'
consanii Nov 28, 2023
08310b0
Merge remote-tracking branch 'upstream/main' into verilog_flash_write
consanii Nov 28, 2023
a587053
Merge remote-tracking branch 'upstream/main' into bsp
consanii Nov 28, 2023
f88f46c
Saved state
consanii Nov 28, 2023
7d0f6a0
Merge branch 'bsp' of github.com:consanii/x-heep into bsp
consanii Nov 28, 2023
6772885
saved state
consanii Nov 29, 2023
8ba5538
Merge remote-tracking branch 'upstream/main' into main
consanii Nov 29, 2023
9bad950
merge
consanii Nov 29, 2023
5c9c358
Merge branch 'main' into verilog_flash_write
consanii Nov 29, 2023
80843ba
fix merge
consanii Nov 29, 2023
c0de417
code clean-up
consanii Nov 29, 2023
b8374bd
Merge branch 'bsp' of github.com:consanii/x-heep into bsp
consanii Nov 29, 2023
57d9dcc
Modify to support run in simulation
consanii Nov 29, 2023
303a22c
Update supported command list
consanii Nov 30, 2023
79028c6
Add quad write example
consanii Nov 30, 2023
ac35fd3
Code cleanup
consanii Nov 30, 2023
4645e1b
Bug fix
consanii Nov 30, 2023
fb0d003
Merge branch 'verilog_flash_write' into bsp
consanii Nov 30, 2023
aad01ba
Remove enable QE bit before flashing
consanii Nov 30, 2023
40e7407
Fix QE bit set bug
consanii Nov 30, 2023
db8034e
Add some stuff from another branch
consanii Dec 1, 2023
679c928
Fix write dma app
consanii Dec 1, 2023
dcf91b6
Merge branch 'bsp' of github.com:consanii/x-heep into bsp
consanii Dec 1, 2023
ca93494
Add stuff to debug erase_adn_write()
consanii Dec 1, 2023
4472b5d
Add debug statements
consanii Dec 1, 2023
75e71a4
Merge from upstream/main
consanii Dec 5, 2023
deabcdf
Remove whitespace conflict
consanii Dec 5, 2023
8b00717
Remove modifications needed for profiling only
consanii Dec 5, 2023
2f690d2
Remove not needed example, fix merge
consanii Dec 5, 2023
20026b6
spi base memory address is now passed as an argument
consanii Dec 6, 2023
e4b2b07
Complete general read and write functions
consanii Dec 6, 2023
e02e3da
Fix heep overflow bug
consanii Dec 7, 2023
f18bdc6
Address PR review comments
consanii Dec 8, 2023
ffe3a84
Update spi examples to support the BSP
consanii Dec 8, 2023
808b2fa
Revert ext_bus changes
consanii Dec 12, 2023
04c9395
Fix test functions
consanii Dec 12, 2023
fd2ec61
Address PR comments
consanii Dec 12, 2023
4631317
Clena up file description
consanii Dec 13, 2023
fc01e9c
Address PR comments
consanii Dec 13, 2023
d93e887
Fix wrong macro usage
consanii Dec 13, 2023
ca2f91d
add spi_wait_for_tx_not_full
consanii Dec 22, 2023
fc25cb7
Resolve FIFO overflow bug in simulation
consanii Dec 22, 2023
3ab2fdb
Small fix and clean-up
consanii Dec 22, 2023
9783300
Remove print in simulation
consanii Dec 22, 2023
41cd472
Modify application to address PR comments
consanii Jan 1, 2024
7654809
Add void statement in function prototypes without parameters
consanii Jan 5, 2024
f9d61e0
Remove printf
consanii Jan 5, 2024
165759e
Resolve only one memory conf tested bug
consanii Jan 9, 2024
bbfd862
Update file description
consanii Jan 9, 2024
c6e48ec
Add memory mapped conf check
consanii Jan 9, 2024
aaeb926
fix sanity check bug
consanii Jan 9, 2024
9acf692
rewrite check_result function, erase buffer after every test
consanii Jan 9, 2024
740f09d
minor fix
consanii Jan 9, 2024
558ae83
rewrite check_result function, erase buffer after every test
consanii Jan 9, 2024
c4fd928
Add reset buffer to last test
consanii Jan 10, 2024
0eb4242
Fix DMA size
consanii Jan 10, 2024
f105b7c
Small fix
consanii Jan 10, 2024
c1dd405
Fix memset not being executed
consanii Jan 12, 2024
0943fd6
Merge remote-tracking branch 'upstream/main' into bsp
consanii Jan 13, 2024
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
16 changes: 12 additions & 4 deletions sw/applications/example_spi_read/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ uint32_t test_read(uint32_t *test_buffer, uint32_t len) {
if (status != FLASH_OK) exit(EXIT_FAILURE);

// Check if what we read is correct (i.e. flash_data == test_buffer)
return check_result(test_buffer, len);
uint32_t res = check_result(test_buffer, len);

// Reset the flash data buffer
memset(flash_data, 0, len * sizeof(uint8_t));

return res;
}

uint32_t test_read_dma(uint32_t *test_buffer, uint32_t len) {
Expand All @@ -129,10 +131,12 @@ uint32_t test_read_dma(uint32_t *test_buffer, uint32_t len) {
if (status != FLASH_OK) exit(EXIT_FAILURE);

// Check if what we read is correct (i.e. flash_data == test_buffer)
return check_result(test_buffer, len);
uint32_t res = check_result(test_buffer, len);

// Reset the flash data buffer
memset(flash_data, 0, len * sizeof(uint8_t));

return res;
}

uint32_t test_read_quad(uint32_t *test_buffer, uint32_t len) {
Expand All @@ -141,10 +145,12 @@ uint32_t test_read_quad(uint32_t *test_buffer, uint32_t len) {
if (status != FLASH_OK) exit(EXIT_FAILURE);

// Check if what we read is correct (i.e. flash_data == test_buffer)
return check_result(test_buffer, len);
uint32_t res = check_result(test_buffer, len);

// Reset the flash data buffer
memset(flash_data, 0, len * sizeof(uint8_t));

return res;
}

uint32_t test_read_quad_dma(uint32_t *test_buffer, uint32_t len) {
Expand All @@ -153,10 +159,12 @@ uint32_t test_read_quad_dma(uint32_t *test_buffer, uint32_t len) {
if (status != FLASH_OK) exit(EXIT_FAILURE);

// Check if what we read is correct (i.e. flash_data == test_buffer)
return check_result(test_buffer, len);
uint32_t res = check_result(test_buffer, len);

// Reset the flash data buffer
memset(flash_data, 0, len * sizeof(uint8_t));

return res;
}

uint32_t check_result(uint8_t *test_buffer, uint32_t len) {
Expand Down
Loading